libtool: extend all ltmain.m4sh patches to cover ltmain.sh as well, prevent configure...
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 21 Dec 2010 22:37:54 +0000 (22:37 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 21 Dec 2010 22:37:54 +0000 (22:37 +0000)
SVN-Revision: 24752

tools/libtool/Makefile
tools/libtool/patches/100-libdir-fixes.patch
tools/libtool/patches/110-dont-use-target-dir-for-relinking.patch
tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch
tools/libtool/patches/150-trailingslash.patch

index 82730dfee86819074583f1c413ee8fe4dac0158b..fce68aebadf007997c3fd1d476c9355191612a38 100644 (file)
@@ -15,6 +15,9 @@ PKG_MD5SUM:=b32b04148ecdd7344abc6fe8bd1bb021
 
 include $(INCLUDE_DIR)/host-build.mk
 
+HOST_CONFIGURE_VARS += \
+       lt_cv_sys_dlsearch_path=""
+
 define Host/Compile
        $(MAKE) -C $(HOST_BUILD_DIR)
 endef
index fb0254bf7e79ead56f62e80456216b71b10731a7..d4e6f785ccd6412f4f2bf21bf2e300f72100aeb5 100644 (file)
@@ -1,8 +1,6 @@
-Index: libtool-2.4/libltdl/config/ltmain.m4sh
-===================================================================
---- libtool-2.4.orig/libltdl/config/ltmain.m4sh        2010-09-22 16:45:18.000000000 +0200
-+++ libtool-2.4/libltdl/config/ltmain.m4sh     2010-12-06 22:51:21.961732599 +0100
-@@ -5715,8 +5715,14 @@
+--- a/libltdl/config/ltmain.m4sh
++++ b/libltdl/config/ltmain.m4sh
+@@ -5715,8 +5715,14 @@ func_mode_link ()
            absdir="$abs_ladir"
            libdir="$abs_ladir"
          else
@@ -19,7 +17,7 @@ Index: libtool-2.4/libltdl/config/ltmain.m4sh
          fi
          test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
        else
-@@ -6114,8 +6120,6 @@
+@@ -6114,8 +6120,6 @@ func_mode_link ()
                add="$libdir/$linklib"
              fi
            else
@@ -28,7 +26,54 @@ Index: libtool-2.4/libltdl/config/ltmain.m4sh
              # Try looking first in the location we're being installed to.
              if test -n "$inst_prefix_dir"; then
                case $libdir in
-@@ -6270,7 +6274,17 @@
+@@ -6270,7 +6274,17 @@ func_mode_link ()
+                 fi
+                 ;;
+               *)
+-                path="-L$absdir/$objdir"
++                  # OE sets installed=no in staging. We need to look in $objdir and $absdir, 
++                  # preferring $objdir. RP 31/04/2008
++                  if test -f "$absdir/$objdir/$depdepl" ; then
++                  depdepl="$absdir/$objdir/$depdepl"
++                  path="-L$absdir/$objdir"
++                  elif test -f "$absdir/$depdepl" ; then
++                  depdepl="$absdir/$depdepl"
++                  path="-L$absdir"
++                  else
++                  path="-L$absdir/$objdir"
++                  fi
+                 ;;
+               esac
+               else
+--- a/libltdl/config/ltmain.sh
++++ b/libltdl/config/ltmain.sh
+@@ -6504,8 +6504,14 @@ func_mode_link ()
+           absdir="$abs_ladir"
+           libdir="$abs_ladir"
+         else
+-          dir="$lt_sysroot$libdir"
+-          absdir="$lt_sysroot$libdir"
++          # Adding 'libdir' from the .la file to our library search paths
++          # breaks crosscompilation horribly.  We cheat here and don't add
++          # it, instead adding the path where we found the .la.  -CL
++          dir="$lt_sysroot$abs_ladir"
++          absdir="$abs_ladir"
++          libdir="$abs_ladir"
++          #dir="$libdir"
++          #absdir="$lt_sysroot$libdir"
+         fi
+         test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+       else
+@@ -6903,8 +6909,6 @@ func_mode_link ()
+               add="$libdir/$linklib"
+             fi
+           else
+-            # We cannot seem to hardcode it, guess we'll fake it.
+-            add_dir="-L$libdir"
+             # Try looking first in the location we're being installed to.
+             if test -n "$inst_prefix_dir"; then
+               case $libdir in
+@@ -7059,7 +7063,17 @@ func_mode_link ()
                  fi
                  ;;
                *)
index f2681aea62282fe8aea82924a134483cc346b7d7..c78058934ad5e7efef8b7c4f4b52248f58238277 100644 (file)
@@ -8,3 +8,13 @@
              add="-l$name"
            elif test "$hardcode_shlibpath_var" = yes; then
              case :$finalize_shlibpath: in
+--- a/libltdl/config/ltmain.sh
++++ b/libltdl/config/ltmain.sh
+@@ -6893,7 +6893,6 @@ func_mode_link ()
+              test "$hardcode_direct_absolute" = no; then
+             add="$libdir/$linklib"
+           elif test "$hardcode_minus_L" = yes; then
+-            add_dir="-L$libdir"
+             add="-l$name"
+           elif test "$hardcode_shlibpath_var" = yes; then
+             case :$finalize_shlibpath: in
index 564d885a50091654c7d53cc78c25e9d5b47c8dbb..1c3df4c0049a6f0d0e03152307a1ab85233152e2 100644 (file)
          func_warning "relinking \`$file'"
          func_show_eval "$relink_command" \
            'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+--- a/libltdl/config/ltmain.sh
++++ b/libltdl/config/ltmain.sh
+@@ -2972,6 +2972,9 @@ func_mode_install ()
+           relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+         fi
++        relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/lib[^[:space:]]*%%"`
++        relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/usr/lib[^[:space:]]*%%"`
++
+         func_warning "relinking \`$file'"
+         func_show_eval "$relink_command" \
+           'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
index 14aa27be860944dce474d9bcb464ade832f2e265..a01f9be77b1594f908a78ece71d6091f70189ce0 100644 (file)
@@ -28,3 +28,22 @@ Nitin A Kamble <nitin.a.kamble@intel.com>
  
          # Don't allow the user to place us outside of our expected
          # location b/c this prevents finding dependent libraries that
+--- a/libltdl/config/ltmain.sh
++++ b/libltdl/config/ltmain.sh
+@@ -2953,8 +2953,15 @@ func_mode_install ()
+       func_append dir "$objdir"
+       if test -n "$relink_command"; then
++      # Strip any trailing slash from the destination.
++      func_stripname '' '/' "$libdir"
++      destlibdir=$func_stripname_result
++
++      func_stripname '' '/' "$destdir"
++      s_destdir=$func_stripname_result
++
+         # Determine the prefix the user has applied to our future dir.
+-        inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
++        inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"`
+         # Don't allow the user to place us outside of our expected
+         # location b/c this prevents finding dependent libraries that