gcc-package-target.inc: Fix the broken libgcc_s.so symlink
authorKhem Raj <raj.khem@gmail.com>
Fri, 3 Dec 2010 20:05:34 +0000 (12:05 -0800)
committerKhem Raj <raj.khem@gmail.com>
Fri, 3 Dec 2010 20:18:11 +0000 (12:18 -0800)
Currently libgcc_s.so points to libgcc_s.so.1 in the same
<target>/usr/lib dir but this library is in /lib and target toolchain
fails. We package libgcc_so into gcc package and create the proper
symlink as it used to be

Signed-off-by: Khem Raj <raj.khem@gmail.com>
recipes/gcc/gcc-package-target.inc

index 5720318..d2c9a80 100644 (file)
@@ -127,6 +127,11 @@ do_install () {
        else
                mv ${D}${libdir}/libgcc_s.so.* ${D}${base_libdir} || true
        fi
+       rm -f ${D}${libdir}/libgcc_s.so || true 
+       ln -sf `echo ${libdir}/gcc/${TARGET_SYS}/${BINV} \
+               | tr -s / \
+               | sed -e 's,^/,,' -e 's,[^/]*,..,g'`/lib/libgcc_s.so.1 \
+               ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/libgcc_s.so
 
        # We don't need libtool libraries
        rm -f ${D}${libdir}/libg2c.la &>/dev/null || true