Signed-off-by: Khem Raj <[email protected]>
---
 classes/cross.bbclass   |    7 +++----
 classes/staging.bbclass |   19 ++++++++++---------
 classes/utils.bbclass   |    2 +-
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/classes/cross.bbclass b/classes/cross.bbclass
index d3b27e6..1a6d906 100644
--- a/classes/cross.bbclass
+++ b/classes/cross.bbclass
@@ -74,8 +74,7 @@ sysroot_stage_all() {
 }
 
 #
-# Cross .la files have more path issues we have to correct
-SYSROOTEXTRALIBDIRSED = '-e 
"/^libdir=/s,.*,libdir=${STAGING_DIR_TARGET}${target_libdir},g" \
-                         -e 
"/^dependency_libs=/s,\([[:space:]']\)-L${STAGING_LIBDIR_NATIVE},,g" \
-'
+# Cross .la files have more path issues we have to correct only for libtool < 
2.4
+SYSROOTEXTRALIBDIRSED_OLD = " -e 
\"/^libdir=/s,.*,libdir=${STAGING_DIR_TARGET}${target_libdir},g\" -e 
\"/^dependency_libs=/s,\([[:space:]']\)-L${STAGING_LIBDIR_NATIVE},,g\""
 
+SYSROOTEXTRALIBDIRSED = 
"$...@["${SYSROOTEXTRALIBDIRSED_OLD}",""][("${LIBTOOL_HAS_SYSROOT}" == "yes")]}"
diff --git a/classes/staging.bbclass b/classes/staging.bbclass
index 303f74c..3f4ff8c 100644
--- a/classes/staging.bbclass
+++ b/classes/staging.bbclass
@@ -42,20 +42,21 @@ SYSROOTEXTRALIBDIRSED ?= ""
 sysroot_stage_libdir() {
        src="$1"
        dest="$2"
-
-       olddir=`pwd`
-       cd $src
-       las=$(find . -name \*.la -type f)
-       cd $olddir
-       echo "Found la files: $las"              
-       for i in $las
-       do
+       if [ "${LIBTOOL_HAS_SYSROOT}" = "no" ]; then
+           olddir=`pwd`
+           cd $src
+           las=$(find . -name \*.la -type f)
+           cd $olddir
+           echo "Found la files: $las" 
+           for i in $las
+           do
                sed -e 's/^installed=yes$/installed=no/' \
                    -e 
'/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),${STAGING_LIBDIR}/\1,g'
 \
                    -e 
"/^dependency_libs=/s,\([[:space:]']\)${libdir},\1${STAGING_LIBDIR},g" \
                    ${SYSROOTEXTRALIBDIRSED} \
                    -i $src/$i
-       done
+           done
+       fi
        sysroot_stage_dir $src $dest
 }
 
diff --git a/classes/utils.bbclass b/classes/utils.bbclass
index 61f3731..f7d6996 100644
--- a/classes/utils.bbclass
+++ b/classes/utils.bbclass
@@ -369,7 +369,7 @@ oe_libinstall() {
                __runcmd install -m 0644 $dota $destpath/
        fi
        if [ -f "$dotlai" -a -n "$libtool" ]; then
-               if test -n "$staging_install"
+               if [ -n "$staging_install" -a "${LIBTOOL_HAS_SYSROOT}" = "no" ]
                then
                        # stop libtool using the final directory name for 
libraries
                        # in staging:
-- 
1.7.1


_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Reply via email to