diff --git a/0016-openmp-port-to-newer-cmake.patch b/0016-openmp-port-to-newer-cmake.patch new file mode 100644 index 0000000000000000000000000000000000000000..6169853692e2bcb2b5b33e00ecdba682adc44eaa --- /dev/null +++ b/0016-openmp-port-to-newer-cmake.patch @@ -0,0 +1,97 @@ +--- linux-sgx-sgx_2.19/external/openmp/openmp_code/final/CMakeLists.txt.orig 2025-03-06 12:43:44.319899486 +0800 ++++ linux-sgx-sgx_2.19/external/openmp/openmp_code/final/CMakeLists.txt 2025-03-06 12:43:53.814034321 +0800 +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 2.8 FATAL_ERROR) ++cmake_minimum_required(VERSION 3.12 FATAL_ERROR) + + add_compile_options(-fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2) + +--- linux-sgx-sgx_2.19/external/openmp/openmp_code/final/runtime/cmake/LibompCheckLinkerFlag.cmake.orig 2025-03-06 13:37:30.805871882 +0800 ++++ linux-sgx-sgx_2.19/external/openmp/openmp_code/final/runtime/cmake/LibompCheckLinkerFlag.cmake 2025-03-06 13:37:50.916160647 +0800 +@@ -18,7 +18,7 @@ + set(library_source + "int foo(int a) { return a*a; }") + set(cmake_source +- "cmake_minimum_required(VERSION 2.8) ++ "cmake_minimum_required(VERSION 2.8...${CMAKE_VERSION}) + project(foo C) + set(CMAKE_SHARED_LINKER_FLAGS \"${flag}\") + add_library(foo SHARED src_to_link.c)") +--- linux-sgx-sgx_2.19/external/openmp/openmp_code/final/cmake/OpenMPTesting.cmake.orig 2025-03-06 13:50:52.010376473 +0800 ++++ linux-sgx-sgx_2.19/external/openmp/openmp_code/final/cmake/OpenMPTesting.cmake 2025-03-06 13:51:20.913791502 +0800 +@@ -3,9 +3,9 @@ + + # Function to find required dependencies for testing. + function(find_standalone_test_dependencies) +- include(FindPythonInterp) ++ include(FindPython) + +- if (NOT PYTHONINTERP_FOUND) ++ if (NOT Python_FOUND) + message(STATUS "Could not find Python.") + message(WARNING "The check targets will not be available!") + set(ENABLE_CHECK_TARGETS FALSE PARENT_SCOPE) +@@ -158,7 +158,7 @@ + if (${OPENMP_STANDALONE_BUILD}) + set(LIT_ARGS ${OPENMP_LIT_ARGS} ${ARG_ARGS}) + add_custom_target(${target} +- COMMAND ${PYTHON_EXECUTABLE} ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS} ++ COMMAND ${Python_EXECUTABLE} ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS} + COMMENT ${comment} + DEPENDS ${ARG_DEPENDS} + ${cmake_3_2_USES_TERMINAL} +--- linux-sgx-sgx_2.19/external/CppMicroServices/CMakeLists.txt.orig 2025-08-25 12:25:52.079258747 +0800 ++++ linux-sgx-sgx_2.19/external/CppMicroServices/CMakeLists.txt 2025-08-25 12:26:01.538154745 +0800 +@@ -1,7 +1,7 @@ + # Extract the current version from the VERSION file + file(STRINGS VERSION _version LIMIT_COUNT 1) + +-set(US_CMAKE_MINIMUM_REQUIRED_VERSION 3.2) ++set(US_CMAKE_MINIMUM_REQUIRED_VERSION 3.2...${CMAKE_VERSION}) + + cmake_minimum_required(VERSION ${US_CMAKE_MINIMUM_REQUIRED_VERSION}) + +--- linux-sgx-sgx_2.19/external/dnnl/dnnl/examples/CMakeLists.txt.in.orig 2025-08-25 12:27:43.170037284 +0800 ++++ linux-sgx-sgx_2.19/external/dnnl/dnnl/examples/CMakeLists.txt.in 2025-08-25 12:27:50.679954709 +0800 +@@ -14,7 +14,7 @@ + # limitations under the License. + #=============================================================================== + +-cmake_minimum_required(VERSION 2.8.12) ++cmake_minimum_required(VERSION 2.8.12...${CMAKE_VERSION}) + + if("${CMAKE_BUILD_TYPE}" STREQUAL "") + message(STATUS "CMAKE_BUILD_TYPE is unset, defaulting to Release") +--- linux-sgx-sgx_2.19/external/dnnl/dnnl/tests/other/subproject/CMakeLists.txt.orig 2025-08-25 12:28:00.833843066 +0800 ++++ linux-sgx-sgx_2.19/external/dnnl/dnnl/tests/other/subproject/CMakeLists.txt 2025-08-25 12:28:09.544747290 +0800 +@@ -20,7 +20,7 @@ + # To test run: + # mkdir -p build && cd build && cmake .. && make -j && ./project_app + +-cmake_minimum_required(VERSION 2.8.12) ++cmake_minimum_required(VERSION 2.8.12...${CMAKE_VERSION}) + + set(PROJECT_NAME "Project") + +--- linux-sgx-sgx_2.19/external/dnnl/dnnl/CMakeLists.txt.orig 2025-08-25 12:27:15.304343670 +0800 ++++ linux-sgx-sgx_2.19/external/dnnl/dnnl/CMakeLists.txt 2025-08-25 12:27:24.799239274 +0800 +@@ -14,7 +14,7 @@ + # limitations under the License. + #=============================================================================== + +-cmake_minimum_required(VERSION 2.8.12) ++cmake_minimum_required(VERSION 2.8.12...${CMAKE_VERSION}) + + if(POLICY CMP0022) + cmake_policy(SET CMP0022 NEW) +--- linux-sgx-sgx_2.19/psw/ae/aesm_service/source/CMakeLists.txt.orig 2025-08-25 12:56:06.209246728 +0800 ++++ linux-sgx-sgx_2.19/psw/ae/aesm_service/source/CMakeLists.txt 2025-08-25 12:56:15.880139441 +0800 +@@ -30,7 +30,7 @@ + # + + # [proj-begin] +-cmake_minimum_required(VERSION 3.0.0) ++cmake_minimum_required(VERSION 3.0.0...${CMAKE_VERSION}) + project(ModularAESM VERSION 0.1.0) + + diff --git a/linux-sgx.spec b/linux-sgx.spec index 17732a5265ac1fe48b3e53d79b9f51573cc9e774..fffa4cfac55bac6c4015211de4aa26500953a749 100644 --- a/linux-sgx.spec +++ b/linux-sgx.spec @@ -1,6 +1,6 @@ Name: linux-sgx Version: 2.19 -Release: 7 +Release: 8 Summary: Intel(R) Software Guard Extensions for Linux* OS ExclusiveArch: x86_64 License: BSD-3-Clause @@ -41,6 +41,7 @@ Patch12: backport-CVE-2023-3817-DH_check-Do-not-try-checking-q-properties Patch13: backport-CVE-2023-5678-Make-DH_check_pub_key-and-DH_generate_key-safer-yet.patch Patch14: backport-CVE-2024-5535-Fix-SSL_select_next_proto-and-add-ALPN.patch Patch15: backport-Linux-2_22-Open-Source-Gold-Release.patch +Patch16: 0016-openmp-port-to-newer-cmake.patch BuildRequires: gcc-c++ protobuf-devel libtool ocaml ocaml-ocamlbuild compat-openssl11-devel cmake python curl-devel createrepo_c git nasm BuildRequires: protobuf-lite-devel protobuf-c-devel boost-devel @@ -880,6 +881,9 @@ if [ -x /opt/intel/sgx-dcap-pccs/startup.sh ]; then /opt/intel/sgx-dcap-pccs/sta %files -n libsgx-headers -f %{LINUX_INSTALLER_RPM_DIR}/libsgx-headers/build/list-libsgx-headers %changelog +* Mon Aug 25 2025 Funda Wang - 2.19-8 +- support building with cmake 4.0 + * Mon Aug 4 2025 zhengxiaoxiao - 2.19-7 - adapt ocaml 5.0