aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/meta
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2012-01-27 11:13:45 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-03 16:13:43 +0000
commita37298eb3421a44e88ec5a66b2fc5305ab18f453 (patch)
tree099efb278f4d66aed207de22eff182d2c60f13d4 /meta/recipes-core/meta
parent64eccd7aacbb7e31478482e0deec1a6a3a94c9ea (diff)
downloadopenembedded-core-contrib-a37298eb3421a44e88ec5a66b2fc5305ab18f453.tar.gz
openembedded-core-contrib-a37298eb3421a44e88ec5a66b2fc5305ab18f453.tar.bz2
openembedded-core-contrib-a37298eb3421a44e88ec5a66b2fc5305ab18f453.zip
external-csl-toolchain: support mips/ppc/arm
- Rather than adjusting TARGET_VENDOR, which results in our TARGET_SYS matching the external toolchain, override TARGET_PREFIX to match external, and leave TARGET_SYS alone - Grab the optimized files out of the toolchain if available - Create a symlink in sysroot to ensure the sysroot layout matches toolchain expectations (optimized files in a subdir) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/meta')
-rw-r--r--meta/recipes-core/meta/external-csl-toolchain.bb32
1 files changed, 25 insertions, 7 deletions
diff --git a/meta/recipes-core/meta/external-csl-toolchain.bb b/meta/recipes-core/meta/external-csl-toolchain.bb
index f1e53328b4b..37ea271eb12 100644
--- a/meta/recipes-core/meta/external-csl-toolchain.bb
+++ b/meta/recipes-core/meta/external-csl-toolchain.bb
@@ -25,25 +25,43 @@ PROVIDES = "\
virtual/linux-libc-headers "
RPROVIDES = "glibc-utils libsegfault glibc-thread-db"
PACKAGES_DYNAMIC = "glibc-gconv-*"
-PR = "r2"
+PR = "r3"
-#SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/${TARGET_SYS}/arm-${PV}-${TARGET_PREFIX}i686-pc-linux-gnu.tar.bz2"
+#SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/${CSL_TARGET_SYS}/arm-${PV}-${TARGET_PREFIX}i686-pc-linux-gnu.tar.bz2"
SRC_URI = "file://SUPPORTED"
do_install() {
install -d ${D}${sysconfdir} ${D}${bindir} ${D}${sbindir} ${D}${base_bindir} ${D}${libdir}
- install -d ${D}${base_libdir} ${D}${base_sbindir} ${D}${datadir}
+ install -d ${D}${base_libdir} ${D}${base_sbindir} ${D}${datadir} ${D}/usr
- cp -a ${EXTERNAL_TOOLCHAIN}/${TARGET_SYS}/libc/lib/* ${D}${base_libdir}
- cp -a ${EXTERNAL_TOOLCHAIN}/${TARGET_SYS}/libc/etc/* ${D}${sysconfdir}
- cp -a ${EXTERNAL_TOOLCHAIN}/${TARGET_SYS}/libc/sbin/* ${D}${base_sbindir}
- cp -a ${EXTERNAL_TOOLCHAIN}/${TARGET_SYS}/libc/usr/* ${D}/usr
+ if [ -d ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/${CSL_TARGET_CORE} ]; then
+ cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/${CSL_TARGET_CORE}/lib/. ${D}${base_libdir}
+ cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/${CSL_TARGET_CORE}/etc/. ${D}${sysconfdir}
+ cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/${CSL_TARGET_CORE}/sbin/. ${D}${base_sbindir}
+ if [ ! -e ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/${CSL_TARGET_CORE}/usr/include ]; then
+ cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/usr/include ${D}/usr/
+ fi
+ cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/${CSL_TARGET_CORE}/usr/. ${D}/usr/
+ else
+ cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/lib/. ${D}${base_libdir}
+ cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/etc/. ${D}${sysconfdir}
+ cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/sbin/. ${D}${base_sbindir}
+ cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/usr/. ${D}/usr/
+ fi
sed -i -e "s# /lib# ../../lib#g" -e "s# /usr/lib# .#g" ${D}${libdir}/libc.so
sed -i -e "s# /lib# ../../lib#g" -e "s# /usr/lib# .#g" ${D}${libdir}/libpthread.so
}
+SYSROOT_PREPROCESS_FUNCS += "external_toolchain_sysroot_adjust"
+external_toolchain_sysroot_adjust() {
+ if [ -n "${CSL_TARGET_CORE}" ]; then
+ rm -f ${SYSROOT_DESTDIR}/${CSL_TARGET_CORE}
+ ln -s . ${SYSROOT_DESTDIR}/${CSL_TARGET_CORE}
+ fi
+}
+
GLIBC_INTERNAL_USE_BINARY_LOCALE ?= "compile"
PACKAGES += "libgcc libgcc-dev libstdc++ libstdc++-dev linux-libc-headers linux-libc-headers-dev"