From 37eb913ed8c4798b736e678f4dbd9f4a91a68f74 Mon Sep 17 00:00:00 2001 From: Salvatore Cro Date: Thu, 9 Sep 2010 15:45:44 +0200 Subject: 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 --- Makefile.in | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Makefile.in') 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) -- cgit v1.2.3