buildroot-libtool-v1.5.patch 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. --- a/ltmain.sh 2014-07-31 10:43:01.634568799 -0300
  2. +++ b/ltmain.sh 2014-07-31 10:44:14.032018999 -0300
  3. @@ -226,8 +226,9 @@
  4. # line option must be used.
  5. if test -z "$tagname"; then
  6. $echo "$modename: unable to infer tagged configuration"
  7. - $echo "$modename: specify a tag with \`--tag'" 1>&2
  8. - exit $EXIT_FAILURE
  9. + $echo "$modename: defaulting to \`CC'"
  10. + $echo "$modename: if this is not correct, specify a tag with \`--tag'"
  11. +# exit $EXIT_FAILURE
  12. # else
  13. # $echo "$modename: using $tagname tagged configuration"
  14. fi
  15. @@ -247,6 +248,11 @@
  16. arg="$1"
  17. shift
  18. + # Make -static behave as -all-static
  19. + case $arg in
  20. + -static) arg="-all-static" ;;
  21. + esac
  22. +
  23. case $arg in
  24. -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
  25. *) optarg= ;;
  26. @@ -1238,7 +1244,8 @@
  27. prevarg="$arg"
  28. case $arg in
  29. - -all-static)
  30. + # Make -static behave like -all-static
  31. + -all-static | -static)
  32. if test -n "$link_static_flag"; then
  33. compile_command="$compile_command $link_static_flag"
  34. finalize_command="$finalize_command $link_static_flag"
  35. @@ -2146,8 +2153,14 @@
  36. absdir="$abs_ladir"
  37. libdir="$abs_ladir"
  38. else
  39. - dir="$libdir"
  40. - absdir="$libdir"
  41. + # Adding 'libdir' from the .la file to our library search paths
  42. + # breaks crosscompilation horribly. We cheat here and don't add
  43. + # it, instead adding the path where we found the .la. -CL
  44. + dir="$abs_ladir"
  45. + absdir="$abs_ladir"
  46. + libdir="$abs_ladir"
  47. + #dir="$libdir"
  48. + #absdir="$libdir"
  49. fi
  50. else
  51. dir="$ladir/$objdir"
  52. @@ -2272,7 +2285,7 @@
  53. { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
  54. if test "$installed" = no; then
  55. notinst_deplibs="$notinst_deplibs $lib"
  56. - need_relink=yes
  57. + need_relink=no
  58. fi
  59. # This is a shared library
  60. @@ -5169,6 +5182,10 @@
  61. # Replace all uninstalled libtool libraries with the installed ones
  62. newdependency_libs=
  63. for deplib in $dependency_libs; do
  64. + # Replacing uninstalled with installed can easily break crosscompilation,
  65. + # since the installed path is generally the wrong architecture. -CL
  66. + newdependency_libs="$newdependency_libs $deplib"
  67. + continue
  68. case $deplib in
  69. *.la)
  70. name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
  71. @@ -5487,10 +5504,13 @@
  72. # At present, this check doesn't affect windows .dll's that
  73. # are installed into $libdir/../bin (currently, that works fine)
  74. # but it's something to keep an eye on.
  75. - if test "$inst_prefix_dir" = "$destdir"; then
  76. - $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
  77. - exit $EXIT_FAILURE
  78. - fi
  79. + #
  80. + # This breaks install into our staging area. -PB
  81. + #
  82. + # if test "$inst_prefix_dir" = "$destdir"; then
  83. + # $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
  84. + # exit $EXIT_FAILURE
  85. + # fi
  86. if test -n "$inst_prefix_dir"; then
  87. # Stick the inst_prefix_dir data into the link command.