summaryrefslogtreecommitdiff
path: root/arch/csky/Makefile
diff options
context:
space:
mode:
authorGuo Ren <ren_guo@c-sky.com>2018-12-09 09:18:05 +0300
committerGuo Ren <ren_guo@c-sky.com>2018-12-31 18:12:22 +0300
commit0ea2dc7cd668be5475babecaf6fdeaa464e2847b (patch)
tree733fef9d2126b7323d4ec80e62e0c3ea583e01f7 /arch/csky/Makefile
parent859e5f45cbb33fe5d591a8e429667f0b7d4f4be8 (diff)
downloadlinux-0ea2dc7cd668be5475babecaf6fdeaa464e2847b.tar.xz
csky: stacktrace supported.
The gcc option "-mbacktrace" will push fp(r8),lr into stack and we could unwind the stack with: fp = *fp lr = (unsigned int *)fp[1] Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Diffstat (limited to 'arch/csky/Makefile')
-rw-r--r--arch/csky/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/csky/Makefile b/arch/csky/Makefile
index c639fc167895..3607a6e8f66c 100644
--- a/arch/csky/Makefile
+++ b/arch/csky/Makefile
@@ -47,6 +47,10 @@ ifeq ($(CSKYABI),abiv2)
KBUILD_CFLAGS += -mno-stack-size
endif
+ifdef CONFIG_STACKTRACE
+KBUILD_CFLAGS += -mbacktrace
+endif
+
abidirs := $(patsubst %,arch/csky/%/,$(CSKYABI))
KBUILD_CFLAGS += $(patsubst %,-I$(srctree)/%inc,$(abidirs))