diff --git a/0007-repair-ci.patch b/0007-repair-ci.patch new file mode 100644 index 0000000000000000000000000000000000000000..4788f35e4cb28ec3e6e566a91293c248b85abe62 --- /dev/null +++ b/0007-repair-ci.patch @@ -0,0 +1,192 @@ +From 6d598943c60b7d65b80f8e65eeafa80498b96faf Mon Sep 17 00:00:00 2001 +From: qsw333 +Date: Mon, 19 Feb 2024 10:19:57 +0800 +Subject: [PATCH] repair ci + +--- + SampleCode/Cxx14SGXDemo/Makefile | 2 +- + SampleCode/Cxx17SGXDemo/Makefile | 2 +- + buildenv.mk | 3 +-- + external/dcap_source/QuoteGeneration/buildenv.mk | 2 -- + external/dcap_source/QuoteVerification/QVL/Src/CMakeLists.txt | 1 - + external/dcap_source/QuoteVerification/QvE/Makefile | 2 +- + external/dcap_source/QuoteVerification/buildenv.mk | 2 +- + .../tools/PCKCertSelection/PCKCertSelectionLib/Makefile | 2 +- + .../tools/PCKCertSelection/PCKSelectionSample/Makefile | 2 +- + external/dnnl/dnnl/cmake/host_compiler.cmake | 2 +- + .../protobuf_code/kokoro/release/protoc/macos/build.sh | 2 +- + .../protobuf_code/kokoro/release/python/macos/config.sh | 2 +- + psw/ae/buildenv.mk | 1 + + 13 files changed, 11 insertions(+), 14 deletions(-) + +diff --git a/SampleCode/Cxx14SGXDemo/Makefile b/SampleCode/Cxx14SGXDemo/Makefile +index e0bfba4..4f86204 100644 +--- a/SampleCode/Cxx14SGXDemo/Makefile ++++ b/SampleCode/Cxx14SGXDemo/Makefile +@@ -71,7 +71,7 @@ SGX_COMMON_FLAGS += -Wall -Wextra -Winit-self -Wpointer-arith -Wreturn-type \ + -Wmissing-include-dirs -Wfloat-equal -Wundef -Wshadow \ + -Wcast-align -Wcast-qual -Wconversion -Wredundant-decls + SGX_COMMON_CFLAGS := $(SGX_COMMON_FLAGS) -Wjump-misses-init -Wstrict-prototypes -Wunsuffixed-float-constants +-SGX_COMMON_CXXFLAGS := $(SGX_COMMON_FLAGS) -Wnon-virtual-dtor -std=c++14 ++SGX_COMMON_CXXFLAGS := $(SGX_COMMON_FLAGS) -Wnon-virtual-dtor + + ######## App Settings ######## + +diff --git a/SampleCode/Cxx17SGXDemo/Makefile b/SampleCode/Cxx17SGXDemo/Makefile +index e377266..f4b2e8f 100644 +--- a/SampleCode/Cxx17SGXDemo/Makefile ++++ b/SampleCode/Cxx17SGXDemo/Makefile +@@ -71,7 +71,7 @@ SGX_COMMON_FLAGS += -Wall -Wextra -Winit-self -Wpointer-arith -Wreturn-type \ + -Wmissing-include-dirs -Wfloat-equal -Wundef -Wshadow \ + -Wcast-align -Wcast-qual -Wconversion -Wredundant-decls + SGX_COMMON_CFLAGS := $(SGX_COMMON_FLAGS) -Wjump-misses-init -Wstrict-prototypes -Wunsuffixed-float-constants +-SGX_COMMON_CXXFLAGS := $(SGX_COMMON_FLAGS) -Wnon-virtual-dtor -std=c++17 ++SGX_COMMON_CXXFLAGS := $(SGX_COMMON_FLAGS) -Wnon-virtual-dtor + + ######## App Settings ######## + +diff --git a/buildenv.mk b/buildenv.mk +index 4b68593..02f8ee5 100644 +--- a/buildenv.mk ++++ b/buildenv.mk +@@ -133,8 +133,7 @@ CFLAGS += -Wjump-misses-init -Wstrict-prototypes -Wunsuffixed-float-constants + + # additional warnings flags for C++ + CXXFLAGS += -Wnon-virtual-dtor +- +-CXXFLAGS += -std=c++17 ++CXXFLAGS := $(CXXFLAGS) -Wno-stringop-overread + + .DEFAULT_GOAL := all + # this turns off the RCS / SCCS implicit rules of GNU Make +diff --git a/external/dcap_source/QuoteGeneration/buildenv.mk b/external/dcap_source/QuoteGeneration/buildenv.mk +index 7a205a7..65bff94 100644 +--- a/external/dcap_source/QuoteGeneration/buildenv.mk ++++ b/external/dcap_source/QuoteGeneration/buildenv.mk +@@ -132,8 +132,6 @@ CFLAGS += -Wjump-misses-init -Wstrict-prototypes -Wunsuffixed-float-constants + # additional warnings flags for C++ + CXXFLAGS += -Wnon-virtual-dtor + +-CXXFLAGS += -std=c++14 +- + .DEFAULT_GOAL := all + # this turns off the RCS / SCCS implicit rules of GNU Make + % : RCS/%,v +diff --git a/external/dcap_source/QuoteVerification/QVL/Src/CMakeLists.txt b/external/dcap_source/QuoteVerification/QVL/Src/CMakeLists.txt +index abcf8ba..954de2e 100644 +--- a/external/dcap_source/QuoteVerification/QVL/Src/CMakeLists.txt ++++ b/external/dcap_source/QuoteVerification/QVL/Src/CMakeLists.txt +@@ -240,7 +240,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU + endif() + set(CMAKE_CXX_FLAGS + "${CMAKE_C_FLAGS}" +- "-std=c++14" #currently used C++ standard + "-Wnon-virtual-dtor" + "${CMAKE_CXX_FLAGS_CLANG}" + "${CMAKE_CXX_FLAGS_GCC}" +diff --git a/external/dcap_source/QuoteVerification/QvE/Makefile b/external/dcap_source/QuoteVerification/QvE/Makefile +index d89dbe3..45c04ba 100644 +--- a/external/dcap_source/QuoteVerification/QvE/Makefile ++++ b/external/dcap_source/QuoteVerification/QvE/Makefile +@@ -79,7 +79,7 @@ else + ENCLAVE_CFLAGS += -fstack-protector-strong + endif + +-ENCLAVE_CXXFLAGS += $(ENCLAVE_CFLAGS) -std=c++14 -DSGX_TRUSTED ++ENCLAVE_CXXFLAGS += $(ENCLAVE_CFLAGS) -DSGX_TRUSTED + + + ENCLAVE_LDFLAGS := -Wl,-z,relro,-z,now,-z,noexecstack -fPIC \ +diff --git a/external/dcap_source/QuoteVerification/buildenv.mk b/external/dcap_source/QuoteVerification/buildenv.mk +index 75d89ed..b8546fd 100644 +--- a/external/dcap_source/QuoteVerification/buildenv.mk ++++ b/external/dcap_source/QuoteVerification/buildenv.mk +@@ -58,7 +58,7 @@ SGXSSL_PACKAGE_PATH ?= $(DCAP_QV_DIR)/sgxssl/Linux/package + PREBUILD_OPENSSL_PATH ?= $(DCAP_QV_DIR)/../prebuilt/openssl + + SGX_COMMON_CFLAGS := $(COMMON_FLAGS) -m64 -Wjump-misses-init -Wstrict-prototypes -Wunsuffixed-float-constants +-SGX_COMMON_CXXFLAGS := $(COMMON_FLAGS) -m64 -Wnon-virtual-dtor -std=c++14 ++SGX_COMMON_CXXFLAGS := $(COMMON_FLAGS) -m64 -Wnon-virtual-dtor + + + QVL_LIB_PATH := $(QVL_SRC_PATH)/AttestationLibrary +diff --git a/external/dcap_source/tools/PCKCertSelection/PCKCertSelectionLib/Makefile b/external/dcap_source/tools/PCKCertSelection/PCKCertSelectionLib/Makefile +index 3c20fd6..87c7fe9 100644 +--- a/external/dcap_source/tools/PCKCertSelection/PCKCertSelectionLib/Makefile ++++ b/external/dcap_source/tools/PCKCertSelection/PCKCertSelectionLib/Makefile +@@ -147,7 +147,7 @@ else + endif + + # c++ flags +-CPP_FLAGS := $(C_FLAGS) -std=c++14 ++CPP_FLAGS := $(C_FLAGS) + + + ####### Build Targets ############## +diff --git a/external/dcap_source/tools/PCKCertSelection/PCKSelectionSample/Makefile b/external/dcap_source/tools/PCKCertSelection/PCKSelectionSample/Makefile +index 19019f5..270ed26 100644 +--- a/external/dcap_source/tools/PCKCertSelection/PCKSelectionSample/Makefile ++++ b/external/dcap_source/tools/PCKCertSelection/PCKSelectionSample/Makefile +@@ -90,7 +90,7 @@ else + endif + + # c++ flags +-CPP_FLAGS := $(C_FLAGS) -std=c++14 ++CPP_FLAGS := $(C_FLAGS) + + + ####### Build Targets ############## +diff --git a/external/dnnl/dnnl/cmake/host_compiler.cmake b/external/dnnl/dnnl/cmake/host_compiler.cmake +index 097f43d..74c796b 100644 +--- a/external/dnnl/dnnl/cmake/host_compiler.cmake ++++ b/external/dnnl/dnnl/cmake/host_compiler.cmake +@@ -49,7 +49,7 @@ if(DNNL_DPCPP_HOST_COMPILER MATCHES "g\\+\\+") + # for host compiler. + # The main compiler driver doesn't automatically specify C++ standard for + # custom host compilers. +- append(DPCPP_HOST_COMPILER_OPTS "-std=c++17") ++ # append(DPCPP_HOST_COMPILER_OPTS "-std=c++17") + + # Unconditionally enable OpenMP during compilation to use `#pragma omp simd` + append(DPCPP_HOST_COMPILER_OPTS "-fopenmp") +diff --git a/external/protobuf/protobuf_code/kokoro/release/protoc/macos/build.sh b/external/protobuf/protobuf_code/kokoro/release/protoc/macos/build.sh +index 47c9bfa..4869133 100644 +--- a/external/protobuf/protobuf_code/kokoro/release/protoc/macos/build.sh ++++ b/external/protobuf/protobuf_code/kokoro/release/protoc/macos/build.sh +@@ -1,7 +1,7 @@ + #!/bin/bash + + set -ex +-CXXFLAGS_COMMON="-std=c++14 -DNDEBUG -mmacosx-version-min=10.9" ++CXXFLAGS_COMMON="-DNDEBUG -mmacosx-version-min=10.9" + + cd github/protobuf + ./autogen.sh +diff --git a/external/protobuf/protobuf_code/kokoro/release/python/macos/config.sh b/external/protobuf/protobuf_code/kokoro/release/python/macos/config.sh +index 1b0a302..022e7ca 100644 +--- a/external/protobuf/protobuf_code/kokoro/release/python/macos/config.sh ++++ b/external/protobuf/protobuf_code/kokoro/release/python/macos/config.sh +@@ -29,7 +29,7 @@ function pre_build { + ./autogen.sh + ./configure + +- CXXFLAGS="-std=c++14 -fPIC -g -O2" ./configure ++ CXXFLAGS="-fPIC -g -O2" ./configure + make -j8 + + # Generate python dependencies. +diff --git a/psw/ae/buildenv.mk b/psw/ae/buildenv.mk +index c92cc93..d28b634 100644 +--- a/psw/ae/buildenv.mk ++++ b/psw/ae/buildenv.mk +@@ -72,6 +72,7 @@ SGXSIGN := $(SGX_BIN_DIR)/sgx_sign + EDGER8R := $(SGX_BIN_DIR)/sgx_edger8r + + CXXFLAGS += $(ENCLAVE_CXXFLAGS) ++CXXFLAGS := $(CXXFLAGS) -Wno-stringop-overread + CFLAGS += $(ENCLAVE_CFLAGS) + + LDTFLAGS = -L$(SGX_LIB_DIR) -Wl,--whole-archive $(TRTSLIB) -Wl,--no-whole-archive \ +-- +2.42.0.windows.2 + diff --git a/0008-test-ci.patch b/0008-test-ci.patch new file mode 100644 index 0000000000000000000000000000000000000000..47e20e8bf4c0906b20467d2c7d89772ec099cd91 --- /dev/null +++ b/0008-test-ci.patch @@ -0,0 +1,25 @@ +From aab09d4b2745933719743ad115ce7cea9a9da681 Mon Sep 17 00:00:00 2001 +From: qsw333 +Date: Mon, 19 Feb 2024 22:34:26 +0800 +Subject: [PATCH] test ci + +--- + psw/ae/aesm_service/Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/psw/ae/aesm_service/Makefile b/psw/ae/aesm_service/Makefile +index cca9e50..f614b11 100644 +--- a/psw/ae/aesm_service/Makefile ++++ b/psw/ae/aesm_service/Makefile +@@ -59,6 +59,8 @@ endif + + CXXFLAGS += -fpie + CFLAGS += -fpie ++CXXFLAGS := $(subst -fcf-protection,,$(CXXFLAGS)) ++CFLAGS := $(subst -fcf-protection,,$(CFLAGS)) + CFLAGS := $(filter-out -Werror, $(CFLAGS)) + + WHITE_LIST_FILE := $(LINUX_PSW_DIR)/ae/data/prebuilt/white_list_cert_to_be_verify.bin +-- +2.42.0.windows.2 + diff --git a/linux-sgx.spec b/linux-sgx.spec index d872d295a8d1da3421030119b1f822fdf921762a..6d47431ab0accdc797fc7b8f2d27da62741062c2 100644 --- a/linux-sgx.spec +++ b/linux-sgx.spec @@ -31,6 +31,7 @@ Patch2: 0003-add-secure-compilation-options.patch Patch3: 0004-adapt-openssl-CVE.patch Patch4: 0005-DCAP-disabling-the-rpatch-option.patch Patch5: 0006-fix-build-error.patch +Patch6: 0008-test-ci.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 @@ -869,7 +870,7 @@ if [ -x /opt/intel/sgx-dcap-pccs/startup.sh ]; then /opt/intel/sgx-dcap-pccs/sta %changelog * Thu Aug 10 2023 zhoushuiqing - 2.19-2 -- Keep in sync with the version number of intel-sgx-ssl. +- Keep in sync with the version number of intel-sgx-ssl * Sat Jul 22 2023 zhoushuiqing - 2.19-1 - Upgrade to 2.19