cmake/cmake-fedora-flag_release.patch
fangxiuning 4f6c0d9732 modify
Signed-off-by: fangxiuning <fangxiuning@huawei.com>
2020-07-28 21:55:38 +08:00

144 lines
8.5 KiB
Diff

diff -Naur cmake-3.16.5/Modules/Compiler/Absoft-Fortran.cmake cmake-3.16.5_new/Modules/Compiler/Absoft-Fortran.cmake
--- cmake-3.16.5/Modules/Compiler/Absoft-Fortran.cmake 2020-03-04 21:50:44.000000000 +0800
+++ cmake-3.16.5_new/Modules/Compiler/Absoft-Fortran.cmake 2020-07-28 21:38:22.930701491 +0800
@@ -1,7 +1,7 @@
string(APPEND CMAKE_Fortran_FLAGS_INIT " ")
string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g")
string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " ")
-string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3")
+string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O2")
string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
set(CMAKE_Fortran_MODDIR_FLAG "-YMOD_OUT_DIR=")
set(CMAKE_Fortran_MODPATH_FLAG "-p")
diff -Naur cmake-3.16.5/Modules/Compiler/G95-Fortran.cmake cmake-3.16.5_new/Modules/Compiler/G95-Fortran.cmake
--- cmake-3.16.5/Modules/Compiler/G95-Fortran.cmake 2020-03-04 21:50:44.000000000 +0800
+++ cmake-3.16.5_new/Modules/Compiler/G95-Fortran.cmake 2020-07-28 21:38:22.934701550 +0800
@@ -1,7 +1,7 @@
string(APPEND CMAKE_Fortran_FLAGS_INIT " ")
string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g")
string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -Os")
-string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3")
+string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O2")
string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
set(CMAKE_Fortran_MODDIR_FLAG "-fmod=")
set(CMAKE_Fortran_VERBOSE_FLAG "-v")
diff -Naur cmake-3.16.5/Modules/Compiler/GNU.cmake cmake-3.16.5_new/Modules/Compiler/GNU.cmake
--- cmake-3.16.5/Modules/Compiler/GNU.cmake 2020-03-04 21:50:44.000000000 +0800
+++ cmake-3.16.5_new/Modules/Compiler/GNU.cmake 2020-07-28 21:38:22.934701550 +0800
@@ -55,7 +55,7 @@
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g")
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG")
- string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3 -DNDEBUG")
+ string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O2 -DNDEBUG")
string(APPEND 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 -Naur cmake-3.16.5/Modules/Compiler/GNU-Fortran.cmake cmake-3.16.5_new/Modules/Compiler/GNU-Fortran.cmake
--- cmake-3.16.5/Modules/Compiler/GNU-Fortran.cmake 2020-03-04 21:50:44.000000000 +0800
+++ cmake-3.16.5_new/Modules/Compiler/GNU-Fortran.cmake 2020-07-28 21:38:22.934701550 +0800
@@ -14,7 +14,7 @@
# No -DNDEBUG for Fortran.
string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -Os")
-string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3")
+string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O2")
# No -isystem for Fortran because it will not find .mod files.
unset(CMAKE_INCLUDE_SYSTEM_FLAG_Fortran)
diff -Naur cmake-3.16.5/Modules/Compiler/Intel.cmake cmake-3.16.5_new/Modules/Compiler/Intel.cmake
--- cmake-3.16.5/Modules/Compiler/Intel.cmake 2020-03-04 21:50:44.000000000 +0800
+++ cmake-3.16.5_new/Modules/Compiler/Intel.cmake 2020-07-28 21:38:22.934701550 +0800
@@ -22,7 +22,7 @@
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g")
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os")
- string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3")
+ string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O2")
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
set(CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "${CMAKE_${lang}_COMPILER}")
diff -Naur cmake-3.16.5/Modules/Compiler/NVIDIA-CUDA.cmake cmake-3.16.5_new/Modules/Compiler/NVIDIA-CUDA.cmake
--- cmake-3.16.5/Modules/Compiler/NVIDIA-CUDA.cmake 2020-03-04 21:50:44.000000000 +0800
+++ cmake-3.16.5_new/Modules/Compiler/NVIDIA-CUDA.cmake 2020-07-28 21:38:22.934701550 +0800
@@ -11,7 +11,7 @@
set(CMAKE_SHARED_LIBRARY_CUDA_FLAGS -fPIC)
string(APPEND CMAKE_CUDA_FLAGS_INIT " ")
string(APPEND CMAKE_CUDA_FLAGS_DEBUG_INIT " -g")
- string(APPEND CMAKE_CUDA_FLAGS_RELEASE_INIT " -O3 -DNDEBUG")
+ string(APPEND CMAKE_CUDA_FLAGS_RELEASE_INIT " -O2 -DNDEBUG")
string(APPEND CMAKE_CUDA_FLAGS_MINSIZEREL_INIT " -O1 -DNDEBUG")
string(APPEND CMAKE_CUDA_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG")
endif()
diff -Naur cmake-3.16.5/Modules/Compiler/PathScale.cmake cmake-3.16.5_new/Modules/Compiler/PathScale.cmake
--- cmake-3.16.5/Modules/Compiler/PathScale.cmake 2020-03-04 21:50:44.000000000 +0800
+++ cmake-3.16.5_new/Modules/Compiler/PathScale.cmake 2020-07-28 21:38:22.934701550 +0800
@@ -16,6 +16,6 @@
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g -O0")
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os")
- string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3")
+ string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O2")
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -g -O2")
endmacro()
diff -Naur cmake-3.16.5/Modules/Compiler/PGI.cmake cmake-3.16.5_new/Modules/Compiler/PGI.cmake
--- cmake-3.16.5/Modules/Compiler/PGI.cmake 2020-03-04 21:50:44.000000000 +0800
+++ cmake-3.16.5_new/Modules/Compiler/PGI.cmake 2020-07-28 21:38:22.934701550 +0800
@@ -18,7 +18,7 @@
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g -O0")
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -O2 -s")
- string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -fast -O3")
+ string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -fast -O2")
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -gopt")
if(CMAKE_HOST_WIN32)
diff -Naur cmake-3.16.5/Modules/Compiler/SunPro-ASM.cmake cmake-3.16.5_new/Modules/Compiler/SunPro-ASM.cmake
--- cmake-3.16.5/Modules/Compiler/SunPro-ASM.cmake 2020-03-04 21:50:44.000000000 +0800
+++ cmake-3.16.5_new/Modules/Compiler/SunPro-ASM.cmake 2020-07-28 21:38:22.938701608 +0800
@@ -11,7 +11,7 @@
string(APPEND CMAKE_ASM_FLAGS_INIT " ")
string(APPEND CMAKE_ASM_FLAGS_DEBUG_INIT " -g")
string(APPEND CMAKE_ASM_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG")
-string(APPEND CMAKE_ASM_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG")
+string(APPEND CMAKE_ASM_FLAGS_RELEASE_INIT " -xO2 -DNDEBUG")
string(APPEND CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG")
# Initialize ASM link type selection flags. These flags are used when
diff -Naur cmake-3.16.5/Modules/Compiler/SunPro-C.cmake cmake-3.16.5_new/Modules/Compiler/SunPro-C.cmake
--- cmake-3.16.5/Modules/Compiler/SunPro-C.cmake 2020-03-04 21:50:44.000000000 +0800
+++ cmake-3.16.5_new/Modules/Compiler/SunPro-C.cmake 2020-07-28 21:38:22.938701608 +0800
@@ -19,7 +19,7 @@
string(APPEND CMAKE_C_FLAGS_INIT " ")
string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -g")
string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG")
-string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG")
+string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -xO2 -DNDEBUG")
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG")
set(CMAKE_DEPFILE_FLAGS_C "-xMD -xMF <DEPFILE>")
diff -Naur cmake-3.16.5/Modules/Compiler/SunPro-CXX.cmake cmake-3.16.5_new/Modules/Compiler/SunPro-CXX.cmake
--- cmake-3.16.5/Modules/Compiler/SunPro-CXX.cmake 2020-03-04 21:50:44.000000000 +0800
+++ cmake-3.16.5_new/Modules/Compiler/SunPro-CXX.cmake 2020-07-28 21:38:22.938701608 +0800
@@ -19,7 +19,7 @@
string(APPEND CMAKE_CXX_FLAGS_INIT " ")
string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -g")
string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG")
-string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -xO2 -DNDEBUG")
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG")
set(CMAKE_DEPFILE_FLAGS_CXX "-xMD -xMF <DEPFILE>")
diff -Naur cmake-3.16.5/Modules/Compiler/SunPro-Fortran.cmake cmake-3.16.5_new/Modules/Compiler/SunPro-Fortran.cmake
--- cmake-3.16.5/Modules/Compiler/SunPro-Fortran.cmake 2020-03-04 21:50:44.000000000 +0800
+++ cmake-3.16.5_new/Modules/Compiler/SunPro-Fortran.cmake 2020-07-28 21:38:22.938701608 +0800
@@ -17,7 +17,7 @@
string(APPEND CMAKE_Fortran_FLAGS_INIT " ")
string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g")
string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG")
-string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG")
+string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -xO2 -DNDEBUG")
string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG")
set(CMAKE_Fortran_MODDIR_FLAG "-moddir=")
set(CMAKE_Fortran_MODPATH_FLAG "-M")