This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Build SH backtrace with -funwind-tables
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Cc: Thomas Schwinge <thomas at codesourcery dot com>, Kaz Kojima<kkojima at rr dot iij4u dot or dot jp>
- Date: Wed, 31 Oct 2012 21:06:13 +0000
- Subject: Build SH backtrace with -funwind-tables
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