1 From 67ffe8e8582a7ba1f1d1307a419098e6dd88bdaf Mon Sep 17 00:00:00 2001
2 From: Eneas U de Queiroz <cotequeiroz@gmail.com>
3 Date: Tue, 20 Jul 2021 16:41:11 -0300
4 Subject: openwrt: cross-compilation path adjustments
6 Comments from the patch:
8 Adding 'libdir' from the .la file to our library search paths
9 breaks crosscompilation horribly. We cheat here and don't add
10 it, instead adding the path where we found the .la. -CL
12 OE sets installed=no in staging. We need to look in $objdir and $absdir,
13 preferring $objdir. RP 31/04/2008
15 This was originally commited to openwrt by Jo-Philipp Wich
18 Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
20 --- a/build-aux/ltmain.in
21 +++ b/build-aux/ltmain.in
22 @@ -6097,8 +6097,14 @@ func_mode_link ()
26 - dir=$lt_sysroot$libdir
27 - absdir=$lt_sysroot$libdir
28 + # Adding 'libdir' from the .la file to our library search paths
29 + # breaks crosscompilation horribly. We cheat here and don't add
30 + # it, instead adding the path where we found the .la. -CL
31 + dir="$lt_sysroot$abs_ladir"
34 + #dir=$lt_sysroot$libdir
35 + #absdir=$lt_sysroot$libdir
37 test yes = "$hardcode_automatic" && avoidtemprpath=yes
39 @@ -6496,8 +6502,6 @@ func_mode_link ()
43 - # We cannot seem to hardcode it, guess we'll fake it.
45 # Try looking first in the location we're being installed to.
46 if test -n "$inst_prefix_dir"; then
48 @@ -6652,7 +6656,17 @@ func_mode_link ()
52 - path=-L$absdir/$objdir
53 + # OE sets installed=no in staging. We need to look in $objdir and $absdir,
54 + # preferring $objdir. RP 31/04/2008
55 + if test -f "$absdir/$objdir/$depdepl" ; then
56 + depdepl="$absdir/$objdir/$depdepl"
57 + path="-L$absdir/$objdir"
58 + elif test -f "$absdir/$depdepl" ; then
59 + depdepl="$absdir/$depdepl"
62 + path="-L$absdir/$objdir"