aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/meta
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2012-06-01 15:53:56 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-05 22:52:38 +0100
commitb9a9c28f7052884b2a6a33cf73cb6d7e2e3d11ff (patch)
treed487e3b74286ffb1dad3d4b05907b2b8311375b0 /meta/recipes-core/meta
parentb0d45a7bca3e448ceb4802540d42972a625997f8 (diff)
downloadopenembedded-core-contrib-b9a9c28f7052884b2a6a33cf73cb6d7e2e3d11ff.tar.gz
external-sourcery: extract src and dest sysroot paths from gcc
Rather than hardcoding the multilib path in a map, and hardcoding dest sysroot symlink creation in a hook, now we just use -print-sysroot for both, and pass the appropriate multilib args to the toolchain for particular tunes. 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-sourcery-toolchain.bb21
1 files changed, 7 insertions, 14 deletions
diff --git a/meta/recipes-core/meta/external-sourcery-toolchain.bb b/meta/recipes-core/meta/external-sourcery-toolchain.bb
index b8cb6d9baf..b67410b6d1 100644
--- a/meta/recipes-core/meta/external-sourcery-toolchain.bb
+++ b/meta/recipes-core/meta/external-sourcery-toolchain.bb
@@ -24,7 +24,7 @@ PROVIDES += "\
virtual/linux-libc-headers \
"
PV = "${CSL_VER_MAIN}"
-PR = "r5"
+PR = "r6"
#SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/${CSL_TARGET_SYS}/arm-${PV}-${TARGET_PREFIX}i686-pc-linux-gnu.tar.bz2"
@@ -32,10 +32,7 @@ SRC_URI = "file://SUPPORTED"
do_install() {
# Use optimized files if available
- sysroot="${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc"
- if [ -d $sysroot/${CSL_TARGET_CORE} ]; then
- sysroot="$sysroot/${CSL_TARGET_CORE}"
- fi
+ sysroot="${EXTERNAL_TOOLCHAIN_SYSROOT}"
cp -a $sysroot${base_libdir}/. ${D}${base_libdir}
cp -a $sysroot/etc/. ${D}${sysconfdir}
@@ -76,15 +73,11 @@ do_install() {
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
-
- if [ "${TUNE_PKGARCH}" = "i586" ]; then
- rm -f ${SYSROOT_DESTDIR}/system32
- ln -s . ${SYSROOT_DESTDIR}/system32
- fi
+ dest_sysroot="$(${CC} -print-sysroot | sed -e's,^${STAGING_DIR_HOST},,; s,/$,,')"
+ if [ -n "$dest_sysroot" ]; then
+ rm -f ${SYSROOT_DESTDIR}/$dest_sysroot
+ ln -s . ${SYSROOT_DESTDIR}/$dest_sysroot
+ fi
}
PACKAGES =+ "libgcc libgcc-dev libstdc++ libstdc++-dev libstdc++-staticdev linux-libc-headers linux-libc-headers-dev gdbserver gdbserver-dbg"