libtool-v2.4.patch 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. --- a/ltmain.sh
  2. +++ b/ltmain.sh
  3. @@ -443,7 +443,7 @@ opt_warning=:
  4. # name if it has been set yet.
  5. func_echo ()
  6. {
  7. - $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
  8. + $ECHO "libreCMC-$progname-patched-2.4: ${opt_mode+$opt_mode: }$*"
  9. }
  10. # func_verbose arg...
  11. @@ -469,14 +469,14 @@ func_echo_all ()
  12. # Echo program name prefixed message to standard error.
  13. func_error ()
  14. {
  15. - $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
  16. + $ECHO "libreCMC-$progname-patched-2.4: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
  17. }
  18. # func_warning arg...
  19. # Echo program name prefixed warning message to standard error.
  20. func_warning ()
  21. {
  22. - $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
  23. + $opt_warning && $ECHO "libreCMC-$progname-patched-2.4: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
  24. # bash bug again:
  25. :
  26. @@ -1416,8 +1416,8 @@ func_infer_tag ()
  27. # was found and let the user know that the "--tag" command
  28. # line option must be used.
  29. if test -z "$tagname"; then
  30. - func_echo "unable to infer tagged configuration"
  31. - func_fatal_error "specify a tag with \`--tag'"
  32. + func_echo "defaulting to \`CC'"
  33. + func_echo "if this is not correct, specify a tag with \`--tag'"
  34. # else
  35. # func_verbose "using $tagname tagged configuration"
  36. fi
  37. @@ -2953,8 +2953,15 @@ func_mode_install ()
  38. func_append dir "$objdir"
  39. if test -n "$relink_command"; then
  40. + # Strip any trailing slash from the destination.
  41. + func_stripname '' '/' "$libdir"
  42. + s_libdir=$func_stripname_result
  43. +
  44. + func_stripname '' '/' "$destdir"
  45. + s_destdir=$func_stripname_result
  46. +
  47. # Determine the prefix the user has applied to our future dir.
  48. - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
  49. + inst_prefix_dir=`$ECHO "$s_destdir" | $SED -e "s%$s_libdir\$%%"`
  50. # Don't allow the user to place us outside of our expected
  51. # location b/c this prevents finding dependent libraries that
  52. @@ -2962,8 +2969,11 @@ func_mode_install ()
  53. # At present, this check doesn't affect windows .dll's that
  54. # are installed into $libdir/../bin (currently, that works fine)
  55. # but it's something to keep an eye on.
  56. - test "$inst_prefix_dir" = "$destdir" && \
  57. - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
  58. + #
  59. + # This breaks install into our staging area. -PB
  60. + #
  61. + # test "$inst_prefix_dir" = "$destdir" && \
  62. + # func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
  63. if test -n "$inst_prefix_dir"; then
  64. # Stick the inst_prefix_dir data into the link command.
  65. @@ -2972,6 +2982,9 @@ func_mode_install ()
  66. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
  67. fi
  68. + relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/lib[^[:space:]]*%%"`
  69. + relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/usr/lib[^[:space:]]*%%"`
  70. +
  71. func_warning "relinking \`$file'"
  72. func_show_eval "$relink_command" \
  73. 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
  74. @@ -6504,8 +6517,12 @@ func_mode_link ()
  75. absdir="$abs_ladir"
  76. libdir="$abs_ladir"
  77. else
  78. - dir="$lt_sysroot$libdir"
  79. - absdir="$lt_sysroot$libdir"
  80. + # Adding 'libdir' from the .la file to our library search paths
  81. + # breaks crosscompilation horribly. We cheat here and don't add
  82. + # it, instead adding the path where we found the .la. -CL
  83. + dir="$lt_sysroot$abs_ladir"
  84. + absdir="$abs_ladir"
  85. + libdir="$abs_ladir"
  86. fi
  87. test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
  88. else
  89. @@ -6683,7 +6700,7 @@ func_mode_link ()
  90. *)
  91. if test "$installed" = no; then
  92. func_append notinst_deplibs " $lib"
  93. - need_relink=yes
  94. + need_relink=no
  95. fi
  96. ;;
  97. esac
  98. @@ -6887,7 +6904,6 @@ func_mode_link ()
  99. test "$hardcode_direct_absolute" = no; then
  100. add="$libdir/$linklib"
  101. elif test "$hardcode_minus_L" = yes; then
  102. - add_dir="-L$libdir"
  103. add="-l$name"
  104. elif test "$hardcode_shlibpath_var" = yes; then
  105. case :$finalize_shlibpath: in
  106. @@ -6903,8 +6919,6 @@ func_mode_link ()
  107. add="$libdir/$linklib"
  108. fi
  109. else
  110. - # We cannot seem to hardcode it, guess we'll fake it.
  111. - add_dir="-L$libdir"
  112. # Try looking first in the location we're being installed to.
  113. if test -n "$inst_prefix_dir"; then
  114. case $libdir in
  115. @@ -7059,7 +7073,17 @@ func_mode_link ()
  116. fi
  117. ;;
  118. *)
  119. - path="-L$absdir/$objdir"
  120. + # OE sets installed=no in staging. We need to look in $objdir and $absdir,
  121. + # preferring $objdir. RP 31/04/2008
  122. + if test -f "$absdir/$objdir/$depdepl" ; then
  123. + depdepl="$absdir/$objdir/$depdepl"
  124. + path="-L$absdir/$objdir"
  125. + elif test -f "$absdir/$depdepl" ; then
  126. + depdepl="$absdir/$depdepl"
  127. + path="-L$absdir"
  128. + else
  129. + path="-L$absdir/$objdir"
  130. + fi
  131. ;;
  132. esac
  133. else
  134. @@ -8050,7 +8074,7 @@ EOF
  135. elif test -n "$runpath_var"; then
  136. case "$perm_rpath " in
  137. *" $libdir "*) ;;
  138. - *) func_apped perm_rpath " $libdir" ;;
  139. + *) func_append perm_rpath " $libdir" ;;
  140. esac
  141. fi
  142. done
  143. @@ -9257,6 +9281,10 @@ EOF
  144. # Replace all uninstalled libtool libraries with the installed ones
  145. newdependency_libs=
  146. for deplib in $dependency_libs; do
  147. + # Replacing uninstalled with installed can easily break crosscompilation,
  148. + # since the installed path is generally the wrong architecture. -CL
  149. + newdependency_libs="$newdependency_libs $deplib"
  150. + continue
  151. case $deplib in
  152. *.la)
  153. func_basename "$deplib"