about summary refs log tree commit diff
path: root/debug/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'debug/Makefile')
-rw-r--r--debug/Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/debug/Makefile b/debug/Makefile
index 40446d4af5..55017d327c 100644
--- a/debug/Makefile
+++ b/debug/Makefile
@@ -121,10 +121,22 @@ LDLIBS-tst-lfschk4 = -lstdc++
 LDLIBS-tst-lfschk5 = -lstdc++
 LDLIBS-tst-lfschk6 = -lstdc++
 
+# backtrace_symbols only works if we link with -rdynamic.  backtrace
+# requires unwind tables on most architectures.
+CFLAGS-tst-backtrace2.c += -funwind-tables
+CFLAGS-tst-backtrace3.c += -funwind-tables
+CFLAGS-tst-backtrace4.c += -funwind-tables
+CFLAGS-tst-backtrace5.c += -funwind-tables
+LDFLAGS-tst-backtrace2 = -rdynamic
+LDFLAGS-tst-backtrace3 = -rdynamic
+LDFLAGS-tst-backtrace4 = -rdynamic
+LDFLAGS-tst-backtrace5 = -rdynamic
+
 tests = backtrace-tst tst-longjmp_chk tst-chk1 tst-chk2 tst-chk3 \
 	tst-lfschk1 tst-lfschk2 tst-lfschk3 test-strcpy_chk test-stpcpy_chk \
 	tst-chk4 tst-chk5 tst-chk6 tst-lfschk4 tst-lfschk5 tst-lfschk6 \
-	tst-longjmp_chk2
+	tst-longjmp_chk2 tst-backtrace2 tst-backtrace3 tst-backtrace4 \
+	tst-backtrace5
 
 tests-ifunc := $(stpcpy_chk strcpy_chk:%=test-%-ifunc)
 tests += $(tests-ifunc)