diff options
author | Soby Mathew <soby.mathew@arm.com> | 2019-04-30 15:43:21 +0000 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2019-04-30 15:43:21 +0000 |
commit | 29162843779552d3d28878cd8031bc032cba421e (patch) | |
tree | e04b0eec7789b7d7ac718202752ca393ff46f191 /lib | |
parent | 19b4f689c6f58cb2da9377bcec32c79a97d3fb73 (diff) | |
parent | 2a3c645b40ebb5149f6e043babccd95469867030 (diff) |
Merge changes from topic "lm/stack_protector" into integration
* changes:
juno: Add security sources for tsp-juno
Add support for default stack-protector flag
Diffstat (limited to 'lib')
-rw-r--r-- | lib/stack_protector/stack_protector.mk | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/stack_protector/stack_protector.mk b/lib/stack_protector/stack_protector.mk index 0f0d90fb..94e804be 100644 --- a/lib/stack_protector/stack_protector.mk +++ b/lib/stack_protector/stack_protector.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -7,13 +7,20 @@ # Boolean macro to be used in C code STACK_PROTECTOR_ENABLED := 0 -ifneq (${ENABLE_STACK_PROTECTOR},0) -STACK_PROTECTOR_ENABLED := 1 -BL_COMMON_SOURCES += lib/stack_protector/stack_protector.c \ +ifeq (${ENABLE_STACK_PROTECTOR},0) + ENABLE_STACK_PROTECTOR := none +endif + +ifneq (${ENABLE_STACK_PROTECTOR},none) + STACK_PROTECTOR_ENABLED := 1 + BL_COMMON_SOURCES += lib/stack_protector/stack_protector.c \ lib/stack_protector/${ARCH}/asm_stack_protector.S -TF_CFLAGS += -fstack-protector-${ENABLE_STACK_PROTECTOR} + ifeq (${ENABLE_STACK_PROTECTOR},default) + TF_CFLAGS += -fstack-protector + else + TF_CFLAGS += -fstack-protector-${ENABLE_STACK_PROTECTOR} + endif endif $(eval $(call add_define,STACK_PROTECTOR_ENABLED)) - |