summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/config/ChangeLog3
-rw-r--r--src/config/shlib.conf2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/config/ChangeLog b/src/config/ChangeLog
index ccd89e12cc..928874b6d4 100644
--- a/src/config/ChangeLog
+++ b/src/config/ChangeLog
@@ -1,5 +1,8 @@
2006-04-08 Ken Raeburn <raeburn@mit.edu>
+ * shlib.conf (*-*-linux*): Use linker flag --as-needed when
+ building shared libraries.
+
* pre.in (ALL_CFLAGS): Always define KRB5_DEPRECATED and
KRB5_PRIVATE.
diff --git a/src/config/shlib.conf b/src/config/shlib.conf
index cc914577d0..cd851ea523 100644
--- a/src/config/shlib.conf
+++ b/src/config/shlib.conf
@@ -349,7 +349,7 @@ mips-*-netbsd*)
SHLIBEXT=.so
# Linux ld doesn't default to stuffing the SONAME field...
# Use objdump -x to examine the fields of the library
- LDCOMBINE='$(CC) -shared -fPIC -Wl,-h,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
+ LDCOMBINE='$(CC) -shared -fPIC -Wl,-h,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT),--as-needed'
#
LDCOMBINE_TAIL='-Wl,--version-script binutils.versions && $(PERL) -w $(SRCTOP)/util/export-check.pl $(SHLIB_EXPORT_FILE) $@'
SHLIB_EXPORT_FILE_DEP=binutils.versions