Build SH backtrace with -funwind-tables
Joseph S. Myers
joseph@codesourcery.com
Wed Oct 31 21:06:00 GMT 2012
When I made SH backtrace use unwind tables
<http://sourceware.org/ml/libc-alpha/2011-12/msg00000.html>, I forgot
to include the sysdeps/sh/Makefile change to build the backtrace
implementation with -funwind-tables - needed if the compiler used to
build glibc doesn't default to unwind tables, so that the backtrace
function can backtrace out of itself and into the user program. This
patch adds the missing makefile change.
Note: I haven't tested this change recently.
2012-10-31 Joseph Myers <joseph@codesourcery.com>
* sysdeps/sh/Makefile [$(subdir) = debug] (CFLAGS-backtrace.c):
New variable.
diff --git a/sysdeps/sh/Makefile b/sysdeps/sh/Makefile
index cf18ded..bb7c553 100644
--- a/sysdeps/sh/Makefile
+++ b/sysdeps/sh/Makefile
@@ -1,3 +1,7 @@
ifeq ($(subdir),gmon)
sysdep_routines += _mcount
endif
+
+ifeq ($(subdir),debug)
+CFLAGS-backtrace.c += -funwind-tables
+endif
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list