buildroot-libtool-v2.2.patch 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. --- a/ltmain.sh 2010-06-09 15:08:53.000000000 +0200
  2. +++ b/ltmain.sh 2014-07-30 22:33:41.176710372 +0200
  3. @@ -1214,8 +1214,8 @@
  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. @@ -2239,8 +2239,11 @@
  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. @@ -4429,7 +4432,8 @@
  28. ;;
  29. -all-static | -static | -static-libtool-libs)
  30. case $arg in
  31. - -all-static)
  32. + # Make -static behave like -all-static
  33. + -all-static | -static)
  34. if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
  35. func_warning "complete static linking is impossible in this configuration"
  36. fi
  37. @@ -4438,12 +4442,6 @@
  38. fi
  39. prefer_static_libs=yes
  40. ;;
  41. - -static)
  42. - if test -z "$pic_flag" && test -n "$link_static_flag"; then
  43. - dlopen_self=$dlopen_self_static
  44. - fi
  45. - prefer_static_libs=built
  46. - ;;
  47. -static-libtool-libs)
  48. if test -z "$pic_flag" && test -n "$link_static_flag"; then
  49. dlopen_self=$dlopen_self_static
  50. @@ -4726,7 +4724,8 @@
  51. prevarg="$arg"
  52. case $arg in
  53. - -all-static)
  54. + # Make -static behave like -all-static
  55. + -all-static | -static)
  56. if test -n "$link_static_flag"; then
  57. # See comment for -static flag below, for more details.
  58. func_append compile_command " $link_static_flag"
  59. @@ -4995,7 +4994,7 @@
  60. continue
  61. ;;
  62. - -static | -static-libtool-libs)
  63. + -static-libtool-libs)
  64. # The effects of -static are defined in a previous loop.
  65. # We used to do the same as -all-static on platforms that
  66. # didn't have a PIC flag, but the assumption that the effects
  67. @@ -5739,8 +5738,14 @@
  68. absdir="$abs_ladir"
  69. libdir="$abs_ladir"
  70. else
  71. - dir="$libdir"
  72. - absdir="$libdir"
  73. + # Adding 'libdir' from the .la file to our library search paths
  74. + # breaks crosscompilation horribly. We cheat here and don't add
  75. + # it, instead adding the path where we found the .la. -CL
  76. + dir="$abs_ladir"
  77. + absdir="$abs_ladir"
  78. + libdir="$abs_ladir"
  79. + #dir="$libdir"
  80. + #absdir="$libdir"
  81. fi
  82. test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
  83. else
  84. @@ -5891,7 +5896,7 @@
  85. *)
  86. if test "$installed" = no; then
  87. notinst_deplibs="$notinst_deplibs $lib"
  88. - need_relink=yes
  89. + need_relink=no
  90. fi
  91. ;;
  92. esac
  93. @@ -8373,6 +8378,10 @@
  94. # Replace all uninstalled libtool libraries with the installed ones
  95. newdependency_libs=
  96. for deplib in $dependency_libs; do
  97. + # Replacing uninstalled with installed can easily break crosscompilation,
  98. + # since the installed path is generally the wrong architecture. -CL
  99. + newdependency_libs="$newdependency_libs $deplib"
  100. + continue
  101. case $deplib in
  102. *.la)
  103. func_basename "$deplib"