From d85793d8b11e6b6ddac79ed509b5e019ce6e30a1 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sat, 8 Apr 2006 11:03:03 +0000 Subject: [PATCH] * shlib.conf (*-*-linux*): Use linker flag --as-needed when building shared libraries. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17880 dc483132-0cff-0310-8789-dd5450dbe970 --- src/config/ChangeLog | 3 +++ src/config/shlib.conf | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/config/ChangeLog b/src/config/ChangeLog index ccd89e12c..928874b6d 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -1,5 +1,8 @@ 2006-04-08 Ken Raeburn + * 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 cc914577d..cd851ea52 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 -- 2.26.2