summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-01-08 18:15:23 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2022-01-12 11:22:27 +0100
commit66d4822838e6a50c748f54cc854186fd3fcfbfe5 (patch)
tree75e0d7e6659b2c2ad0f73fae7890cada904e63a8 /Makefile
parentadf6e47b69d8d8d5a18748afb830320704dee50b (diff)
downloadbarebox-66d4822838e6a50c748f54cc854186fd3fcfbfe5.tar.gz
barebox-66d4822838e6a50c748f54cc854186fd3fcfbfe5.tar.xz
RISC-V: add stacktrace support via frame pointer walking
Make debugging more convenient by implementing stack_dump() and changing exception handlers to print stack trace along with the register dump. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220108171524.587144-8-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ab9d3e677e..a6b6a5be20 100644
--- a/Makefile
+++ b/Makefile
@@ -632,6 +632,11 @@ endif # need-config
KBUILD_CFLAGS += -ggdb3
+ifdef CONFIG_FRAME_POINTER
+KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
+KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,)
+endif
+
# Force gcc to behave correct even for buggy distributions
KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)