On Linux platforms, use -Wl,--enable-new-dtags when linking shared
authorGreg Hudson <ghudson@mit.edu>
Sat, 27 Feb 2010 09:49:32 +0000 (09:49 +0000)
committerGreg Hudson <ghudson@mit.edu>
Sat, 27 Feb 2010 09:49:32 +0000 (09:49 +0000)
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

src/config/shlib.conf

index beae4bfe3095ef2d104ef801b2faa227dbbbb80c..88fa1dca5235193d8bf48935e16daf5e0febd125 100644 (file)
@@ -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)'