blob: 0f0d90fb8aac0874a026bebb863abf241c6e4e8a [file] [log] [blame]
Douglas Raillard306593d2017-02-24 18:14:15 +00001#
2# Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
3#
dp-armfa3cf0b2017-05-03 09:38:09 +01004# SPDX-License-Identifier: BSD-3-Clause
Douglas Raillard306593d2017-02-24 18:14:15 +00005#
6
7# Boolean macro to be used in C code
8STACK_PROTECTOR_ENABLED := 0
9
10ifneq (${ENABLE_STACK_PROTECTOR},0)
11STACK_PROTECTOR_ENABLED := 1
12BL_COMMON_SOURCES += lib/stack_protector/stack_protector.c \
13 lib/stack_protector/${ARCH}/asm_stack_protector.S
14
15TF_CFLAGS += -fstack-protector-${ENABLE_STACK_PROTECTOR}
16endif
17
18$(eval $(call add_define,STACK_PROTECTOR_ENABLED))
19