summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in7
-rw-r--r--Rules.mak8
-rw-r--r--libc/Makefile.in1
3 files changed, 7 insertions, 9 deletions
diff --git a/Makefile.in b/Makefile.in
index fb118c0b9..8405f43ef 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -341,18 +341,13 @@ ifeq ($(HARDWIRED_ABSPATH),y)
$(SED) -e 's:$(NONSHARED_LIBNAME):$(DEVEL_PREFIX)$(MULTILIB_DIR)/$(NONSHARED_LIBNAME):' \
-e 's:$(SHARED_LIBNAME):$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(SHARED_LIBNAME):' \
-e 's:$(UCLIBC_LDSO):$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(UCLIBC_LDSO):' \
+ -e 's:$(UBACKTRACE_DSO):$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(UBACKTRACE_DSO):' \
$(top_builddir)lib/libc.so > $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so; \
$(SED) -i -e 's://:/:g' $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so; \
fi
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)$(MULTILIB_DIR)/$(SHARED_LIBNAME) ] ; then \
- echo "GROUP ( $(UBACKTRACE_ASNEEDED) )" >> $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so; \
- fi
-endif
ifeq ($(UCLIBC_HAS_THREADS),y)
ifneq ($(LINUXTHREADS_OLD),y)
ifeq ($(HARDWIRED_ABSPATH),y)
diff --git a/Rules.mak b/Rules.mak
index 00e8481b8..320b9528c 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -575,10 +575,12 @@ link.asneeded = $(if $(findstring yy,$(CC_FLAG_ASNEEDED)$(CC_FLAG_NO_ASNEEDED)),
# Check for AS_NEEDED support in linker script (binutils>=2.16.1 has it)
ifndef ASNEEDED
export ASNEEDED:=$(shell $(LD) --help 2>/dev/null | grep -q -- --as-needed && echo "AS_NEEDED ( $(UCLIBC_LDSO) )" || echo "$(UCLIBC_LDSO)")
-ifeq ($(UCLIBC_HAS_BACKTRACE),y)
+
# Only used in installed libc.so linker script
-UBACKTRACE_FULL_NAME := $(RUNTIME_PREFIX)lib/$(UBACKTRACE_DSO)
-export UBACKTRACE_ASNEEDED:=$(shell $(LD) --help 2>/dev/null | grep -q -- --as-needed && echo "AS_NEEDED ( $(UBACKTRACE_FULL_NAME) )" || echo "$(UBACKTRACE_FULL_NAME)")
+ifeq ($(UCLIBC_HAS_BACKTRACE),y)
+export UBACKTRACE_ASNEEDED:=$(shell $(LD) --help 2>/dev/null | grep -q -- --as-needed && \
+ echo "GROUP ( AS_NEEDED ( $(UBACKTRACE_DSO) ) )" || \
+ echo "GROUP ( $(UBACKTRACE_DSO) )")
else
export UBACKTRACE_ASNEEDED:=""
endif
diff --git a/libc/Makefile.in b/libc/Makefile.in
index 3b6a17b32..d8ea7bd99 100644
--- a/libc/Makefile.in
+++ b/libc/Makefile.in
@@ -74,6 +74,7 @@ ifeq ($(COMPAT_ATEXIT),y)
else
$(Q)echo "GROUP ( $(SHARED_LIBNAME) $(NONSHARED_LIBNAME) $(ASNEEDED) )" >> $@.tmp
endif
+ $(Q)echo "$(UBACKTRACE_ASNEEDED)" >> $@.tmp
$(Q)mv $@.tmp $@
$(libc_OUT)/libc_so.a: $(libc-so-y) | $(top_builddir)lib/libc.a $(top_builddir)lib/$(NONSHARED_LIBNAME)