Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
d194724b97
!91 修复源码包同源异构问题
From: @fly_fzc 
Reviewed-by: @lyn1001 
Signed-off-by: @lyn1001
2025-01-23 13:39:46 +00:00
fly_fzc
c2642a1710 remove the architecture judgment in the patches section 2025-01-23 19:36:22 +08:00
openeuler-ci-bot
14bdc18e88
!78 [sync] PR-77: Add compilation options for i686. Support arrch64-ilp32 compilation.
From: @openeuler-sync-bot 
Reviewed-by: @lyn1001 
Signed-off-by: @lyn1001
2024-07-11 07:34:57 +00:00
fly_fzc
a5bf26eeff Add compilation options for i686. Support arrch64-ilp32 compilation.
(cherry picked from commit 15d5025664f33e53d380d908affc75a53c378f65)
2024-07-11 10:44:43 +08:00
openeuler-ci-bot
75b6ecc3ba
!73 [sync] PR-72: [WIP]fix cmake compile issue due to cxx standard check failed
From: @openeuler-sync-bot 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2024-04-15 06:25:46 +00:00
tiberium
b9fa0dba36 fix cmake compile issue due to cxx standard check failed
(cherry picked from commit 83f6533e84d6ed6d66cbb605120a9660564b5c46)
2024-04-15 09:52:08 +08:00
openeuler-ci-bot
2e6d9fe88b
!62 Remove Windows_TemporaryKey.pfx
From: @lyn1001 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2024-02-02 09:11:51 +00:00
lyn1001
58e17b0368 Remove Windows_TemporaryKey.pfx 2024-02-02 15:33:12 +08:00
openeuler-ci-bot
b5f4b0b45b
!61 Update to 3.27.9
From: @lyn1001 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2024-01-10 08:04:11 +00:00
lyn1001
42f3c464ef update to 3.27.9 2024-01-08 18:16:31 +08:00
11 changed files with 372 additions and 160 deletions

View File

@ -0,0 +1,238 @@
From d5d39d3adba9f68b7c2e83920230102adb172c23 Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Thu, 3 Dec 2020 17:03:47 +0800
Subject: [PATCH] cmake aarch64-ilp32 support
Reference:https://build.opensuse.org/package/view_file/devel:ARM:Factory:Contrib:ILP32/cmake/aarch64-ilp32.patch?expand=1
Conflict:Contextual adaptation
---
Modules/CMakeCompilerABI.h | 5 +++++
Modules/FindGTK2.cmake | 2 ++
Modules/FindJNI.cmake | 4 ++++
Modules/FindPkgConfig.cmake | 4 ++++
Modules/GNUInstallDirs.cmake | 5 +++++
Modules/Platform/UnixPaths.cmake | 3 ++-
Source/cmFindLibraryCommand.cxx | 6 ++++++
Source/cmFindPackageCommand.cxx | 11 +++++++++++
Source/cmFindPackageCommand.h | 1 +
Source/cmMakefile.cxx | 13 +++++++++++++
Source/cmMakefile.h | 3 +++
11 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/Modules/CMakeCompilerABI.h b/Modules/CMakeCompilerABI.h
index 45532af..38545c9 100644
--- a/Modules/CMakeCompilerABI.h
+++ b/Modules/CMakeCompilerABI.h
@@ -24,6 +24,11 @@ const char info_sizeof_dptr[] = {
defined(__ILP32__)
# define ABI_ID "ELF X32"
+#elif defined(__ELF__) && defined(__aarch64__) && defined(__LP64__)
+# define ABI_ID "ELF LP64"
+#elif defined(__ELF__) && defined(__aarch64__) && defined(__ILP32__)
+# define ABI_ID "ELF ILP32"
+
#elif defined(__ELF__)
# define ABI_ID "ELF"
#endif
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index 83091f3..9ed1f4d 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -293,9 +293,11 @@ function(_GTK2_FIND_INCLUDE_DIR _var _hdr)
PATHS
${_gtk2_arch_dir}
/usr/local/libx32
+ /usr/local/libilp32
/usr/local/lib64
/usr/local/lib
/usr/libx32
+ /usr/libilp32
/usr/lib64
/usr/lib
/opt/gnome/include
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index 3a5bd31..04fe966 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -64,6 +64,8 @@ macro(java_append_library_directories _var)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
# Subdir is "arm" for both big-endian (arm) and little-endian (armel).
set(_java_libarch "arm" "aarch32")
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
+ set(_java_libarch "aarch64" "aarch64_ilp32")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
# mips* machines are bi-endian mostly so processor does not tell
# endianness of the underlying system.
@@ -216,6 +218,8 @@ set(_JNI_JAVA_DIRECTORIES_BASE
# SuSE specific paths for default JVM
/usr/lib64/jvm/java
/usr/lib64/jvm/jre
+ /usr/libilp32/jvm/java
+ /usr/libilp32/jvm/jre
)
set(_JNI_JAVA_AWT_LIBRARY_TRIES)
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index bd1bc7c..4773d99 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -317,6 +317,10 @@ macro(_pkg_set_path_internal)
if(uselibx32 AND CMAKE_INTERNAL_PLATFORM_ABI STREQUAL "ELF X32")
list(APPEND _lib_dirs "libx32/pkgconfig")
endif()
+ get_property(uselibilp32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIBILP32_PATHS)
+ if(uselibilp32 AND CMAKE_INTERNAL_PLATFORM_ABI STREQUAL "ELF ILP32")
+ list(APPEND _lib_dirs "libilp32/pkgconfig")
+ endif()
endif()
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT CMAKE_CROSSCOMPILING)
diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake
index f95e6e2..003e8cc 100644
--- a/Modules/GNUInstallDirs.cmake
+++ b/Modules/GNUInstallDirs.cmake
@@ -245,6 +245,11 @@ if(NOT DEFINED CMAKE_INSTALL_LIBDIR OR (_libdir_set
if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX)
set(__LAST_LIBDIR_DEFAULT "lib64")
endif()
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
+ set(_LIBDIR_DEFAULT "libilp32")
+ if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX)
+ set(__LAST_LIBDIR_DEFAULT "libilp32")
+ endif()
endif()
endif()
endif()
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake
index 97f744d..9acb7b3 100644
--- a/Modules/Platform/UnixPaths.cmake
+++ b/Modules/Platform/UnixPaths.cmake
@@ -60,7 +60,7 @@ list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
)
list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
- /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64
+ /lib /lib32 /lib64 /libilp32 /usr/lib /usr/lib32 /usr/lib64 /usr/libilp32
)
if(CMAKE_SYSROOT_COMPILE)
@@ -90,3 +90,4 @@ unset(_cmake_sysroot_compile)
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS TRUE)
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIBX32_PATHS TRUE)
+set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIBILP32_PATHS TRUE)
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx
index 20221b1..b73b1c1 100644
--- a/Source/cmFindLibraryCommand.cxx
+++ b/Source/cmFindLibraryCommand.cxx
@@ -70,6 +70,12 @@ bool cmFindLibraryCommand::InitialPass(std::vector<std::string> const& argsIn)
"FIND_LIBRARY_USE_LIBX32_PATHS")) {
this->AddArchitecturePaths("x32");
}
+ // add special 32 bit paths if this is an ilp32 compile.
+ else if (this->Makefile->PlatformIsilp32() &&
+ this->Makefile->GetState()->GetGlobalPropertyAsBool(
+ "FIND_LIBRARY_USE_LIBILP32_PATHS")) {
+ this->AddArchitecturePaths("ilp32");
+ }
std::string const library = this->FindLibrary();
if (!library.empty()) {
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 2b11b62..deb5f1e 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -100,6 +100,7 @@ cmFindPackageCommand::cmFindPackageCommand(cmExecutionStatus& status)
this->UseLib32Paths = false;
this->UseLib64Paths = false;
this->UseLibx32Paths = false;
+ this->UseLibilp32Paths = false;
this->UseRealPath = false;
this->PolicyScope = true;
this->VersionMajor = 0;
@@ -190,6 +191,13 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
this->UseLibx32Paths = true;
}
+ // Lookup whether libilp32 paths should be used.
+ if (this->Makefile->PlatformIsilp32() &&
+ this->Makefile->GetState()->GetGlobalPropertyAsBool(
+ "FIND_LIBRARY_USE_LIBILP32_PATHS")) {
+ this->UseLibilp32Paths = true;
+ }
+
// Check if User Package Registry should be disabled
// The `CMAKE_FIND_USE_PACKAGE_REGISTRY` has
// priority over the deprecated CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
@@ -2097,6 +2105,9 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in)
if (this->UseLibx32Paths) {
common.emplace_back("libx32");
}
+ if (this->UseLibilp32Paths) {
+ common.emplace_back("libilp32");
+ }
common.emplace_back("lib");
common.emplace_back("share");
diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h
index 85fe7b6..f254581 100644
--- a/Source/cmFindPackageCommand.h
+++ b/Source/cmFindPackageCommand.h
@@ -178,6 +178,7 @@ private:
bool UseLib32Paths;
bool UseLib64Paths;
bool UseLibx32Paths;
+ bool UseLibilp32Paths;
bool UseRealPath;
bool PolicyScope;
std::string LibraryArchitecture;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index f143ef7..8b5aee4 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2569,6 +2569,9 @@ bool cmMakefile::PlatformIs32Bit() const
if (strcmp(plat_abi, "ELF X32") == 0) {
return false;
}
+ if (strcmp(plat_abi, "ELF ILP32") == 0) {
+ return false;
+ }
}
if (const char* sizeof_dptr = this->GetDefinition("CMAKE_SIZEOF_VOID_P")) {
return atoi(sizeof_dptr) == 4;
@@ -2595,6 +2598,16 @@ bool cmMakefile::PlatformIsx32() const
return false;
}
+bool cmMakefile::PlatformIsilp32() const
+{
+ if (const char* plat_abi = this->GetDefinition("CMAKE_INTERNAL_PLATFORM_ABI")) {
+ if (strcmp(plat_abi, "ELF ILP32") == 0) {
+ return true;
+ }
+ }
+ return false;
+}
+
cmMakefile::AppleSDK cmMakefile::GetAppleSDKType() const
{
std::string sdkRoot;
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 6e59494..615e291 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -511,6 +511,9 @@ public:
/** Return whether the target platform is x32. */
bool PlatformIsx32() const;
+ /** Return whether the target platform is ilp32. */
+ bool PlatformIsilp32() const;
+
/** Apple SDK Type */
enum class AppleSDK
{
--
2.23.0

View File

@ -1,7 +1,7 @@
diff -Naur cmake-3.22.0.org/Modules/FindJNI.cmake cmake-3.22.0.sw/Modules/FindJNI.cmake
--- cmake-3.22.0.org/Modules/FindJNI.cmake 2022-02-25 01:21:55.530000000 +0000
+++ cmake-3.22.0.sw/Modules/FindJNI.cmake 2022-02-25 01:30:19.530000000 +0000
@@ -61,6 +61,8 @@
@@ -150,6 +150,8 @@
set(_java_libarch "i386")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
set(_java_libarch "arm64" "aarch64")
@ -10,18 +10,19 @@ diff -Naur cmake-3.22.0.org/Modules/FindJNI.cmake cmake-3.22.0.sw/Modules/FindJN
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^alpha")
set(_java_libarch "alpha")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
@@ -363,6 +365,7 @@
@@ -509,6 +511,7 @@
${JAVA_INCLUDE_PATH}/solaris
${JAVA_INCLUDE_PATH}/hp-ux
${JAVA_INCLUDE_PATH}/alpha
+ ${JAVA_INCLUDE_PATH}/sw_64
${JAVA_INCLUDE_PATH}/aix
DOC "jni_md.h jniport.h include directory"
)
diff -Naur cmake-3.22.0.org/Modules/GNUInstallDirs.cmake cmake-3.22.0.sw/Modules/GNUInstallDirs.cmake
--- cmake-3.22.0.org/Modules/GNUInstallDirs.cmake 2022-02-25 01:21:55.550000000 +0000
+++ cmake-3.22.0.sw/Modules/GNUInstallDirs.cmake 2022-02-25 01:32:38.270000000 +0000
@@ -280,9 +280,9 @@
@@ -286,9 +286,9 @@
elseif(NOT DEFINED __system_type_for_install)
# not debian, alpine, arch, or conda so rely on CMAKE_SIZEOF_VOID_P:
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
@ -62,7 +63,7 @@ diff -Naur cmake-3.22.0.org/Utilities/cmlibrhash/librhash/byte_order.h cmake-3.2
diff -Naur cmake-3.22.0.org/Utilities/cmlibuv/src/win/util.c cmake-3.22.0.sw/Utilities/cmlibuv/src/win/util.c
--- cmake-3.22.0.org/Utilities/cmlibuv/src/win/util.c 2022-02-25 01:21:57.830000000 +0000
+++ cmake-3.22.0.sw/Utilities/cmlibuv/src/win/util.c 2022-02-25 01:33:21.970000000 +0000
@@ -1917,6 +1917,10 @@
@@ -1849,6 +1849,10 @@
case PROCESSOR_ARCHITECTURE_MIPS:
uv__strscpy(buffer->machine, "mips", sizeof(buffer->machine));
break;

View File

@ -0,0 +1,13 @@
diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake
index 02627464..4f6ccdaf 100644
--- a/Source/Checks/cm_cxx_features.cmake
+++ b/Source/Checks/cm_cxx_features.cmake
@@ -44,6 +44,8 @@ function(cm_check_cxx_feature name)
string(REGEX REPLACE "[^\n]*warning D[0-9][0-9][0-9][0-9][^\n]*" "" check_output "${check_output}")
# Filter out warnings caused by user flags.
string(REGEX REPLACE "[^\n]*warning:[^\n]*-Winvalid-command-line-argument[^\n]*" "" check_output "${check_output}")
+ # Filter out clang output warnings
+ string(REGEX REPLACE "[^\n]*warning:[^\n]*-Wunused-command-line-argument[^\n]*" "" check_output "${check_output}")
# Filter out warnings caused by local configuration.
string(REGEX REPLACE "[^\n]*warning:[^\n]*directory not found for option[^\n]*" "" check_output "${check_output}")
string(REGEX REPLACE "[^\n]*warning:[^\n]*object file compiled with -mlong-branch which is no longer needed[^\n]*" "" check_output "${check_output}")

View File

@ -1,117 +0,0 @@
Index: cmake-3.22.0-rc1/Modules/Compiler/Absoft-Fortran.cmake
===================================================================
--- cmake-3.22.0-rc1.orig/Modules/Compiler/Absoft-Fortran.cmake
+++ cmake-3.22.0-rc1/Modules/Compiler/Absoft-Fortran.cmake
@@ -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")
Index: cmake-3.22.0-rc1/Modules/Compiler/G95-Fortran.cmake
===================================================================
--- cmake-3.22.0-rc1.orig/Modules/Compiler/G95-Fortran.cmake
+++ cmake-3.22.0-rc1/Modules/Compiler/G95-Fortran.cmake
@@ -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")
Index: cmake-3.22.0-rc1/Modules/Compiler/GNU.cmake
===================================================================
--- cmake-3.22.0-rc1.orig/Modules/Compiler/GNU.cmake
+++ cmake-3.22.0-rc1/Modules/Compiler/GNU.cmake
@@ -55,7 +55,7 @@ macro(__compiler_gnu lang)
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>")
Index: cmake-3.22.0-rc1/Modules/Compiler/GNU-Fortran.cmake
===================================================================
--- cmake-3.22.0-rc1.orig/Modules/Compiler/GNU-Fortran.cmake
+++ cmake-3.22.0-rc1/Modules/Compiler/GNU-Fortran.cmake
@@ -19,7 +19,7 @@ set(CMAKE_Fortran_POSTPROCESS_FLAG "-fpr
# 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)
Index: cmake-3.22.0-rc1/Modules/Compiler/Intel.cmake
===================================================================
--- cmake-3.22.0-rc1.orig/Modules/Compiler/Intel.cmake
+++ cmake-3.22.0-rc1/Modules/Compiler/Intel.cmake
@@ -22,7 +22,7 @@ else()
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}")
Index: cmake-3.22.0-rc1/Modules/Compiler/NVIDIA-CUDA.cmake
===================================================================
--- cmake-3.22.0-rc1.orig/Modules/Compiler/NVIDIA-CUDA.cmake
+++ cmake-3.22.0-rc1/Modules/Compiler/NVIDIA-CUDA.cmake
@@ -51,7 +51,7 @@ if(NOT "x${CMAKE_CUDA_SIMULATE_ID}" STRE
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()
Index: cmake-3.22.0-rc1/Modules/Compiler/PathScale.cmake
===================================================================
--- cmake-3.22.0-rc1.orig/Modules/Compiler/PathScale.cmake
+++ cmake-3.22.0-rc1/Modules/Compiler/PathScale.cmake
@@ -16,6 +16,6 @@ macro(__compiler_pathscale lang)
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()
Index: cmake-3.22.0-rc1/Modules/Compiler/PGI.cmake
===================================================================
--- cmake-3.22.0-rc1.orig/Modules/Compiler/PGI.cmake
+++ cmake-3.22.0-rc1/Modules/Compiler/PGI.cmake
@@ -18,7 +18,7 @@ macro(__compiler_pgi lang)
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)
Index: cmake-3.22.0-rc1/Modules/Platform/Windows-Clang.cmake
===================================================================
--- cmake-3.22.0-rc1.orig/Modules/Platform/Windows-Clang.cmake
+++ cmake-3.22.0-rc1/Modules/Platform/Windows-Clang.cmake
@@ -92,7 +92,7 @@ macro(__windows_compiler_clang_gnu lang)
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g -Xclang -gcodeview -O0 ${__ADDED_FLAGS_DEBUG}")
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG ${__ADDED_FLAGS}")
- string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3 -DNDEBUG ${__ADDED_FLAGS}")
+ string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O2 -DNDEBUG ${__ADDED_FLAGS}")
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG -Xclang -gcodeview ${__ADDED_FLAGS}")
endif()
set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ")

View File

@ -1,18 +0,0 @@
Index: cmake-3.23.0-rc2/Modules/Platform/Windows-GNU.cmake
===================================================================
--- cmake-3.23.0-rc2.orig/Modules/Platform/Windows-GNU.cmake
+++ cmake-3.23.0-rc2/Modules/Platform/Windows-GNU.cmake
@@ -24,11 +24,11 @@ set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
set(CMAKE_EXTRA_LINK_EXTENSIONS ".lib") # MinGW can also link to a MS .lib
set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
-set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a" ".lib")
+set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a" ".lib")
set(CMAKE_C_STANDARD_LIBRARIES_INIT "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32")
set(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
-set(CMAKE_DL_LIBS "")
+set(CMAKE_DL_LIBS "dl")
set(CMAKE_LIBRARY_PATH_FLAG "-L")
set(CMAKE_LINK_LIBRARY_FLAG "-l")
set(CMAKE_LINK_DEF_FILE_FLAG "") # Empty string: passing the file is enough

View File

@ -1,3 +1,3 @@
%__cmake_provides %{_rpmconfigdir}/cmake.prov
%__cmake_requires %{_rpmconfigdir}/cmake.req
%__cmake_path ^(%{_libdir}|%{_datadir})/cmake/.*/.*(Config\.cmake|-config\.cmake)$
%__cmake_path ^(/usr/lib(64|ilp32)?|%{_datadir})/cmake/.*/.*(Config\.cmake|-config\.cmake)$

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding:utf-8 -*-
#
# Copyright (C) 2015 Daniel Vrátil <dvratil@redhat.com>
@ -37,9 +37,16 @@ class CMakeParser:
version = self.resolveCMakeModuleVersion(modulePath, cmakeModule, lowercase)
if version:
print("cmake(%s) = %s" % (cmakeModule, version))
string = "cmake(" + cmakeModule + ") = " + version
else:
print("cmake(%s)" % cmakeModule)
string = "cmake(" + cmakeModule + ")"
if string == string.lower():
print(string)
else:
# Temporarily print both variants to satisfy requires
# by the old version of this generator which made mistakes
print(string)
print(string.lower())
def parseCmakeModuleConfig(self, configFile):

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding:utf-8 -*-
#
# Copyright (C) 2017 Björn Esser <besser82@fedoraproject.org>
@ -45,6 +45,8 @@ class CMakeParser:
has_module = True
if re.match(".*/usr/lib(64)?/cmake/.*", modulePath):
is_arched = True
elif re.match(".*/usr/libilp32/cmake/.*", modulePath):
is_arched = True
if has_module:
if is_arched:

View File

@ -1,8 +1,19 @@
%define debug_package %{nil}
%bcond_with bootstrap
%bcond_without ncurses
%bcond_without sphinx
%bcond_without X11_test
%ifarch aarch64_ilp32
%bcond_with cmake_gui
%bcond_with emacs
%bcond_without bootstrap
%bcond_with sphinx
%else
%bcond_without cmake_gui
%bcond_without emacs
%bcond_with bootstrap
%bcond_without sphinx
%endif
%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/cmake-%{version}}
@ -10,26 +21,33 @@
%{?rcsuf:%global versuf -%{rcsuf}}
Name: cmake
Version: 3.24.3
Release: 2
Version: 3.27.9
Release: 5
Summary: Cross-platform make system
License: BSD and MIT and zlib
URL: http://www.cmake.org
Source0: https://www.cmake.org/files/v3.22/cmake-%{version}.tar.gz
Source0: https://www.cmake.org/files/v3.27/cmake-%{version}.tar.gz
Source1: cmake-init.el
Source2: macros.cmake
Source3: cmake.attr
Source4: cmake.prov
Source5: cmake.req
Patch0: cmake-findruby.patch
Patch1: cmake-fedora-flag_release.patch
Patch2: cmake-mingw-dl.patch
%ifarch sw_64
Patch3: cmake-3.22.0-sw.patch
%endif
Patch1: cmake-3.27.9-fix-cxx-standard-check-issue.patch
Patch2: cmake-3.22.0-sw.patch
Patch3: backport-cmake-aarch64-ilp32-support.patch
BuildRequires: coreutils findutils gcc-c++ gcc-gfortran sed
BuildRequires: emacs python3-devel pkgconfig(Qt5Widgets) desktop-file-utils
%if %{with cmake_gui}
BuildRequires: pkgconfig(Qt5Widgets) desktop-file-utils
%endif
%if %{with emacs}
BuildRequires: emacs
%endif
BuildRequires: python3-devel
%if %{with X11_test}
BuildRequires: libX11-devel
%endif
@ -49,7 +67,7 @@ BuildRequires: pkgconfig(bash-completion)
Requires: cmake-data = %{version}-%{release} cmake-rpm-macros = %{version}-%{release}
Requires: cmake-filesystem = %{version}-%{release}
Provides: cmake3 = %{version}-%{release} bundled(md5-deutsch) bundled(kwsys)
Provides: cmake3 = %{version}-%{release} bundled(md5-deutsch) bundled(kwsys) bundled(cppdap)
%description
CMake is used to control the software compilation process using simple
@ -63,7 +81,10 @@ generation, code generation, and template instantiation.
Summary: Common data-files for cmake
Requires: cmake = %{version}-%{release} cmake-filesystem = %{version}-%{release}
Requires: cmake-rpm-macros = %{version}-%{release}
%if %{with emacs}
Requires: emacs-filesystem%{?_emacs_version: >= %{_emacs_version}}
%endif
BuildArch: noarch
@ -76,6 +97,7 @@ Summary: Directories used by CMake modules
%description filesystem
This package owns all directories used by CMake modules.
%if %{with cmake_gui}
%package gui
Summary: Qt GUI for cmake
@ -85,6 +107,7 @@ Requires: shared-mime-info
%description gui
The cmake-gui package contains the Qt based GUI for cmake.
%endif
%package rpm-macros
Summary: Common RPM macros for cmake
@ -105,9 +128,20 @@ BuildArch: noarch
Documentation for cmake.
%prep
%autosetup -n cmake-%{version}%{?versuf} -p 1
sed '1c #!%{__python3}' %{SOURCE4} > cmake.prov
sed '1c #!%{__python3}' %{SOURCE5} > cmake.req
%setup -n cmake-%{version}%{?versuf}
%patch 0 -p1
%patch 1 -p1
%ifarch sw_64
%patch 2 -p1
%endif
%ifarch aarch64_ilp32
%patch 3 -p1
%endif
echo '#!%{__python3}' > %{name}.prov
echo '#!%{__python3}' > %{name}.req
tail -n +2 %{SOURCE4} >> %{name}.prov
tail -n +2 %{SOURCE5} >> %{name}.req
%build
export CFLAGS=`echo %{optflags} | sed 's/-g\b/-s/g'`
@ -119,13 +153,18 @@ pushd build
--docdir=/share/doc/cmake --mandir=/share/man \
--%{?with_bootstrap:no-}system-libs \
--parallel=`/usr/bin/getconf _NPROCESSORS_ONLN` \
--no-system-cppdap \
--no-system-librhash \
%if %{with sphinx}
--sphinx-man --sphinx-html \
%else
--sphinx-build=%{_bindir}/false \
%endif
%if %{with cmake_gui}
%if 0%{?build_cross} == 0
--qt-gui \
%endif
%endif
;
%make_build VERBOSE=1
@ -137,11 +176,17 @@ for f in ccmake cmake cpack ctest;
do
ln -s $f %{buildroot}%{_bindir}/${f}3;
done
%if %{with emacs}
install -d %{buildroot}%{_emacs_sitelispdir}/cmake
install -p -m 0644 Auxiliary/cmake-mode.el %{buildroot}%{_emacs_sitelispdir}/cmake/cmake-mode.el
%{_emacs_bytecompile} %{buildroot}%{_emacs_sitelispdir}/cmake/cmake-mode.el
install -d %{buildroot}%{_emacs_sitestartdir}
install -p -m 0644 %SOURCE1 %{buildroot}%{_emacs_sitestartdir}
%else
rm -f %{buildroot}%{_emacs_sitelispdir}
%endif
install -p -m0644 -D %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.cmake
sed -i -e "s|@@CMAKE_VERSION@@|%{version}|" -e "s|@@CMAKE_MAJOR_VERSION@@|3|" %{buildroot}%{rpm_macros_dir}/macros.cmake
touch -r %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.cmake
@ -161,10 +206,17 @@ cp -p Utilities/cmexpat/COPYING ./COPYING_cmexpat
install -d %{buildroot}%{_pkgdocdir}
cp -pr %{buildroot}%{_datadir}/cmake/Help %{buildroot}%{_pkgdocdir}
cp -p Utilities/cmcppdap/LICENSE LICENSE.cppdap
cp -p Utilities/cmcppdap/NOTICE NOTICE.cppdap
%if %{with cmake_gui}
%if 0%{?build_cross} == 0
desktop-file-install --delete-original \
--dir=%{buildroot}%{_datadir}/applications \
%{buildroot}%{_datadir}/applications/cmake-gui.desktop
%endif
install -d %{buildroot}%{_metainfodir}
%endif
find %{buildroot}%{_datadir}/cmake -type d | sed -e 's!^%{buildroot}!%%dir "!g' -e 's!$!"!g' > data_dirs.mf
find %{buildroot}%{_datadir}/cmake -type f | sed -e 's!^%{buildroot}!"!g' -e 's!$!"!g' > data_files.mf
@ -178,6 +230,7 @@ find %{buildroot}%{_bindir} -type f -or -type l -or -xtype l | \
#export NO_TEST="CMake.FileDownload|CTestTestUpload|curl|RunCMake.CPack_RPM"
#bin/ctest -V -E "$NO_TEST" %{?_smp_mflags}
%if %{with cmake_gui}
%post gui
update-desktop-database &> /dev/null || :
touch --no-create %{_datadir}/mime || :
@ -195,27 +248,36 @@ fi
%posttrans gui
update-mime-database %{_datadir}/mime &> /dev/null || :
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%endif
%files -f lib_files.mf
%doc %dir %{_pkgdocdir}
%license Copyright_* COPYING* Copyright.txt
%license LICENSE.cppdap NOTICE.cppdap
%files data -f data_files.mf
%{_datadir}/aclocal/cmake.m4
%{_datadir}/bash-completion
%if %{with emacs}
%{_emacs_sitelispdir}/cmake
%{_emacs_sitelispdir}/cmake-mode.el
%{_emacs_sitestartdir}/cmake-init.el
%endif
%{_datadir}/vim/vimfiles/indent/%{name}.vim
%{_datadir}/vim/vimfiles//syntax/%{name}.vim
%{_datadir}/vim/vimfiles/syntax/%{name}.vim
%exclude %{_datadir}/cmake/Templates/Windows/Windows_TemporaryKey.pfx
%files filesystem -f data_dirs.mf -f lib_dirs.mf
%if %{with cmake_gui}
%files gui
%if 0%{?build_cross} == 0
%{_bindir}/cmake-gui
%{_datadir}/applications/cmake-gui.desktop
%{_datadir}/mime/packages
%{_datadir}/icons/hicolor/*/apps/CMake%{?name_suffix}Setup.png
%endif
%endif
%files rpm-macros
%{rpm_macros_dir}/macros.cmake
@ -230,12 +292,33 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_mandir}/man1/cpack.1.*
%{_mandir}/man1/ctest.1.*
%{_mandir}/man7/*.7.*
%if %{with cmake_gui}
%if 0%{?build_cross} == 0
%{_mandir}/man1/cmake-gui.1.*
%endif
%endif
%endif
%doc %{_pkgdocdir}
%exclude %{_pkgdocdir}/Copyright.txt
%changelog
* Thu Jan 23 2025 fuanan <fuanan3@h-partners.com> - 3.27.9-5
- remove the architecture judgment in the patches section;
- include all patches in the source package.
* Wed Jul 10 2024 fuanan <fuanan3@h-partners.com> - 3.27.9-4
- Add compilation options for i686.
- Support arrch64-ilp32 compilation.
* Fri Apr 5 2024 tiberium <jinzhe.oerv@isrc.iscas.ac.cn> 3.27.9-3
- fix cmake compile issue due to cxx standard check failed
* Fri Feb 2 2024 liyanan <liyanan61@h-partners.com> - 3.27.9-2
- Remove Windows_TemporaryKey.pfx
* Fri Jan 5 2024 liyanan <liyanan61@h-partners.com> - 3.27.9-1
- Update to 3.27.9
* Thu Dec 14 2023 liyanan <liyanan61@h-partners.com> - 3.24.3-2
- Fix abnormal empty link in cmake-data package

View File

@ -30,6 +30,9 @@
-DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\
%if "%{?_lib}" == "lib64" \
%{?_cmake_lib_suffix64} \\\
%endif \
%if "%{?_lib}" == "libilp32" \
-DLIB_SUFFIX=ilp32 \\\
%endif \
-DBUILD_SHARED_LIBS:BOOL=ON