[PATCH 1/3] libubacktrace: compile with -fasynchronous-unwind-tables to get full backtrace
Filippo ARCIDIACONO
filippo.arcidiacono at st.com
Fri Sep 13 08:31:51 UTC 2013
Add -fasynchronous-unwind-tables compiler flag for all objects, to improve
backtrace functionality, getting full backtrace whatever functions are
in the call stack.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono at st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>
---
Rules.mak | 5 +++++
libc/signal/Makefile.in | 4 ----
libc/stdlib/Makefile.in | 4 ----
.../sysdeps/unix/sysv/linux/Makefile.commonarch | 4 ----
4 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/Rules.mak b/Rules.mak
index 792b794..1cf7adc 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -644,6 +644,11 @@ ifneq ($(strip $(UCLIBC_EXTRA_CFLAGS)),"")
CFLAGS += $(call qstrip,$(UCLIBC_EXTRA_CFLAGS))
endif
+# Needed to get full backtrace
+ifeq ($(UCLIBC_HAS_BACKTRACE),y)
+CFLAGS += -fasynchronous-unwind-tables
+endif
+
# We need this to be checked within libc-symbols.h
ifneq ($(HAVE_SHARED),y)
CFLAGS += -DSTATIC
diff --git a/libc/signal/Makefile.in b/libc/signal/Makefile.in
index 6c355b5..ebc4619 100644
--- a/libc/signal/Makefile.in
+++ b/libc/signal/Makefile.in
@@ -22,10 +22,6 @@ ifneq ($(strip $(ARCH_OBJS-y)),)
CSRC-y := $(filter-out $(notdir $(ARCH_OBJS-y:.o=.c)),$(CSRC-y))
endif
-ifneq ($(UCLIBC_HAS_BACKTRACE),)
-CFLAGS-raise.c = -fasynchronous-unwind-tables
-endif
-
SIGNAL_DIR := $(top_srcdir)libc/signal
SIGNAL_OUT := $(top_builddir)libc/signal
diff --git a/libc/stdlib/Makefile.in b/libc/stdlib/Makefile.in
index 880de78..b737708 100644
--- a/libc/stdlib/Makefile.in
+++ b/libc/stdlib/Makefile.in
@@ -28,10 +28,6 @@ CSRC-$(if $(findstring yy,$(UCLIBC_HAS_FLOATS)$(UCLIBC_SUSV3_LEGACY)),y) += \
gcvt.c
CSRC-$(UCLIBC_SUSV3_LEGACY) += mktemp.c
-ifneq ($(UCLIBC_HAS_BACKTRACE),)
-CFLAGS-abort.c = -fasynchronous-unwind-tables
-endif
-
# multi source stdlib.c
CSRC-y += abs.c labs.c atoi.c atol.c strtol.c strtoul.c _stdlib_strto_l.c \
qsort.c qsort_r.c bsearch.c rpmatch.c \
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch
index 3372214..2eeb516 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch
@@ -130,10 +130,6 @@ CFLAGS-timer_gettime.c = -I$(top_srcdir)librt -DIS_IN_librt
CFLAGS-timer_routines.c = -I$(top_srcdir)librt -DIS_IN_librt
CFLAGS-timer_settime.c = -I$(top_srcdir)librt -DIS_IN_librt
-ifneq ($(UCLIBC_HAS_BACKTRACE),)
-CFLAGS-raise.c = -fasynchronous-unwind-tables
-endif
-
CFLAGS-linux = -DNOT_IN_libc -DIS_IN_libpthread $(SSP_ALL_CFLAGS)
CFLAGS-OMIT-libc_pthread_init.c = -DNOT_IN_libc -DIS_IN_libpthread
--
1.7.7.6
More information about the uClibc
mailing list