Debian Codegraph @

lib/stack_protector/stack_protector.mk

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