blob: bb2a3671f0bfa496833f9bfca9bab6dad8841724 [file] [log] [blame]
Andrew Geisslerc926e172021-05-07 16:11:35 -05001From cd09adb1e7f2a7e81a9f595a17c36f24911b90ac Mon Sep 17 00:00:00 2001
Andrew Geissler82c905d2020-04-13 13:39:40 -05002From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 3 Mar 2015 08:21:19 +0000
Andrew Geisslerc182c622020-05-15 14:13:32 -05004Subject: [PATCH] Don't search host directory during "relink" if $inst_prefix
5 is provided
Andrew Geissler82c905d2020-04-13 13:39:40 -05006
7http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html
8
9Upstream-Status: Submitted
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 ltmain.sh | 5 +++--
14 1 file changed, 3 insertions(+), 2 deletions(-)
15
16diff --git a/ltmain.sh b/ltmain.sh
Andrew Geisslerc182c622020-05-15 14:13:32 -050017index 9ebc7e3d1e0..7ea79fa8be6 100644
Andrew Geissler82c905d2020-04-13 13:39:40 -050018--- a/ltmain.sh
19+++ b/ltmain.sh
20@@ -6004,12 +6004,13 @@ func_mode_link ()
21 fi
22 else
23 # We cannot seem to hardcode it, guess we'll fake it.
24+ # Default if $libdir is not relative to the prefix:
25 add_dir="-L$libdir"
26- # Try looking first in the location we're being installed to.
27+
28 if test -n "$inst_prefix_dir"; then
29 case $libdir in
30 [\\/]*)
31- add_dir="$add_dir -L$inst_prefix_dir$libdir"
32+ add_dir="-L$inst_prefix_dir$libdir"
33 ;;
34 esac
35 fi