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/libltdl/config/ltmain.m4sh
21 +++ b/libltdl/config/ltmain.m4sh
22 @@ -5731,8 +5731,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"
35 + #absdir="$lt_sysroot$libdir"
37 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
39 @@ -6130,8 +6136,6 @@ func_mode_link ()
40 add="$libdir/$linklib"
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 @@ -6286,7 +6290,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"
67 --- a/libltdl/config/ltmain.sh
68 +++ b/libltdl/config/ltmain.sh
69 @@ -6518,8 +6518,14 @@ func_mode_link ()
73 - dir="$lt_sysroot$libdir"
74 - absdir="$lt_sysroot$libdir"
75 + # Adding 'libdir' from the .la file to our library search paths
76 + # breaks crosscompilation horribly. We cheat here and don't add
77 + # it, instead adding the path where we found the .la. -CL
78 + dir="$lt_sysroot$abs_ladir"
82 + #absdir="$lt_sysroot$libdir"
84 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
86 @@ -6917,8 +6923,6 @@ func_mode_link ()
87 add="$libdir/$linklib"
90 - # We cannot seem to hardcode it, guess we'll fake it.
92 # Try looking first in the location we're being installed to.
93 if test -n "$inst_prefix_dir"; then
95 @@ -7073,7 +7077,17 @@ func_mode_link ()
99 - path="-L$absdir/$objdir"
100 + # OE sets installed=no in staging. We need to look in $objdir and $absdir,
101 + # preferring $objdir. RP 31/04/2008
102 + if test -f "$absdir/$objdir/$depdepl" ; then
103 + depdepl="$absdir/$objdir/$depdepl"
104 + path="-L$absdir/$objdir"
105 + elif test -f "$absdir/$depdepl" ; then
106 + depdepl="$absdir/$depdepl"
109 + path="-L$absdir/$objdir"