1# 2# Copyright (c) 2017-2019, 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 8STACK_PROTECTOR_ENABLED := 0 9 10ifeq (${ENABLE_STACK_PROTECTOR},0) 11 ENABLE_STACK_PROTECTOR := none 12endif 13 14ifneq (${ENABLE_STACK_PROTECTOR},none) 15 STACK_PROTECTOR_ENABLED := 1 16 BL_COMMON_SOURCES += lib/stack_protector/stack_protector.c \ 17 lib/stack_protector/${ARCH}/asm_stack_protector.S 18 19 ifeq (${ENABLE_STACK_PROTECTOR},default) 20 TF_CFLAGS += -fstack-protector 21 else 22 TF_CFLAGS += -fstack-protector-${ENABLE_STACK_PROTECTOR} 23 endif 24endif 25 26$(eval $(call add_define,STACK_PROTECTOR_ENABLED)) 27