buildroot-libtool-v2.4.4.patch 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. Libtool fixes for cross-compilation, many past contributors/authors.
  2. Update based on libtool-2.4.4, useful for 2.4.3 as well but not 2.4.2.
  3. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  4. --- a/ltmain.sh 2014-12-16 09:51:23.068441045 -0300
  5. +++ b/ltmain.sh 2014-12-16 09:57:10.509430339 -0300
  6. @@ -2687,8 +2687,8 @@
  7. # was found and let the user know that the "--tag" command
  8. # line option must be used.
  9. if test -z "$tagname"; then
  10. - func_echo "unable to infer tagged configuration"
  11. - func_fatal_error "specify a tag with '--tag'"
  12. + func_echo "defaulting to \`CC'"
  13. + func_echo "if this is not correct, specify a tag with \`--tag'"
  14. # else
  15. # func_verbose "using $tagname tagged configuration"
  16. fi
  17. @@ -4277,8 +4277,12 @@
  18. # At present, this check doesn't affect windows .dll's that
  19. # are installed into $libdir/../bin (currently, that works fine)
  20. # but it's something to keep an eye on.
  21. - test "$inst_prefix_dir" = "$destdir" && \
  22. - func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
  23. +
  24. + #
  25. + # This breaks install into our staging area. -PB
  26. + #
  27. + #test "$inst_prefix_dir" = "$destdir" && \
  28. + # func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
  29. if test -n "$inst_prefix_dir"; then
  30. # Stick the inst_prefix_dir data into the link command.
  31. @@ -6550,7 +6554,8 @@
  32. ;;
  33. -all-static | -static | -static-libtool-libs)
  34. case $arg in
  35. - -all-static)
  36. + # Make -static behave like -all-static -GZ
  37. + -all-static | -static)
  38. if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
  39. func_warning "complete static linking is impossible in this configuration"
  40. fi
  41. @@ -6559,12 +6564,6 @@
  42. fi
  43. prefer_static_libs=yes
  44. ;;
  45. - -static)
  46. - if test -z "$pic_flag" && test -n "$link_static_flag"; then
  47. - dlopen_self=$dlopen_self_static
  48. - fi
  49. - prefer_static_libs=built
  50. - ;;
  51. -static-libtool-libs)
  52. if test -z "$pic_flag" && test -n "$link_static_flag"; then
  53. dlopen_self=$dlopen_self_static
  54. @@ -6858,7 +6857,8 @@
  55. prevarg=$arg
  56. case $arg in
  57. - -all-static)
  58. + # Make -static behave like -all-static -GZ
  59. + -all-static | -static)
  60. if test -n "$link_static_flag"; then
  61. # See comment for -static flag below, for more details.
  62. func_append compile_command " $link_static_flag"
  63. @@ -7149,7 +7149,7 @@
  64. continue
  65. ;;
  66. - -static | -static-libtool-libs)
  67. + -static-libtool-libs)
  68. # The effects of -static are defined in a previous loop.
  69. # We used to do the same as -all-static on platforms that
  70. # didn't have a PIC flag, but the assumption that the effects
  71. @@ -8112,7 +8112,7 @@
  72. *)
  73. if test no = "$installed"; then
  74. func_append notinst_deplibs " $lib"
  75. - need_relink=yes
  76. + need_relink=no
  77. fi
  78. ;;
  79. esac
  80. @@ -10710,6 +10710,10 @@
  81. # Replace all uninstalled libtool libraries with the installed ones
  82. newdependency_libs=
  83. for deplib in $dependency_libs; do
  84. + # Replacing uninstalled with installed can easily break crosscompilation,
  85. + # since the installed path is generally the wrong architecture. -CL
  86. + newdependency_libs="$newdependency_libs $deplib"
  87. + continue
  88. case $deplib in
  89. *.la)
  90. func_basename "$deplib"