buildroot-libtool.patch 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. --- a/ltmain.sh 2006-03-11 13:49:04.000000000 -0500
  2. +++ b/ltmain.sh 2008-04-30 09:55:28.000000000 -0400
  3. @@ -273,8 +273,9 @@ func_infer_tag ()
  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. @@ -2407,8 +2408,14 @@ EOF
  16. absdir="$abs_ladir"
  17. libdir="$abs_ladir"
  18. else
  19. - dir="$libdir"
  20. - absdir="$libdir"
  21. + # Adding 'libdir' from the .la file to our library search paths
  22. + # breaks crosscompilation horribly. We cheat here and don't add
  23. + # it, instead adding the path where we found the .la. -CL
  24. + dir="$abs_ladir"
  25. + absdir="$abs_ladir"
  26. + libdir="$abs_ladir"
  27. + #dir="$libdir"
  28. + #absdir="$libdir"
  29. fi
  30. test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
  31. else
  32. @@ -2545,7 +2552,7 @@ EOF
  33. { test "$use_static_libs" = no || test -z "$old_library"; }; then
  34. if test "$installed" = no; then
  35. notinst_deplibs="$notinst_deplibs $lib"
  36. - need_relink=yes
  37. + need_relink=no
  38. fi
  39. # This is a shared library
  40. @@ -2889,6 +2896,16 @@ EOF
  41. esac
  42. if grep "^installed=no" $deplib > /dev/null; then
  43. path="$absdir/$objdir"
  44. +# This interferes with crosscompilation. -CL
  45. +# else
  46. +# eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
  47. +# if test -z "$libdir"; then
  48. +# $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
  49. +# exit 1
  50. +# fi
  51. +# if test "$absdir" != "$libdir"; then
  52. +# $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
  53. +# fi
  54. else
  55. eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
  56. if test -z "$libdir"; then
  57. @@ -5606,6 +5623,10 @@ fi\
  58. # Replace all uninstalled libtool libraries with the installed ones
  59. newdependency_libs=
  60. for deplib in $dependency_libs; do
  61. + # Replacing uninstalled with installed can easily break crosscompilation,
  62. + # since the installed path is generally the wrong architecture. -CL
  63. + newdependency_libs="$newdependency_libs $deplib"
  64. + continue
  65. case $deplib in
  66. *.la)
  67. name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
  68. @@ -5927,10 +5948,13 @@ relink_command=\"$relink_command\""
  69. # At present, this check doesn't affect windows .dll's that
  70. # are installed into $libdir/../bin (currently, that works fine)
  71. # but it's something to keep an eye on.
  72. - if test "$inst_prefix_dir" = "$destdir"; then
  73. - $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
  74. - exit $EXIT_FAILURE
  75. - fi
  76. + #
  77. + # This breaks install into our staging area. -PB
  78. + #
  79. + # if test "$inst_prefix_dir" = "$destdir"; then
  80. + # $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
  81. + # exit $EXIT_FAILURE
  82. + # fi
  83. if test -n "$inst_prefix_dir"; then
  84. # Stick the inst_prefix_dir data into the link command.