buildroot-libtool-v2.2.patch 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. --- a/ltmain.sh 2009-11-16 06:23:18.000000000 -0700
  2. +++ b/ltmain.sh 2010-09-18 20:25:06.000000000 -0700
  3. @@ -1048,8 +1048,8 @@ func_infer_tag ()
  4. # was found and let the user know that the "--tag" command
  5. # line option must be used.
  6. if test -z "$tagname"; then
  7. - func_echo "unable to infer tagged configuration"
  8. - func_fatal_error "specify a tag with \`--tag'"
  9. + func_echo "defaulting to \`CC'"
  10. + func_echo "if this is not correct, specify a tag with \`--tag'"
  11. # else
  12. # func_verbose "using $tagname tagged configuration"
  13. fi
  14. @@ -2018,8 +2018,11 @@ func_mode_install ()
  15. # At present, this check doesn't affect windows .dll's that
  16. # are installed into $libdir/../bin (currently, that works fine)
  17. # but it's something to keep an eye on.
  18. - test "$inst_prefix_dir" = "$destdir" && \
  19. - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
  20. + #
  21. + # This breaks install into our staging area. -PB
  22. + #
  23. + # test "$inst_prefix_dir" = "$destdir" && \
  24. + # func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
  25. if test -n "$inst_prefix_dir"; then
  26. # Stick the inst_prefix_dir data into the link command.
  27. @@ -5412,8 +5415,14 @@ func_mode_link ()
  28. absdir="$abs_ladir"
  29. libdir="$abs_ladir"
  30. else
  31. - dir="$libdir"
  32. - absdir="$libdir"
  33. + # Adding 'libdir' from the .la file to our library search paths
  34. + # breaks crosscompilation horribly. We cheat here and don't add
  35. + # it, instead adding the path where we found the .la. -CL
  36. + dir="$abs_ladir"
  37. + absdir="$abs_ladir"
  38. + libdir="$abs_ladir"
  39. + #dir="$libdir"
  40. + #absdir="$libdir"
  41. fi
  42. test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
  43. else
  44. @@ -5564,7 +5573,7 @@ func_mode_link ()
  45. *)
  46. if test "$installed" = no; then
  47. notinst_deplibs="$notinst_deplibs $lib"
  48. - need_relink=yes
  49. + need_relink=no
  50. fi
  51. ;;
  52. esac
  53. @@ -8052,6 +8061,10 @@ EOF
  54. # Replace all uninstalled libtool libraries with the installed ones
  55. newdependency_libs=
  56. for deplib in $dependency_libs; do
  57. + # Replacing uninstalled with installed can easily break crosscompilation,
  58. + # since the installed path is generally the wrong architecture. -CL
  59. + newdependency_libs="$newdependency_libs $deplib"
  60. + continue
  61. case $deplib in
  62. *.la)
  63. func_basename "$deplib"