diff options
| author | Christopher Larson <chris_larson@mentor.com> | 2012-06-01 15:53:56 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-06-05 22:56:32 +0100 |
| commit | 286a4904d2bf135050532c7cbc3e5dfcc1ed7ed1 (patch) | |
| tree | 4e1810a72162692408a294da26d8b2e95b4ec134 /meta/recipes-core | |
| parent | 9205cba286e54576f95a5894d3953dcda43cf8bf (diff) | |
| download | poky-286a4904d2bf135050532c7cbc3e5dfcc1ed7ed1.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.
(From OE-Core rev: b9a9c28f7052884b2a6a33cf73cb6d7e2e3d11ff)
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
| -rw-r--r-- | meta/recipes-core/meta/external-sourcery-toolchain.bb | 21 |
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 += "\ | |||
| 24 | virtual/linux-libc-headers \ | 24 | virtual/linux-libc-headers \ |
| 25 | " | 25 | " |
| 26 | PV = "${CSL_VER_MAIN}" | 26 | PV = "${CSL_VER_MAIN}" |
| 27 | PR = "r5" | 27 | PR = "r6" |
| 28 | 28 | ||
| 29 | #SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/${CSL_TARGET_SYS}/arm-${PV}-${TARGET_PREFIX}i686-pc-linux-gnu.tar.bz2" | 29 | #SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/${CSL_TARGET_SYS}/arm-${PV}-${TARGET_PREFIX}i686-pc-linux-gnu.tar.bz2" |
| 30 | 30 | ||
| @@ -32,10 +32,7 @@ SRC_URI = "file://SUPPORTED" | |||
| 32 | 32 | ||
| 33 | do_install() { | 33 | do_install() { |
| 34 | # Use optimized files if available | 34 | # Use optimized files if available |
| 35 | sysroot="${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc" | 35 | sysroot="${EXTERNAL_TOOLCHAIN_SYSROOT}" |
| 36 | if [ -d $sysroot/${CSL_TARGET_CORE} ]; then | ||
| 37 | sysroot="$sysroot/${CSL_TARGET_CORE}" | ||
| 38 | fi | ||
| 39 | 36 | ||
| 40 | cp -a $sysroot${base_libdir}/. ${D}${base_libdir} | 37 | cp -a $sysroot${base_libdir}/. ${D}${base_libdir} |
| 41 | cp -a $sysroot/etc/. ${D}${sysconfdir} | 38 | cp -a $sysroot/etc/. ${D}${sysconfdir} |
| @@ -76,15 +73,11 @@ do_install() { | |||
| 76 | 73 | ||
| 77 | SYSROOT_PREPROCESS_FUNCS += "external_toolchain_sysroot_adjust" | 74 | SYSROOT_PREPROCESS_FUNCS += "external_toolchain_sysroot_adjust" |
| 78 | external_toolchain_sysroot_adjust() { | 75 | external_toolchain_sysroot_adjust() { |
| 79 | if [ -n "${CSL_TARGET_CORE}" ]; then | 76 | dest_sysroot="$(${CC} -print-sysroot | sed -e's,^${STAGING_DIR_HOST},,; s,/$,,')" |
| 80 | rm -f ${SYSROOT_DESTDIR}/${CSL_TARGET_CORE} | 77 | if [ -n "$dest_sysroot" ]; then |
| 81 | ln -s . ${SYSROOT_DESTDIR}/${CSL_TARGET_CORE} | 78 | rm -f ${SYSROOT_DESTDIR}/$dest_sysroot |
| 82 | fi | 79 | ln -s . ${SYSROOT_DESTDIR}/$dest_sysroot |
| 83 | 80 | fi | |
| 84 | if [ "${TUNE_PKGARCH}" = "i586" ]; then | ||
| 85 | rm -f ${SYSROOT_DESTDIR}/system32 | ||
| 86 | ln -s . ${SYSROOT_DESTDIR}/system32 | ||
| 87 | fi | ||
| 88 | } | 81 | } |
| 89 | 82 | ||
| 90 | PACKAGES =+ "libgcc libgcc-dev libstdc++ libstdc++-dev libstdc++-staticdev linux-libc-headers linux-libc-headers-dev gdbserver gdbserver-dbg" | 83 | PACKAGES =+ "libgcc libgcc-dev libstdc++ libstdc++-dev libstdc++-staticdev linux-libc-headers linux-libc-headers-dev gdbserver gdbserver-dbg" |
