summaryrefslogtreecommitdiff
path: root/Makeconfig
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2010-05-04 12:13:28 -0700
committerRoland McGrath <roland@redhat.com>2010-05-04 12:13:28 -0700
commitbb6d7d23841e57fde2c6c79a4455c7e9373a5d1b (patch)
tree334c4a5d9b11045021021f5f0db53ce4f4fa3ff3 /Makeconfig
parent2e76ab2332a7fb9e73a4047625b915bff93bd427 (diff)
parentc4ccff16e2ff92f84102988bd3a32cd1d2719f3a (diff)
Merge commit 'origin/master' into fedora/master
Diffstat (limited to 'Makeconfig')
-rw-r--r--Makeconfig11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makeconfig b/Makeconfig
index 9aacc81e8a..9778998738 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -387,6 +387,14 @@ ifeq ($(elf),yes)
have-initfini = yes
endif
+ifeq ($(have-as-needed),yes)
+as-needed := -Wl,--as-needed
+no-as-needed := -Wl,--no-as-needed
+else
+as-needed :=
+no-as-needed :=
+endif
+
# Installed name of the startup code.
ifneq ($(have-initfini),yes)
# When not having init/fini, there is just one startfile, called crt0.o.
@@ -484,7 +492,8 @@ ifeq ($(elf),yes)
# run the linked programs.
link-libc = -Wl,-rpath-link=$(rpath-link) \
$(common-objpfx)libc.so$(libc.so-version) \
- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
+ $(common-objpfx)$(patsubst %,$(libtype.oS),c) \
+ $(as-needed) $(common-objpfx)elf/ld.so $(no-as-needed) $(gnulib)
# This is how to find at build-time things that will be installed there.
rpath-dirs = math elf dlfcn nss nis rt resolv crypt
endif