This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Build raise with -fasynchronous-unwind-tables
- From: Joseph Myers <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Cc: <siddhesh at sourceware dot org>
- Date: Fri, 24 Jan 2020 00:33:16 +0000
- Subject: Build raise with -fasynchronous-unwind-tables
- Ironport-sdr: ++s4sJ6ijXazq9pWjCcMXYA4GDqNafSs4II4gcUXMCPi+BY6nrhHTzpTYbGTMZAUuX6pCrUVYf YYFNiuQALaB3V6N54Ne0HyDgcHTfmfSv5/YG83/C+6QRj8INF8Qtvh+MGD5Z/tXTmUzjfXUoOZ 1iuEfGPH+ETTC0i1qMsccoLusQrFn3iUBU0EqEHCm8E/68OS6vnUVweUd+emjBn5QtYjg5ABjJ tPENwIbPunHO2/L7Z1Y6tkRV0LL3HLyM89TVMayzVZe02YI+1KtV7JHah8pYWgD2CrgW2Scgds Bso=
- Ironport-sdr: ojnxhWasLr/hasHkxxzVMzdOKRACulXh8qsamq4iaWROTU3rDjhSZfeXLK897d0EygtO410oMf RbPbKBtm7I/g==
In testing glibc for Arm and MIPS, I see:
FAIL: misc/tst-sigcontext-get_pc
If this test - backtracing through a call to raise - is valid, then
raise needs to be built with -fasynchronous-unwind-tables (as the test
itself is) to have the required unwind information for that
backtracing to work. Adding that option, which this patch does,
causes the test for pass for Arm. For MIPS, the test still does not
pass (the backtrace has an address that is 2 bytes after the "address
in signal handler", for unknown reasons), although the patch allows a
longer backtrace to be produced.
diff --git a/signal/Makefile b/signal/Makefile
index 7da67def84..37de438bba 100644
--- a/signal/Makefile
+++ b/signal/Makefile
@@ -52,6 +52,7 @@ tests := tst-signal tst-sigset tst-sigsimple tst-raise tst-sigset2 \
include ../Rules
+CFLAGS-raise.c += -fasynchronous-unwind-tables
CFLAGS-sigpause.c += -fexceptions
CFLAGS-sigsuspend.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-sigtimedwait.c += -fexceptions -fasynchronous-unwind-tables
--
Joseph S. Myers
joseph@codesourcery.com