From a5e35c922b40a634b3d7b01d92724b86df20758f Mon Sep 17 00:00:00 2001 From: wangyu Date: Fri, 9 Sep 2022 10:09:37 +0800 Subject: [PATCH] DCAP disabling the rpatch option --- .../QuoteGeneration/buildenv.mk | 7 +------ .../QuoteGeneration/quote_wrapper/ql/linux/Makefile | 2 +- .../tools/PCKCertSelection/PCKSelectionSample/Makefile | 2 +- .../tools/PCKRetrievalTool/Makefile | 2 +- .../tools/PCKRetrievalTool/Qpl/linux/Makefile | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/QuoteGeneration/buildenv.mk b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/QuoteGeneration/buildenv.mk index 8c87626e..f05ccdaf 100644 --- a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/QuoteGeneration/buildenv.mk +++ b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/QuoteGeneration/buildenv.mk @@ -97,12 +97,7 @@ INCLUDE := CUR_DIR := $(realpath $(call parent-dir,$(lastword $(wordlist 2,$(words $(MAKEFILE_LIST)),x $(MAKEFILE_LIST))))) # turn on stack protector for SDK -CC_BELOW_4_9 := $(shell expr "`$(CC) -dumpversion`" \< "4.9") -ifeq ($(CC_BELOW_4_9), 1) - COMMON_FLAGS += -fstack-protector -else - COMMON_FLAGS += -fstack-protector-strong -endif +COMMON_FLAGS += -fstack-protector-strong ifdef DEBUG COMMON_FLAGS += -O0 -ggdb -DDEBUG -UNDEBUG diff --git a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/QuoteGeneration/quote_wrapper/ql/linux/Makefile b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/QuoteGeneration/quote_wrapper/ql/linux/Makefile index 3dde7a10..30009c2d 100644 --- a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/QuoteGeneration/quote_wrapper/ql/linux/Makefile +++ b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/QuoteGeneration/quote_wrapper/ql/linux/Makefile @@ -51,7 +51,7 @@ QL_Lib_Include_Paths += -I../../quote/inc -I../../../pce_wrapper/inc -I../inc QL_Lib_C_Flags := $(COMMON_FLAGS) -g -fPIC -Wno-attributes $(QL_Lib_Include_Paths) LDUFLAGS:= -pthread $(COMMON_LDFLAGS) -LDUFLAGS += -Wl,--version-script=dcap_ql_wrapper.lds -Wl,--gc-sections -Wl,-rpath=. +LDUFLAGS += -Wl,--version-script=dcap_ql_wrapper.lds -Wl,--gc-sections QL_Lib_Cpp_Flags := $(QL_Lib_C_Flags) -std=c++11 QL_Lib_Link_Flags := $(SGX_COMMON_FLAGS) -g -L$(Quote_Library_Dir) -lsgx_qe3_logic -L$(PCE_Library_Dir) -lsgx_pce_logic -L$(TOP_DIR)/build/linux -L$(SGX_SDK)/lib64 -lpthread -ldl diff --git a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/tools/PCKCertSelection/PCKSelectionSample/Makefile b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/tools/PCKCertSelection/PCKSelectionSample/Makefile index 2068554b..da3d3bea 100644 --- a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/tools/PCKCertSelection/PCKSelectionSample/Makefile +++ b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/tools/PCKCertSelection/PCKSelectionSample/Makefile @@ -79,7 +79,7 @@ C_FLAGS:= -DLINUX -fPIC -Werror $(APP_INCLUDE_PATHS) # link flags, link CPUSVNCompare library LINK_FLAGS := -Wl,-rpath,${ORIGIN} -L$(BIN_DIR) -l$(LIB_NAME) -LINK_FLAGS := -Wl,-rpath=. -L$(BIN_DIR) -l$(LIB_NAME) +LINK_FLAGS := -L$(BIN_DIR) -l$(LIB_NAME) # debug/release switch ifeq ($(DEBUG), 1) diff --git a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/tools/PCKRetrievalTool/Makefile b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/tools/PCKRetrievalTool/Makefile index 4596ee9c..116db7d2 100644 --- a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/tools/PCKRetrievalTool/Makefile +++ b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/tools/PCKRetrievalTool/Makefile @@ -104,7 +104,7 @@ App_C_Flags := $(COMMON_FLAGS) -fPIC -Wno-attributes $(App_Include_Paths) App_Cpp_Flags := $(App_C_Flags) -std=c++11 App_Link_Flags := $(SGX_COMMON_CFLAGS) -Wl,-z,relro,-z,now,-z,noexecstack -App_Link_Flags += -lcurl -ldl -lpthread -Wl,-rpath=. +App_Link_Flags += -lcurl -ldl -lpthread App_Cpp_Objects := $(App_Cpp_Files:.cpp=.o) diff --git a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/tools/PCKRetrievalTool/Qpl/linux/Makefile b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/tools/PCKRetrievalTool/Qpl/linux/Makefile index b046d726..551a133f 100644 --- a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/tools/PCKRetrievalTool/Qpl/linux/Makefile +++ b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.12.1/tools/PCKRetrievalTool/Qpl/linux/Makefile @@ -91,7 +91,7 @@ LDUFLAGS += -Wl,--gc-sections QPL_Lib_Cpp_Flags := $(QPL_Lib_C_Flags) -std=c++11 -QPL_Lib_Link_Flags := $(SGX_COMMON_FLAGS) -L$(SGX_SDK)/lib64 -lpthread -ldl -Wl,-rpath=. +QPL_Lib_Link_Flags := $(SGX_COMMON_FLAGS) -L$(SGX_SDK)/lib64 -lpthread -ldl QPL_Lib_Cpp_Objects := $(QPL_Lib_Cpp_Files:.cpp=.o) -- 2.33.0