From f573bdb536b33e87748d6f85a269da6be9f6bba4 Mon Sep 17 00:00:00 2001 From: Vladimir Zapolskiy Date: Tue, 17 Jul 2012 16:52:34 +0300 Subject: [PATCH 1/2] tcmode-external-sourcery: CSL_TARGET_SYS may contain a list of triplets The first mentioned toolchain triplet from the list is selected, if there is a correspondent compiler found in external toolchain path. Signed-off-by: Vladimir Zapolskiy --- conf/distro/include/tcmode-external-sourcery.inc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/conf/distro/include/tcmode-external-sourcery.inc b/conf/distro/include/tcmode-external-sourcery.inc index 22887a4..c66264e 100644 --- a/conf/distro/include/tcmode-external-sourcery.inc +++ b/conf/distro/include/tcmode-external-sourcery.inc @@ -17,7 +17,16 @@ CSL_TARGET_SYS_i686 ?= "i686-pc-linux-gnu" CSL_TARGET_SYS_i586 ?= "i686-pc-linux-gnu" CSL_TARGET_SYS = "${TARGET_SYS}" -TARGET_PREFIX = "${CSL_TARGET_SYS}-" +def csl_target_sys(d): + toolchain_path = d.getVar('EXTERNAL_TOOLCHAIN', True) + + for triplet in d.getVar('CSL_TARGET_SYS', True).split(): + gcc = os.path.join(toolchain_path, 'bin', triplet + '-gcc') + if os.path.exists(gcc): + return triplet + '-' + return '' + +TARGET_PREFIX = "${@csl_target_sys(d)}" PREFERRED_PROVIDER_linux-libc-headers = "external-sourcery-toolchain" PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "external-sourcery-toolchain" From 97194710d6158fa164778ddd2c61e6ca713d5f3f Mon Sep 17 00:00:00 2001 From: Vladimir Zapolskiy Date: Wed, 18 Jul 2012 02:47:19 +0300 Subject: [PATCH 2/2] tcmode-external-sourcery: add triplets to support CodeBench Lite toolchains Signed-off-by: Vladimir Zapolskiy --- conf/distro/include/tcmode-external-sourcery.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/distro/include/tcmode-external-sourcery.inc b/conf/distro/include/tcmode-external-sourcery.inc index c66264e..cbc5a10 100644 --- a/conf/distro/include/tcmode-external-sourcery.inc +++ b/conf/distro/include/tcmode-external-sourcery.inc @@ -7,14 +7,14 @@ EXTERNAL_TOOLCHAIN ?= "/usr/local/csl/${TARGET_ARCH}" TOOLCHAIN_PATH_ADD = "${EXTERNAL_TOOLCHAIN}/bin:" PATH =. "${TOOLCHAIN_PATH_ADD}" -CSL_TARGET_SYS_powerpc ?= "powerpc-linux-gnu" -CSL_TARGET_SYS_powerpc64 ?= "powerpc-linux-gnu" -CSL_TARGET_SYS_arm ?= "arm-none-linux-gnueabi" +CSL_TARGET_SYS_powerpc ?= "powerpc-linux-gnu powerpc-mentor-linux-gnu" +CSL_TARGET_SYS_powerpc64 ?= "powerpc-linux-gnu powerpc-mentor-linux-gnu" +CSL_TARGET_SYS_arm ?= "arm-none-linux-gnueabi arm-mentor-linux-gnueabi" CSL_TARGET_SYS_mips ?= "mips-linux-gnu" CSL_TARGET_SYS_mipsel ?= "mips-linux-gnu" CSL_TARGET_SYS_mips64 ?= "mips-linux-gnu" -CSL_TARGET_SYS_i686 ?= "i686-pc-linux-gnu" -CSL_TARGET_SYS_i586 ?= "i686-pc-linux-gnu" +CSL_TARGET_SYS_i686 ?= "i686-pc-linux-gnu i686-mentor-linux-gnu" +CSL_TARGET_SYS_i586 ?= "i686-pc-linux-gnu i686-mentor-linux-gnu" CSL_TARGET_SYS = "${TARGET_SYS}" def csl_target_sys(d):