From 7d0c60e2ef622f0ef808c95fe51796294fee2af4 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Thu, 2 Jun 2016 14:05:49 +0200 Subject: [PATCH] drop -O3 and add -O2 for default release --- cmake-fedora-flag_release.patch | 13 +++++++++++++ cmake.spec | 8 +++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 cmake-fedora-flag_release.patch diff --git a/cmake-fedora-flag_release.patch b/cmake-fedora-flag_release.patch new file mode 100644 index 0000000..6e063ae --- /dev/null +++ b/cmake-fedora-flag_release.patch @@ -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 " -E > ") + set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE " -S -o ") +diff -up cmake-3.5.2/Modules/Platform/GNU.cmake.than cmake-3.5.2/Modules/Platform/GNU.cmake diff --git a/cmake.spec b/cmake.spec index 176358a..b1f5e89 100644 --- a/cmake.spec +++ b/cmake.spec @@ -41,7 +41,7 @@ Name: %{orig_name}%{?name_suffix} Version: 3.5.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Cross-platform make system # most sources are BSD @@ -62,6 +62,8 @@ Source4: %{name}.prov # http://public.kitware.com/Bug/view.php?id=12965 # https://bugzilla.redhat.com/show_bug.cgi?id=822796 Patch2: %{name}-findruby.patch +# replace release flag -O3 with -O2 for fedora +Patch3: %{name}-fedora-flag_release.patch # Patch for renaming on EPEL %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 %patch2 -p1 +%patch3 -p1 %if %{with python3} echo '#!%{__python3}' > %{name}.prov @@ -378,6 +381,9 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %changelog +* Thu Jun 02 2016 Than Ngo - 3.5.2-3 +- drop -O3 and add -O2 for default release + * Thu Apr 21 2016 Orion Poplawski - 3.5.2-2 - Do not own /usr/lib/rpm/fileattrs