libtool-v1.5.patch 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. --- a/ltmain.sh
  2. +++ b/ltmain.sh
  3. @@ -35,7 +35,7 @@ progpath="$0"
  4. # The name of this program:
  5. progname=`echo "$progpath" | $SED $basename`
  6. -modename="$progname"
  7. +modename="libreCMC-$progname-patched-1.5"
  8. # Global variables:
  9. EXIT_SUCCESS=0
  10. @@ -297,8 +297,8 @@ func_infer_tag ()
  11. # line option must be used.
  12. if test -z "$tagname"; then
  13. $echo "$modename: unable to infer tagged configuration"
  14. - $echo "$modename: specify a tag with \`--tag'" 1>&2
  15. - exit $EXIT_FAILURE
  16. + $echo "$modename: defaulting to \`CC'"
  17. + $echo "$modename: if this is not correct, specify a tag with \`--tag'"
  18. # else
  19. # $echo "$modename: using $tagname tagged configuration"
  20. fi
  21. @@ -2462,8 +2462,14 @@ EOF
  22. absdir="$abs_ladir"
  23. libdir="$abs_ladir"
  24. else
  25. - dir="$libdir"
  26. - absdir="$libdir"
  27. + # Adding 'libdir' from the .la file to our library search paths
  28. + # breaks crosscompilation horribly. We cheat here and don't add
  29. + # it, instead adding the path where we found the .la. -CL
  30. + dir="$lt_sysroot$abs_ladir"
  31. + absdir="$abs_ladir"
  32. + libdir="$abs_ladir"
  33. + #dir="$libdir"
  34. + #absdir="$libdir"
  35. fi
  36. test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
  37. else
  38. @@ -2602,7 +2608,7 @@ EOF
  39. { test "$use_static_libs" = no || test -z "$old_library"; }; then
  40. if test "$installed" = no; then
  41. notinst_deplibs="$notinst_deplibs $lib"
  42. - need_relink=yes
  43. + need_relink=no
  44. fi
  45. # This is a shared library
  46. @@ -2804,7 +2810,6 @@ EOF
  47. if test "$hardcode_direct" = yes; then
  48. add="$libdir/$linklib"
  49. elif test "$hardcode_minus_L" = yes; then
  50. - add_dir="-L$libdir"
  51. add="-l$name"
  52. elif test "$hardcode_shlibpath_var" = yes; then
  53. case :$finalize_shlibpath: in
  54. @@ -2820,8 +2825,6 @@ EOF
  55. add="$libdir/$linklib"
  56. fi
  57. else
  58. - # We cannot seem to hardcode it, guess we'll fake it.
  59. - add_dir="-L$libdir"
  60. # Try looking first in the location we're being installed to.
  61. if test -n "$inst_prefix_dir"; then
  62. case $libdir in
  63. @@ -5687,6 +5690,10 @@ fi\
  64. # Replace all uninstalled libtool libraries with the installed ones
  65. newdependency_libs=
  66. for deplib in $dependency_libs; do
  67. + # Replacing uninstalled with installed can easily break crosscompilation,
  68. + # since the installed path is generally the wrong architecture. -CL
  69. + newdependency_libs="$newdependency_libs $deplib"
  70. + continue
  71. case $deplib in
  72. *.la)
  73. name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
  74. @@ -5999,8 +6006,12 @@ relink_command=\"$relink_command\""
  75. dir="$dir$objdir"
  76. if test -n "$relink_command"; then
  77. + # Strip any trailing slash from the destination.
  78. + s_libdir=`$echo "X$libdir" | $Xsed -e 's%/$%%'`
  79. + s_destdir=`$echo "X$destdir" | $Xsed -e 's%/$%%'`
  80. +
  81. # Determine the prefix the user has applied to our future dir.
  82. - inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
  83. + inst_prefix_dir=`$echo "$s_destdir" | $SED "s%$s_libdir\$%%"`
  84. # Don't allow the user to place us outside of our expected
  85. # location b/c this prevents finding dependent libraries that
  86. @@ -6008,10 +6019,13 @@ relink_command=\"$relink_command\""
  87. # At present, this check doesn't affect windows .dll's that
  88. # are installed into $libdir/../bin (currently, that works fine)
  89. # but it's something to keep an eye on.
  90. - if test "$inst_prefix_dir" = "$destdir"; then
  91. - $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
  92. - exit $EXIT_FAILURE
  93. - fi
  94. + #
  95. + # This breaks install into our staging area. -PB
  96. + #
  97. + # if test "$inst_prefix_dir" = "$destdir"; then
  98. + # $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
  99. + # exit $EXIT_FAILURE
  100. + # fi
  101. if test -n "$inst_prefix_dir"; then
  102. # Stick the inst_prefix_dir data into the link command.
  103. @@ -6020,6 +6034,9 @@ relink_command=\"$relink_command\""
  104. relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
  105. fi
  106. + relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/lib[^[:space:]]*%%"`
  107. + relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/usr/lib[^[:space:]]*%%"`
  108. +
  109. $echo "$modename: warning: relinking \`$file'" 1>&2
  110. $show "$relink_command"
  111. if $run eval "$relink_command"; then :