aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSimon South <simon@simonsouth.net>2019-10-20 13:54:32 -0400
committerSimon South <simon@simonsouth.net>2019-10-20 14:59:09 -0400
commit7af195e29a4213eefac0661d84e1c9c20476e166 (patch)
tree52b47bf5d12e9877e4ce937f7e0cd7ffcd36508c /lib
parent19adcb415c313d656324d54e7608cdc7d7a5c414 (diff)
downloadplatform_external_arm-trusted-firmware-7af195e29a4213eefac0661d84e1c9c20476e166.tar.gz
platform_external_arm-trusted-firmware-7af195e29a4213eefac0661d84e1c9c20476e166.tar.bz2
platform_external_arm-trusted-firmware-7af195e29a4213eefac0661d84e1c9c20476e166.zip
Disable stack protection explicitly
Explicitly disable stack protection via the "-fno-stack-protector" compiler option when the ENABLE_STACK_PROTECTOR build option is set to "none" (the default). This allows the build to complete without link errors on systems where stack protection is enabled by default in the compiler. Change-Id: I0a676aa672815235894fb2cd05fa2b196fabb972 Signed-off-by: Simon South <simon@simonsouth.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/stack_protector/stack_protector.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/stack_protector/stack_protector.mk b/lib/stack_protector/stack_protector.mk
index 94e804be9..b5aba1528 100644
--- a/lib/stack_protector/stack_protector.mk
+++ b/lib/stack_protector/stack_protector.mk
@@ -11,7 +11,9 @@ ifeq (${ENABLE_STACK_PROTECTOR},0)
ENABLE_STACK_PROTECTOR := none
endif
-ifneq (${ENABLE_STACK_PROTECTOR},none)
+ifeq (${ENABLE_STACK_PROTECTOR},none)
+ TF_CFLAGS += -fno-stack-protector
+else
STACK_PROTECTOR_ENABLED := 1
BL_COMMON_SOURCES += lib/stack_protector/stack_protector.c \
lib/stack_protector/${ARCH}/asm_stack_protector.S