]> code.ossystems Code Review - openembedded-core.git/commitdiff
gcc-cross-kernel: update to match new toolchain sysroot layout
authorKoen Kooi <koen@dominion.thruhere.net>
Mon, 27 Jun 2011 16:56:42 +0000 (18:56 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 28 Jun 2011 14:04:09 +0000 (15:04 +0100)
The versioned gcc binary gets installed and the needed binutils symlinks are made.

To make it fully work again the following is needed in kernel recipes/classes:

PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.gcc-cross-kernel:"

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-cross-kernel.inc

index 534776276267f047cedf10f5da495ef07c507842..be772ba79abfbc1409b47771ebc6ee31d7e11a8f 100644 (file)
@@ -6,5 +6,14 @@ PROVIDES = "virtual/${TARGET_PREFIX}gcc-${PV}"
 do_install () {
        cd gcc
        oe_runmake 'DESTDIR=${D}' install-common install-headers install-libgcc
-       install -m 0755 xgcc ${D}${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gcc-${PV}
+       install -m 0755 xgcc  ${D}${bindir}/${TARGET_PREFIX}gcc-${PV}
+
+    # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
+    # found. These need to be relative paths so they work in different locations.
+    dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
+    install -d $dest
+    for t in ar as ld nm objcopy objdump ranlib strip cpp; do
+        ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t
+        ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t
+    done
 }