Browse Source

simplify binutils as-needed support and enable it all the time regardless of ssp

Mike Frysinger 16 years ago
parent
commit
d9ec80053e
1 changed files with 1 additions and 5 deletions
  1. 1 5
      Rules.mak

+ 1 - 5
Rules.mak

@@ -335,11 +335,7 @@ endif
 
 # Check for AS_NEEDED support in linker script (binutils>=2.16.1 has it)
 ifndef ASNEEDED
-ifneq ($(UCLIBC_HAS_SSP),y)
-export ASNEEDED:=
-else
-export ASNEEDED:=$(shell (LD_TMP=$(mktemp LD_XXXXXX) ; echo "GROUP ( AS_NEEDED ( /usr/lib/libc.so ) )" > $LD_TMP && if $(LD) -T $LD_TMP -o /dev/null > /dev/null 2>&1; then echo "AS_NEEDED ( $(UCLIBC_LDSO) )"; else echo "$(UCLIBC_LDSO)"; fi; rm -f $LD_TMP ) )
-endif
+export ASNEEDED:=$(shell $(LD) --help 2>/dev/null | grep -q -- --as-needed && echo "AS_NEEDED ( $(UCLIBC_LDSO) )" || echo "$(UCLIBC_LDSO)")
 endif
 
 # Add a bunch of extra pedantic annoyingly strict checks