From 752095b4d9a649097dc04bb99de66d6b12954015 Mon Sep 17 00:00:00 2001
From: rwild <rwild@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu, 13 Jan 2011 18:51:10 +0000
Subject: [PATCH] Backport from Libtool: Fix relink mode to use absolute path
 if hardcode_minus_L.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168762 138bc75d-0d04-0410-961f-82ee72b054a4
---
 ChangeLog | 4 ++++
 ltmain.sh | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 8b8fb3529fcc..c78832544d5d 100644
--- 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
diff --git a/ltmain.sh b/ltmain.sh
index cba8b4c7a565..a03433f17894 100644
--- 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
-- 
GitLab