b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 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 | Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com> |
| 10 | |
| 11 | --- a/build-aux/ltmain.in |
| 12 | +++ b/build-aux/ltmain.in |
| 13 | @@ -6482,13 +6482,13 @@ func_mode_link () |
| 14 | add_dir= |
| 15 | add= |
| 16 | # Finalize command for both is simple: just hardcode it. |
| 17 | - if test yes = "$hardcode_direct" && |
| 18 | - test no = "$hardcode_direct_absolute"; then |
| 19 | - add=$libdir/$linklib |
| 20 | - elif test yes = "$hardcode_minus_L"; then |
| 21 | + if test "$hardcode_direct" = yes && |
| 22 | + test "$hardcode_direct_absolute" = no; then |
| 23 | + add="$libdir/$linklib" |
| 24 | + elif test "$hardcode_minus_L" = yes; then |
| 25 | add_dir=-L$libdir |
| 26 | - add=-l$name |
| 27 | - elif test yes = "$hardcode_shlibpath_var"; then |
| 28 | + add="-l$name" |
| 29 | + elif test "$hardcode_shlibpath_var" = yes; then |
| 30 | case :$finalize_shlibpath: in |
| 31 | *":$libdir:"*) ;; |
| 32 | *) func_append finalize_shlibpath "$libdir:" ;; |