2
0

100-libdir-fixes.patch 2.2 KB

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