1 # 2 # Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. 3 # 4 # SPDX-License-Identifier: BSD-3-Clause 5 # 6 7 # Boolean macro to be used in C code 8 STACK_PROTECTOR_ENABLED := 0 9 10 ifneq (${ENABLE_STACK_PROTECTOR},0) 11 STACK_PROTECTOR_ENABLED := 1 12 BL_COMMON_SOURCES += lib/stack_protector/stack_protector.c \ 13 lib/stack_protector/${ARCH}/asm_stack_protector.S 14 15 TF_CFLAGS += -fstack-protector-${ENABLE_STACK_PROTECTOR} 16 endif 17 18 $(eval $(call add_define,STACK_PROTECTOR_ENABLED)) 19 20