[oe-commits] Tom Rini : sane-toolchain: Switch to TOOLCHAIN_TYPE

git version control git at git.openembedded.org
Fri Dec 17 16:33:55 UTC 2010


Module: openembedded.git
Branch: master
Commit: 4ba8133097add1257f4ab828c830030ed912c369
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=4ba8133097add1257f4ab828c830030ed912c369

Author: Tom Rini <tom_rini at mentor.com>
Date:   Thu Dec 16 16:38:10 2010 -0700

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 <raj.khem at gmail.com>
Signed-off-by: Tom Rini <tom_rini at mentor.com>

---

 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(-)

diff --git a/conf/distro/include/eglibc-external.inc b/conf/distro/include/eglibc-external.inc
new file mode 100644
index 0000000..e58cdb0
--- /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 0000000..80e07d9
--- /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 e29893a..6802eb2 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 0000000..80e07d9
--- /dev/null
+++ b/conf/distro/include/uclibc-internal.inc
@@ -0,0 +1 @@
+require conf/distro/include/${LIBC}.inc





More information about the Openembedded-commits mailing list