From: Greg Hudson Date: Sat, 27 Feb 2010 09:49:32 +0000 (+0000) Subject: On Linux platforms, use -Wl,--enable-new-dtags when linking shared X-Git-Tag: krb5-1.9-beta1~329 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e5b52cd8db901bd5c00890f7489c978930ea7786;p=krb5.git On Linux platforms, use -Wl,--enable-new-dtags when linking shared libraries and programs using them. The primary effect is to get ld to set DT_RUNPATH in addition to DT_RPATH, which in turn allows the LD_LIBRARY_PATH environment variable to override the compiled-in runpath, which is friendlier to the test framework. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23758 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/config/shlib.conf b/src/config/shlib.conf index beae4bfe3..88fa1dca5 100644 --- a/src/config/shlib.conf +++ b/src/config/shlib.conf @@ -412,12 +412,12 @@ mips-*-netbsd*) # LDCOMBINE_TAIL='-Wl,--version-script binutils.versions && $(PERL) -w $(top_srcdir)/util/export-check.pl $(SHLIB_EXPORT_FILE) $@' SHLIB_EXPORT_FILE_DEP=binutils.versions + RPATH_FLAG='-Wl,--enable-new-dtags -Wl,-rpath -Wl,' # For cases where we do have dependencies on other libraries # built in this tree... - SHLIB_RPATH_FLAGS='-Wl,-R$(SHLIB_RDIRS)' + SHLIB_RPATH_FLAGS='$(RPATH_FLAG)$(SHLIB_RDIRS)' SHLIB_EXPFLAGS='$(SHLIB_RPATH_FLAGS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)' PROFFLAGS=-pg - RPATH_FLAG='-Wl,-rpath -Wl,' PROG_RPATH_FLAGS='$(RPATH_FLAG)$(PROG_RPATH)' CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) $(PROG_RPATH_FLAGS) $(CFLAGS) $(LDFLAGS)' CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'