Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions QuoteVerification/dcap_tvl/Makefile.standalone
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,7 @@ COMMON_LDFLAGS := -Wl,-z,relro,-z,now,-z,noexecstack
ifneq ($(DEBUG), 1)
COMMON_FLAGS += -ffunction-sections -fdata-sections
endif
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
Comment thread
bgotowal marked this conversation as resolved.

ENCLAVE_CFLAGS = -ffreestanding -nostdinc -fvisibility=hidden -fpie -fno-strict-overflow -fno-delete-null-pointer-checks
ENCLAVE_CXXFLAGS = $(ENCLAVE_CFLAGS) -nostdinc++
Expand Down
8 changes: 1 addition & 7 deletions SampleCode/QuoteAppraisalSample/QAEAppraisal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,7 @@ Crypto_Library_Name := sgx_tcrypto
Enclave_Cpp_Files := Enclave/Enclave.cpp
Enclave_Include_Paths := -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc

Enclave_C_Flags := $(Enclave_Include_Paths) -nostdinc -fvisibility=hidden -fpie -ffunction-sections -fdata-sections $(MITIGATION_CFLAGS)
CC_BELOW_4_9 := $(shell expr "`$(CC) -dumpversion`" \< "4.9")
ifeq ($(CC_BELOW_4_9), 1)
Enclave_C_Flags += -fstack-protector
else
Enclave_C_Flags += -fstack-protector-strong
endif
Enclave_C_Flags := $(Enclave_Include_Paths) -nostdinc -fvisibility=hidden -fpie -ffunction-sections -fdata-sections $(MITIGATION_CFLAGS) -fstack-protector-strong

Enclave_Cpp_Flags := $(Enclave_C_Flags) -std=c++11 -nostdinc++

Expand Down
7 changes: 1 addition & 6 deletions SampleCode/QuoteGenerationSample/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,7 @@ Crypto_Library_Name := sgx_tcrypto
Enclave_Cpp_Files := Enclave/Enclave.cpp
Enclave_Include_Paths := -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/libcxx

CC_BELOW_4_9 := $(shell expr "`$(CC) -dumpversion`" \< "4.9")
ifeq ($(CC_BELOW_4_9), 1)
Enclave_C_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -ffunction-sections -fdata-sections -fstack-protector
else
Enclave_C_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -ffunction-sections -fdata-sections -fstack-protector-strong
endif
Enclave_C_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -ffunction-sections -fdata-sections

@bgotowal bgotowal Mar 31, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @berrange! Just noticed, unfortunately post merging, that here we miss the -fstack-protector-strong added at the end.

I think we can fix it internally and push in the next release cycle as this is not critical here in the samples.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opps, sorry about that mess up.

Enclave_C_Flags += $(Enclave_Include_Paths)
Enclave_Cpp_Flags := $(Enclave_C_Flags) -std=c++11 -nostdinc++

Expand Down
8 changes: 1 addition & 7 deletions SampleCode/QuoteVerificationSample/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,7 @@ DCAP_DIR ?= ../../
Enclave_Cpp_Files := Enclave/Enclave.cpp
Enclave_Include_Paths := -IEnclave -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/libcxx

Enclave_C_Flags := $(Enclave_Include_Paths) -nostdinc -fvisibility=hidden -fpie -ffunction-sections -fdata-sections
CC_BELOW_4_9 := $(shell expr "`$(CC) -dumpversion`" \< "4.9")
ifeq ($(CC_BELOW_4_9), 1)
Enclave_C_Flags += -fstack-protector
else
Enclave_C_Flags += -fstack-protector-strong
endif
Enclave_C_Flags := $(Enclave_Include_Paths) -nostdinc -fvisibility=hidden -fpie -ffunction-sections -fdata-sections -fstack-protector-strong

Enclave_Cpp_Flags := $(Enclave_C_Flags) -nostdinc++

Expand Down
7 changes: 1 addition & 6 deletions ae/qae/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,7 @@ Enclave_Include_Paths := -I./ -I$(WARM_Top_Path)/core/iwasm/include \
-I$(DCAP_QV_DIR)/appraisal/common \
-I$(DCAP_QG_DIR)/common/inc/internal

CC_BELOW_4_9 := $(shell expr "`$(CC) -dumpversion`" \< "4.9")
ifeq ($(CC_BELOW_4_9), 1)
Enclave_Common_Flags := -fstack-protector
else
Enclave_Common_Flags := -fstack-protector-strong
endif
Enclave_Common_Flags := -fstack-protector-strong
Enclave_Common_Flags += -ffreestanding -fvisibility=hidden -fpie -ffunction-sections -fdata-sections $(Enclave_Include_Paths)
Enclave_Common_Flags += -DPICOJSON_USE_LOCALE=0 -DBUILD_QAE -DSGX_JWT

Expand Down
Loading