2023-03-09 14:35:13 +00:00
|
|
|
From 67ffe8e8582a7ba1f1d1307a419098e6dd88bdaf Mon Sep 17 00:00:00 2001
|
|
|
|
From: Eneas U de Queiroz <cotequeiroz@gmail.com>
|
|
|
|
Date: Tue, 20 Jul 2021 16:41:11 -0300
|
|
|
|
Subject: openwrt: cross-compilation path adjustments
|
|
|
|
|
|
|
|
Comments from the patch:
|
|
|
|
|
|
|
|
Adding 'libdir' from the .la file to our library search paths
|
|
|
|
breaks crosscompilation horribly. We cheat here and don't add
|
|
|
|
it, instead adding the path where we found the .la. -CL
|
|
|
|
|
|
|
|
OE sets installed=no in staging. We need to look in $objdir and $absdir,
|
|
|
|
preferring $objdir. RP 31/04/2008
|
|
|
|
|
|
|
|
This was originally commited to openwrt by Jo-Philipp Wich
|
|
|
|
<jow@openwrt.org>.
|
|
|
|
|
|
|
|
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
|
|
|
|
|
2021-09-13 21:08:55 +00:00
|
|
|
--- a/build-aux/ltmain.in
|
|
|
|
+++ b/build-aux/ltmain.in
|
2022-03-31 23:13:17 +00:00
|
|
|
@@ -6097,8 +6097,14 @@ func_mode_link ()
|
2021-09-13 21:08:55 +00:00
|
|
|
absdir=$abs_ladir
|
|
|
|
libdir=$abs_ladir
|
2010-12-18 18:07:53 +00:00
|
|
|
else
|
2021-09-13 21:08:55 +00:00
|
|
|
- dir=$lt_sysroot$libdir
|
|
|
|
- absdir=$lt_sysroot$libdir
|
2010-12-18 18:07:53 +00:00
|
|
|
+ # Adding 'libdir' from the .la file to our library search paths
|
|
|
|
+ # breaks crosscompilation horribly. We cheat here and don't add
|
|
|
|
+ # it, instead adding the path where we found the .la. -CL
|
|
|
|
+ dir="$lt_sysroot$abs_ladir"
|
|
|
|
+ absdir="$abs_ladir"
|
|
|
|
+ libdir="$abs_ladir"
|
2021-09-13 21:08:55 +00:00
|
|
|
+ #dir=$lt_sysroot$libdir
|
|
|
|
+ #absdir=$lt_sysroot$libdir
|
2010-12-18 18:07:53 +00:00
|
|
|
fi
|
2021-09-13 21:08:55 +00:00
|
|
|
test yes = "$hardcode_automatic" && avoidtemprpath=yes
|
2010-12-18 18:07:53 +00:00
|
|
|
else
|
2022-03-31 23:13:17 +00:00
|
|
|
@@ -6496,8 +6502,6 @@ func_mode_link ()
|
2021-09-13 21:08:55 +00:00
|
|
|
add=$libdir/$linklib
|
2010-12-18 18:07:53 +00:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
- # We cannot seem to hardcode it, guess we'll fake it.
|
2021-09-13 21:08:55 +00:00
|
|
|
- add_dir=-L$libdir
|
2010-12-18 18:07:53 +00:00
|
|
|
# Try looking first in the location we're being installed to.
|
|
|
|
if test -n "$inst_prefix_dir"; then
|
|
|
|
case $libdir in
|
2022-03-31 23:13:17 +00:00
|
|
|
@@ -6652,7 +6656,17 @@ func_mode_link ()
|
2010-12-21 22:37:54 +00:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
2021-09-13 21:08:55 +00:00
|
|
|
- path=-L$absdir/$objdir
|
2010-12-18 18:07:53 +00:00
|
|
|
+ # OE sets installed=no in staging. We need to look in $objdir and $absdir,
|
|
|
|
+ # preferring $objdir. RP 31/04/2008
|
|
|
|
+ if test -f "$absdir/$objdir/$depdepl" ; then
|
|
|
|
+ depdepl="$absdir/$objdir/$depdepl"
|
|
|
|
+ path="-L$absdir/$objdir"
|
|
|
|
+ elif test -f "$absdir/$depdepl" ; then
|
|
|
|
+ depdepl="$absdir/$depdepl"
|
|
|
|
+ path="-L$absdir"
|
|
|
|
+ else
|
|
|
|
+ path="-L$absdir/$objdir"
|
|
|
|
+ fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|