libtool: bump to 2.4.6
[openwrt/staging/mkresin.git] / tools / libtool / patches / 110-dont-use-target-dir-for-relinking.patch
1 From 375833af93999f8b0a747c8a1dfa3ec8d347743d Mon Sep 17 00:00:00 2001
2 From: Eneas U de Queiroz <cotequeiroz@gmail.com>
3 Date: Tue, 20 Jul 2021 16:52:37 -0300
4 Subject: openwrt: don't use target dir for relinking
5
6 This was originally commited to openwrt by Jo-Philipp Wich
7 <jow@openwrt.org>.
8
9 (adjusted to v2.4.6)
10 Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
11
12 --- a/build-aux/ltmain.in
13 +++ b/build-aux/ltmain.in
14 @@ -6434,13 +6434,13 @@ func_mode_link ()
15 add_dir=
16 add=
17 # Finalize command for both is simple: just hardcode it.
18 - if test yes = "$hardcode_direct" &&
19 - test no = "$hardcode_direct_absolute"; then
20 - add=$libdir/$linklib
21 - elif test yes = "$hardcode_minus_L"; then
22 + if test "$hardcode_direct" = yes &&
23 + test "$hardcode_direct_absolute" = no; then
24 + add="$libdir/$linklib"
25 + elif test "$hardcode_minus_L" = yes; then
26 add_dir=-L$libdir
27 - add=-l$name
28 - elif test yes = "$hardcode_shlibpath_var"; then
29 + add="-l$name"
30 + elif test "$hardcode_shlibpath_var" = yes; then
31 case :$finalize_shlibpath: in
32 *":$libdir:"*) ;;
33 *) func_append finalize_shlibpath "$libdir:" ;;