summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-10-28 15:06:51 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-10-28 15:06:51 +0000
commit5eef441142b5e70daab13c0edf378f36209280ed (patch)
tree1d50b18c7e57ffedf9c8e8d926fb9f795250a997
parentef7d6458250a9387ed6cbcd30574ddde2aed9760 (diff)
Oops, missed commiting AS_NEEDED check
-rw-r--r--Rules.mak9
1 files changed, 9 insertions, 0 deletions
diff --git a/Rules.mak b/Rules.mak
index 8b2417631..0e4e9aa3c 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -255,6 +255,15 @@ export LDPIEFLAG:=$(shell $(LD) --help | grep -q pie && echo "-Wl,-pie")
endif
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 > /dev/null 2>&1; then echo "AS_NEEDED ( $(UCLIBC_LDSO) )"; else echo "$(UCLIBC_LDSO)"; fi; rm -f $LD_TMP ) )
+endif
+endif
+
# Use '-Os' optimization if available, else use -O2, allow Config to override
OPTIMIZATION+=$(call check_gcc,-Os,-O2)
# Use the gcc 3.4 -funit-at-a-time optimization when available