From 4ba8133097add1257f4ab828c830030ed912c369 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Thu, 16 Dec 2010 16:38:10 -0700 Subject: [PATCH] sane-toolchain: Switch to TOOLCHAIN_TYPE Make use of TOOLCHAIN_TYPE and ${LIBC}-${TOOLCHAIN_TYPE} files like Angstrom/SHR/etc do. This lets external toolchains work with sane-toolchain.inc using distributions. Acked-by: Khem Raj Signed-off-by: Tom Rini --- conf/distro/include/eglibc-external.inc | 2 ++ conf/distro/include/eglibc-internal.inc | 1 + conf/distro/include/sane-toolchain.inc | 21 +++++++++++---------- conf/distro/include/uclibc-internal.inc | 1 + 4 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 conf/distro/include/eglibc-external.inc create mode 100644 conf/distro/include/eglibc-internal.inc create mode 100644 conf/distro/include/uclibc-internal.inc diff --git a/conf/distro/include/eglibc-external.inc b/conf/distro/include/eglibc-external.inc new file mode 100644 index 0000000000..e58cdb0f15 --- /dev/null +++ b/conf/distro/include/eglibc-external.inc @@ -0,0 +1,2 @@ +# Nothing different than glibc here. +require conf/distro/include/glibc-external.inc diff --git a/conf/distro/include/eglibc-internal.inc b/conf/distro/include/eglibc-internal.inc new file mode 100644 index 0000000000..80e07d9619 --- /dev/null +++ b/conf/distro/include/eglibc-internal.inc @@ -0,0 +1 @@ +require conf/distro/include/${LIBC}.inc diff --git a/conf/distro/include/sane-toolchain.inc b/conf/distro/include/sane-toolchain.inc index e29893a125..6802eb23c7 100644 --- a/conf/distro/include/sane-toolchain.inc +++ b/conf/distro/include/sane-toolchain.inc @@ -54,15 +54,7 @@ PREFERRED_VERSION_gcc-cross-sdk ?= "${PREFERRED_GCC_VERSION}" PREFERRED_VERSION_gcc-cross-initial ?= "${PREFERRED_GCC_VERSION}" PREFERRED_VERSION_gcc-cross-intermediate ?= "${PREFERRED_GCC_VERSION}" -# Compiler selection -PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "binutils-cross" -PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "gcc-cross-initial" -PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-intermediate = "gcc-cross-intermediate" -PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "gcc-cross" -PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "gcc-cross" - # Others -PREFERRED_PROVIDER_linux-libc-headers = "linux-libc-headers" PREFERRED_VERSION_libtool = "${PREFERRED_LIBTOOL_VERSION}" PREFERRED_VERSION_libtool-cross = "${PREFERRED_LIBTOOL_VERSION}" PREFERRED_VERSION_libtool-native = "${PREFERRED_LIBTOOL_VERSION}" @@ -76,6 +68,10 @@ PREFERRED_VERSION_libtool-nativesdk = "${PREFERRED_LIBTOOL_VERSION}" # Branding TARGET_VENDOR = "-oe" +# Compiler selection +TOOLCHAIN_TYPE ?= "internal" +require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc + # Add FEED_ARCH to the overrides list so that we can override the # ARM_INSTRUCTION_SET like below @@ -134,7 +130,7 @@ TARGET_CC_ARCH_pn-cairo_armv5te = "-march=armv4t" # Can be "glibc", "eglibc" or "uclibc" LIBC ?= "eglibc" -require conf/distro/include/${LIBC}.inc +require conf/distro/include/${LIBC}-${TOOLCHAIN_TYPE}.inc PSTAGE_EXTRAPATH = "${LIBC}" require conf/distro/include/sane-toolchain-${LIBC}.inc @@ -204,7 +200,12 @@ def compute_os_portion_of_target_triplet (d): else: bb.note("DISTRO_FEATURES is not set abi suffix not set") abi_suffix = "" - if libc_suffix is not "" or abi_suffix is not "": + + if bb.data.getVar('TOOLCHAIN_BRAND',d,1) is not None and \ + bb.data.getVar('TOOLCHAIN_BRAND',d,1) in "csl": + gnu_suffix = "gnu" + + if libc_suffix + gnu_suffix + abi_suffix is not "": return os_suffix + "-" + libc_suffix + gnu_suffix + abi_suffix else: return os_suffix diff --git a/conf/distro/include/uclibc-internal.inc b/conf/distro/include/uclibc-internal.inc new file mode 100644 index 0000000000..80e07d9619 --- /dev/null +++ b/conf/distro/include/uclibc-internal.inc @@ -0,0 +1 @@ +require conf/distro/include/${LIBC}.inc -- 2.39.5