backtrace.mk 880 B

12345678910111213141516171819202122232425262728293031
  1. #
  2. # Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. # Enable backtrace by default in DEBUG AArch64 builds
  7. ifeq (${ARCH},aarch32)
  8. ENABLE_BACKTRACE := 0
  9. else
  10. ENABLE_BACKTRACE := ${DEBUG}
  11. endif
  12. ifeq (${ENABLE_BACKTRACE},1)
  13. # Force the compiler to include the frame pointer
  14. TF_CFLAGS += -fno-omit-frame-pointer
  15. BL_COMMON_SOURCES += common/backtrace/backtrace.c
  16. endif
  17. ifeq (${ARCH},aarch32)
  18. ifeq (${ENABLE_BACKTRACE},1)
  19. ifneq (${AARCH32_INSTRUCTION_SET},A32)
  20. $(error Error: AARCH32_INSTRUCTION_SET=A32 is needed \
  21. for ENABLE_BACKTRACE when compiling for AArch32.)
  22. endif
  23. endif
  24. endif
  25. $(eval $(call assert_boolean,ENABLE_BACKTRACE))
  26. $(eval $(call add_define,ENABLE_BACKTRACE))