ld: Replace --rpath with -Wl,--rpath
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 8 Aug 2017 21:13:46 +0000 (14:13 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 8 Aug 2017 21:16:02 +0000 (14:16 -0700)
"--rpath ../bfd/.libs ../bfd/.libs/libbfd.so" isn't a valid compiler
command-line option.  We should use -Wl,--rpath instead of --rpath.

PR ld/21923
* configure.ac (TESTBFDLIB): Replace --rpath with -Wl,--rpath
for --disable-static.
* configure: Regenerated.

ld/ChangeLog
ld/configure
ld/configure.ac

index 645c0fe..65ddf6b 100644 (file)
@@ -1,3 +1,10 @@
+2017-08-08  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/21923
+       * configure.ac (TESTBFDLIB): Replace --rpath with -Wl,--rpath
+       for --disable-static.
+       * configure: Regenerated.
+
 2017-08-08  Romain Geissler  <romain.geissler@gmail.com>
            Alan Modra  <amodra@gmail.com>
 
index de709d3..f1d1f0e 100755 (executable)
@@ -17298,7 +17298,7 @@ EMULATION_LIBPATH=$all_libpath
 
 
 if test x${enable_static} = xno; then
-  TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so"
+  TESTBFDLIB="-Wl,--rpath ../bfd/.libs ../bfd/.libs/libbfd.so"
 else
   TESTBFDLIB="../bfd/.libs/libbfd.a"
 fi
index 99d127b..9bada13 100644 (file)
@@ -470,7 +470,7 @@ EMULATION_LIBPATH=$all_libpath
 AC_SUBST(EMULATION_LIBPATH)
 
 if test x${enable_static} = xno; then
-  TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so"
+  TESTBFDLIB="-Wl,--rpath ../bfd/.libs ../bfd/.libs/libbfd.so"
 else
   TESTBFDLIB="../bfd/.libs/libbfd.a"
 fi