diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-11-19 11:48:30 +0000 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-11-19 11:48:30 +0000 |
commit | 9c6d1c5070e1aee1376f7cd6c1eb6a4c35895305 (patch) | |
tree | 7522358aac22cc4589fcd5299d303e1dd0f90448 /Makefile | |
parent | cabe0a31801e99e7abb84d2114ded6bb56f3c71e (diff) | |
download | trusted-firmware-a-9c6d1c5070e1aee1376f7cd6c1eb6a4c35895305.tar.gz |
backtrace: Extract rules from root Makefile
It's better to have them in a separate file instead of having them spread
across the Makefile. This is what the stack protector is already doing.
Change-Id: Id30742c0af10de5ea6d10674ca25bf52b0f2b262
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 29 |
1 files changed, 2 insertions, 27 deletions
@@ -108,13 +108,6 @@ else LOG_LEVEL := 20 endif -# Enable backtrace by default in DEBUG AArch64 builds -ifeq (${ARCH},aarch32) - ENABLE_BACKTRACE := 0 -else - ENABLE_BACKTRACE := ${DEBUG} -endif - # Default build string (git branch and commit) ifeq (${BUILD_STRING},) BUILD_STRING := $(shell git describe --always --dirty --tags 2> /dev/null) @@ -206,11 +199,6 @@ TF_CFLAGS += $(CPPFLAGS) $(TF_CFLAGS_$(ARCH)) \ GCC_V_OUTPUT := $(shell $(CC) -v 2>&1) -# Force the compiler to include the frame pointer -ifeq (${ENABLE_BACKTRACE},1) -TF_CFLAGS += -fno-omit-frame-pointer -endif - TF_LDFLAGS += --fatal-warnings -O1 TF_LDFLAGS += --gc-sections TF_LDFLAGS += $(TF_LDFLAGS_$(ARCH)) @@ -238,10 +226,6 @@ ifeq ($(notdir $(CC)),armclang) BL_COMMON_SOURCES += lib/${ARCH}/armclang_printf.S endif -ifeq (${ENABLE_BACKTRACE},1) -BL_COMMON_SOURCES += common/backtrace.c -endif - INCLUDES += -Iinclude \ -Iinclude/bl1 \ -Iinclude/bl2 \ @@ -270,6 +254,8 @@ INCLUDES += -Iinclude \ ${SPD_INCLUDES} \ -Iinclude/tools_share +include common/backtrace/backtrace.mk + ################################################################################ # Generic definitions ################################################################################ @@ -369,15 +355,6 @@ endif # Check incompatible options ################################################################################ -ifeq (${ARCH},aarch32) - ifeq (${ENABLE_BACKTRACE},1) - ifneq (${AARCH32_INSTRUCTION_SET},A32) - $(error Error: AARCH32_INSTRUCTION_SET=A32 is needed \ - for ENABLE_BACKTRACE when compiling for AArch32.) - endif - endif -endif - ifdef EL3_PAYLOAD_BASE ifdef PRELOADED_BL33_BASE $(warning "PRELOADED_BL33_BASE and EL3_PAYLOAD_BASE are \ @@ -568,7 +545,6 @@ $(eval $(call assert_boolean,DYN_DISABLE_AUTH)) $(eval $(call assert_boolean,EL3_EXCEPTION_HANDLING)) $(eval $(call assert_boolean,ENABLE_AMU)) $(eval $(call assert_boolean,ENABLE_ASSERTIONS)) -$(eval $(call assert_boolean,ENABLE_BACKTRACE)) $(eval $(call assert_boolean,ENABLE_MPAM_FOR_LOWER_ELS)) $(eval $(call assert_boolean,ENABLE_PIE)) $(eval $(call assert_boolean,ENABLE_PMF)) @@ -619,7 +595,6 @@ $(eval $(call add_define,CTX_INCLUDE_FPREGS)) $(eval $(call add_define,EL3_EXCEPTION_HANDLING)) $(eval $(call add_define,ENABLE_AMU)) $(eval $(call add_define,ENABLE_ASSERTIONS)) -$(eval $(call add_define,ENABLE_BACKTRACE)) $(eval $(call add_define,ENABLE_MPAM_FOR_LOWER_ELS)) $(eval $(call add_define,ENABLE_PIE)) $(eval $(call add_define,ENABLE_PMF)) |