libtool-2.4: Append lt_sysroot to libdir
authorKhem Raj <raj.khem@gmail.com>
Fri, 15 Oct 2010 23:37:52 +0000 (16:37 -0700)
committerKhem Raj <raj.khem@gmail.com>
Fri, 15 Oct 2010 23:37:52 +0000 (16:37 -0700)
Remove cross.patch which is not needed now.
Fix PR setting.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
recipes/libtool/libtool-2.4/cross.patch [deleted file]
recipes/libtool/libtool-2.4/resolve-sysroot.patch
recipes/libtool/libtool-2.4/use-sysroot-in-libpath.patch [new file with mode: 0644]
recipes/libtool/libtool-cross_2.4.bb
recipes/libtool/libtool-native_2.4.bb
recipes/libtool/libtool-nativesdk_2.4.bb
recipes/libtool/libtool-sdk_2.4.bb
recipes/libtool/libtool.inc
recipes/libtool/libtool_2.4.bb

diff --git a/recipes/libtool/libtool-2.4/cross.patch b/recipes/libtool/libtool-2.4/cross.patch
deleted file mode 100644 (file)
index fb25e38..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-Index: libtool-2.4/libltdl/config/ltmain.m4sh
-===================================================================
---- libtool-2.4.orig/libltdl/config/ltmain.m4sh
-+++ libtool-2.4/libltdl/config/ltmain.m4sh
-@@ -6121,8 +6121,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
-@@ -6277,8 +6275,18 @@ 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
-                 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
index 57689a5..62ad72b 100644 (file)
@@ -6,7 +6,7 @@ Index: libtool-2.4/libltdl/config/ltmain.m4sh
 ===================================================================
 --- libtool-2.4.orig/libltdl/config/ltmain.m4sh
 +++ libtool-2.4/libltdl/config/ltmain.m4sh
-@@ -8480,7 +8480,8 @@ EOF
+@@ -8479,7 +8479,8 @@ EOF
              *.la)
                func_basename "$deplib"
                name="$func_basename_result"
@@ -16,3 +16,24 @@ Index: libtool-2.4/libltdl/config/ltmain.m4sh
                test -z "$libdir" && \
                  func_fatal_error "\`$deplib' is not a valid libtool archive"
                func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+@@ -8505,7 +8506,9 @@ EOF
+             *.la)
+               func_basename "$lib"
+               name="$func_basename_result"
+-              eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
++              func_resolve_sysroot "$lib"
++              eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
++
+               test -z "$libdir" && \
+                 func_fatal_error "\`$lib' is not a valid libtool archive"
+               func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
+@@ -8524,7 +8527,8 @@ EOF
+               # the library:
+               func_basename "$lib"
+               name="$func_basename_result"
+-              eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
++              func_resolve_sysroot "$lib"
++              eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
+               test -z "$libdir" && \
+                 func_fatal_error "\`$lib' is not a valid libtool archive"
+               func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
diff --git a/recipes/libtool/libtool-2.4/use-sysroot-in-libpath.patch b/recipes/libtool/libtool-2.4/use-sysroot-in-libpath.patch
new file mode 100644 (file)
index 0000000..017ab08
--- /dev/null
@@ -0,0 +1,19 @@
+When using sysroot we should append it to libdir which is helpful in cross builds
+as the system is staged in the sysroot. For normal build i.e. when lt_sysroot is not
+set it will still behave same and add -L/usr/lib to relink command
+
+-Khem
+
+Index: libtool-2.4/libltdl/config/ltmain.m4sh
+===================================================================
+--- libtool-2.4.orig/libltdl/config/ltmain.m4sh
++++ libtool-2.4/libltdl/config/ltmain.m4sh
+@@ -6122,7 +6122,7 @@ func_mode_link ()
+             fi
+           else
+             # We cannot seem to hardcode it, guess we'll fake it.
+-            add_dir="-L$libdir"
++            add_dir="-L$lt_sysroot$libdir"
+             # Try looking first in the location we're being installed to.
+             if test -n "$inst_prefix_dir"; then
+               case $libdir in
index cc477ba..709e18e 100644 (file)
@@ -1,9 +1,9 @@
 require libtool.inc
+PR = "${INC_PR}.1"
 
 DEFAULT_PREFERENCE = "-1"
 
 SRC_URI_append = " file://prefix.patch \
-                   file://cross.patch \
                  "
 SRC_URI[md5sum] = "b32b04148ecdd7344abc6fe8bd1bb021"
 SRC_URI[sha256sum] = "13df57ab63a94e196c5d6e95d64e53262834fe780d5e82c28f177f9f71ddf62e"
index e40680c..0fd2ec8 100644 (file)
@@ -1,11 +1,11 @@
 require libtool.inc
+PR = "${INC_PR}.1"
 
 DEFAULT_PREFERENCE = "-1"
 
 DEPENDS = ""
 
 SRC_URI_append = " file://prefix.patch \
-                   file://cross.patch \
                  "
 SRC_URI[md5sum] = "b32b04148ecdd7344abc6fe8bd1bb021"
 SRC_URI[sha256sum] = "13df57ab63a94e196c5d6e95d64e53262834fe780d5e82c28f177f9f71ddf62e"
index 9aaf68a..961e48a 100644 (file)
@@ -1,8 +1,8 @@
 require libtool.inc
+PR = "${INC_PR}.1"
 DEFAULT_PREFERENCE = "-1"
 
 SRC_URI_append = " file://prefix.patch \
-                   file://cross.patch \
                  "
 SRC_URI[md5sum] = "b32b04148ecdd7344abc6fe8bd1bb021"
 SRC_URI[sha256sum] = "13df57ab63a94e196c5d6e95d64e53262834fe780d5e82c28f177f9f71ddf62e"
index cf8ba3a..674eb73 100644 (file)
@@ -1,8 +1,8 @@
 require libtool.inc
+PR = "${INC_PR}.1"
 DEFAULT_PREFERENCE = "-1"
 
 SRC_URI_append = " file://prefix.patch \
-                   file://cross.patch \
                  "
 SRC_URI[md5sum] = "b32b04148ecdd7344abc6fe8bd1bb021"
 SRC_URI[sha256sum] = "13df57ab63a94e196c5d6e95d64e53262834fe780d5e82c28f177f9f71ddf62e"
index 6c194dd..97fdb30 100644 (file)
@@ -16,8 +16,9 @@ FILESPATHPKG=. "libtool-${PV}:"
 
 SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
            file://trailingslash.patch \
-           file://prefix-manpage-fix.patch \
+          file://prefix-manpage-fix.patch \
           file://resolve-sysroot.patch \
+          file://use-sysroot-in-libpath.patch \
           "
 do_configure_prepend () {
        if ${@['true', 'false'][bb.data.inherits_class('native', d) or bb.data.inherits_class('sdk', d) or (bb.data.getVar('PN', d, 1) == 'libtool-cross')]}
index c7c56fd..b122f91 100644 (file)
@@ -3,7 +3,7 @@ require libtool.inc
 DEFAULT_PREFERENCE = "-1"
 
 DEPENDS = "libtool-native"
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
 
 SRC_URI[md5sum] = "b32b04148ecdd7344abc6fe8bd1bb021"
 SRC_URI[sha256sum] = "13df57ab63a94e196c5d6e95d64e53262834fe780d5e82c28f177f9f71ddf62e"