From 01c125c3bd8f949f8e5711e09152859eecd1b004 Mon Sep 17 00:00:00 2001 From: Kevin Cernekee Date: Thu, 7 Jun 2012 11:32:24 -0700 Subject: buildsys: clean up libubacktrace linker script handling Currently, the installed libubacktrace linker script entry always uses HARDWIRED_ABSPATH semantics, even if HARDWIRED_ABSPATH is disabled: $ grep GROUP $PREFIX/mipsel-linux-uclibc/sys-root/usr/lib/libc.so GROUP ( libc.so.0 uclibc_nonshared.a AS_NEEDED ( ld-uClibc.so.0 ) ) GROUP ( AS_NEEDED ( /lib/libubacktrace.so.0 ) ) This causes problems when building a non-sysroot toolchain. Move the AS_NEEDED insertion into libc/Makefile.in, and add a case to the HARDWIRED_ABSPATH substitution command so libubacktrace is handled the same way as the other libraries listed in the script. Signed-off-by: Kevin Cernekee Signed-off-by: Bernhard Reutner-Fischer --- Rules.mak | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Rules.mak') 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 -- cgit v1.2.3