drop -O3 and add -O2 for default release

This commit is contained in:
Than Ngo 2016-06-02 14:05:49 +02:00
parent 9f00df0cc2
commit 7d0c60e2ef
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,13 @@
diff -up cmake-3.5.2/Modules/Compiler/GNU.cmake.than cmake-3.5.2/Modules/Compiler/GNU.cmake
--- cmake-3.5.2/Modules/Compiler/GNU.cmake.than 2016-06-02 13:42:38.186383915 +0200
+++ cmake-3.5.2/Modules/Compiler/GNU.cmake 2016-06-02 14:00:26.256271135 +0200
@@ -48,7 +48,7 @@ macro(__compiler_gnu lang)
set(CMAKE_${lang}_FLAGS_INIT "")
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g")
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
- set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
+ set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
diff -up cmake-3.5.2/Modules/Platform/GNU.cmake.than cmake-3.5.2/Modules/Platform/GNU.cmake

View File

@ -41,7 +41,7 @@
Name: %{orig_name}%{?name_suffix} Name: %{orig_name}%{?name_suffix}
Version: 3.5.2 Version: 3.5.2
Release: 2%{?dist} Release: 3%{?dist}
Summary: Cross-platform make system Summary: Cross-platform make system
# most sources are BSD # most sources are BSD
@ -62,6 +62,8 @@ Source4: %{name}.prov
# http://public.kitware.com/Bug/view.php?id=12965 # http://public.kitware.com/Bug/view.php?id=12965
# https://bugzilla.redhat.com/show_bug.cgi?id=822796 # https://bugzilla.redhat.com/show_bug.cgi?id=822796
Patch2: %{name}-findruby.patch Patch2: %{name}-findruby.patch
# replace release flag -O3 with -O2 for fedora
Patch3: %{name}-fedora-flag_release.patch
# Patch for renaming on EPEL # Patch for renaming on EPEL
%if 0%{?name_suffix:1} %if 0%{?name_suffix:1}
@ -169,6 +171,7 @@ The %{name}-gui package contains the Qt based GUI for %{name}.
# We cannot use backups with patches to Modules as they end up being installed # We cannot use backups with patches to Modules as they end up being installed
%patch2 -p1 %patch2 -p1
%patch3 -p1
%if %{with python3} %if %{with python3}
echo '#!%{__python3}' > %{name}.prov echo '#!%{__python3}' > %{name}.prov
@ -378,6 +381,9 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
%changelog %changelog
* Thu Jun 02 2016 Than Ngo <than@redhat.com> - 3.5.2-3
- drop -O3 and add -O2 for default release
* Thu Apr 21 2016 Orion Poplawski <orion@cora.nwra.com> - 3.5.2-2 * Thu Apr 21 2016 Orion Poplawski <orion@cora.nwra.com> - 3.5.2-2
- Do not own /usr/lib/rpm/fileattrs - Do not own /usr/lib/rpm/fileattrs