summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorSalvatore Cro <salvatore.cro@st.com>2010-09-09 15:45:44 +0200
committerCarmelo Amoroso <carmelo.amoroso@st.com>2010-09-15 12:31:22 +0200
commit37eb913ed8c4798b736e678f4dbd9f4a91a68f74 (patch)
tree63fc2c1dbb887a043a7291c9c6215d2db7b5ba5a /Makefile.in
parent7ac7be14eb4c8927fddffbe01fed74c605bf8597 (diff)
libubacktrace: Provide uClibc with backtrace functions
A new shared object, libubacktrace.so.0 is added to uClibc to provide backtrace functions to support application self-debugging. This set of functions requires to dynamically load libgcc_s.so so they need to call dlopen/dlsym that are provided by libdl. For this reason they cannot be included into libc.so.0 but are provided by a new library. User application that wants to use backtrace needs to be compiled with -fexceptions option and -rdynamic to get full symbols printed and must be linked against libubacktrace.so Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
index fe8e98398..348bc0c3f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -48,6 +48,7 @@ include $(top_srcdir)libresolv/Makefile.in
include $(top_srcdir)libutil/Makefile.in
include $(top_srcdir)libpthread/Makefile.in
include $(top_srcdir)librt/Makefile.in
+include $(top_srcdir)libubacktrace/Makefile.in
include $(top_srcdir)extra/locale/Makefile.in
# last included to catch all the objects added by others (locales/threads)
@@ -272,6 +273,7 @@ HEADERS_RM-$(UCLIBC_HAS_GLIBC_CUSTOM_PRINTF) += printf.h
HEADERS_RM-$(UCLIBC_HAS_GLOB) += glob.h
HEADERS_RM-$(UCLIBC_HAS_GNU_ERROR) += error.h
HEADERS_RM-$(UCLIBC_HAS_IPV6) += netinet/ip6.h netinet/icmp6.h
+HEADERS_RM-$(UCLIBC_HAS_BACKTRACE) += execinfo.h
HEADERS_RM-$(UCLIBC_HAS_LOCALE) += iconv.h
HEADERS_RM-$(UCLIBC_HAS_PTY) += pty.h
HEADERS_RM-$(UCLIBC_HAS_REGEX) += regex.h regexp.h
@@ -330,6 +332,12 @@ ifeq ($(HARDWIRED_ABSPATH),y)
else
-$(INSTALL) -m 755 $(top_builddir)lib/libc.so $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
endif
+ifeq ($(UCLIBC_HAS_BACKTRACE),y)
+# Add the AS_NEEDED entry for libubacktrace.so
+ if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \
+ echo "GROUP ( $(UBACKTRACE_ASNEEDED) )" >> $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
+ fi
+endif
ifeq ($(UCLIBC_HAS_THREADS),y)
ifneq ($(LINUXTHREADS_OLD),y)
ifeq ($(HARDWIRED_ABSPATH),y)