backport: ltmain.sh (relink): Use absolute path when hardcoding with -L.
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Thu, 13 Jan 2011 18:51:10 +0000 (18:51 +0000)
committerRalf Wildenhues <rwild@gcc.gnu.org>
Thu, 13 Jan 2011 18:51:10 +0000 (18:51 +0000)
Backport from Libtool: Fix relink mode to use absolute path if hardcode_minus_L.

/:
* ltmain.sh (relink): Use absolute path when hardcoding with -L.

From-SVN: r168762

ChangeLog
ltmain.sh

index 8b8fb3529fccfd5f9aa76a884a83a7fc8c63e93c..c78832544d5d61186d81feac2c4c8f4dfccba45d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-01-13  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       * ltmain.sh (relink): Use absolute path when hardcoding with -L.
+
 2011-01-13  Joel Brobecker  <brobecker@adacore.com>
 
        * configure.ac: Remove readline, mmalloc, and gdb from noconfigdirs
index cba8b4c7a565df5b89934ad2820d28f9bc553138..a03433f178941e5be51c26d8ef35957e245693f1 100644 (file)
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -5928,7 +5928,7 @@ func_mode_link ()
                 test "$hardcode_direct_absolute" = no; then
                add="$dir/$linklib"
              elif test "$hardcode_minus_L" = yes; then
-               add_dir="-L$dir"
+               add_dir="-L$absdir"
                # Try looking first in the location we're being installed to.
                if test -n "$inst_prefix_dir"; then
                  case $libdir in