about summary refs log tree commit diff
path: root/debug/Makefile
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-01-18 15:49:43 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-01-18 15:49:43 +0000
commit31d470ac2498da0ba6d54ea0c6f1cf57740809e5 (patch)
treebbd7b80adf49e3a328f5b07670b7cb12af2c0262 /debug/Makefile
parent90567f30eb334328ae6e2b7901df539f1ba61921 (diff)
downloadglibc-31d470ac2498da0ba6d54ea0c6f1cf57740809e5.tar.gz
glibc-31d470ac2498da0ba6d54ea0c6f1cf57740809e5.tar.xz
glibc-31d470ac2498da0ba6d54ea0c6f1cf57740809e5.zip
Add tests that backtrace and backtrace_symbols produce correct results.
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)