summaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
authorPhil Blundell <philb@brightsign.biz>2011-05-12 17:50:10 +0100
committerPhil Blundell <philb@brightsign.biz>2011-05-12 17:50:10 +0100
commit5f95640b2a011f7e1d4d3b1d9694615dfe93a6d0 (patch)
tree6403e642d6d623c00d5176de52ebd305e81882f9 /conf
parent4ec12ce02c43be8fbddefd9078b80a6d7c767a26 (diff)
downloadmeta-micro-5f95640b2a011f7e1d4d3b1d9694615dfe93a6d0.tar.gz
import include files from main oe repo
Diffstat (limited to 'conf')
-rw-r--r--conf/distro/include/arm-thumb.inc30
-rw-r--r--conf/distro/include/eglibc-internal.inc1
-rw-r--r--conf/distro/include/eglibc.inc28
-rw-r--r--conf/distro/include/sane-feed-ipk.inc4
-rw-r--r--conf/distro/include/sane-feed.inc177
-rw-r--r--conf/distro/include/sane-toolchain-eglibc.inc26
-rw-r--r--conf/distro/include/sane-toolchain.inc214
-rw-r--r--conf/distro/include/toolchain-internal.inc7
8 files changed, 487 insertions, 0 deletions
diff --git a/conf/distro/include/arm-thumb.inc b/conf/distro/include/arm-thumb.inc
new file mode 100644
index 0000000..75ed978
--- /dev/null
+++ b/conf/distro/include/arm-thumb.inc
@@ -0,0 +1,30 @@
+#tune file for thumb instructions
+
+ARM_INSTRUCTION_SET ?= "arm"
+# "arm" "thumb"
+# The instruction set the compiler should use when generating application
+# code. The kernel is always compiled with arm code at present. arm code
+# is the original 32 bit ARM instruction set, thumb code is the 16 bit
+# encoded RISC sub-set. Thumb code is smaller (maybe 70% of the ARM size)
+# but requires more instructions (140% for 70% smaller code) so may be
+# slower.
+
+THUMB_INTERWORK ?= "no"
+# "yes" "no"
+# Whether to compile with code to allow interworking between the two
+# instruction sets. This allows thumb code to be executed on a primarily
+# arm system and vice versa. It is strongly recommended that DISTROs not
+# turn this off - the actual cost is very small.
+
+OVERRIDE_THUMB = "${@['', 'thumb:'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}"
+OVERRIDE_INTERWORK = "${@['', 'thumb-interwork:'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}"
+OVERRIDES_prepend_arm =. "${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}"
+
+# Compiler and linker options for application code and kernel code. These
+# options ensure that the compiler has the correct settings for the selected
+# instruction set and interworking.
+ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}"
+ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}"
+
+TARGET_CC_ARCH_append_arm =. " ${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}"
+TARGET_CC_KERNEL_ARCH_append_arm =. " -mno-thumb-interwork -mno-thumb"
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/eglibc.inc b/conf/distro/include/eglibc.inc
new file mode 100644
index 0000000..cd66442
--- /dev/null
+++ b/conf/distro/include/eglibc.inc
@@ -0,0 +1,28 @@
+# Add glibc overrides to the overrides for eglibc.
+OVERRIDES =. "libc-glibc:"
+
+# The things eglibc can provide. We default to wanting eglibc to provide them.
+PREFERRED_PROVIDER_virtual/libiconv ?= "eglibc"
+PREFERRED_PROVIDER_virtual/libintl ?= "eglibc"
+PREFERRED_PROVIDER_virtual/libc = "eglibc"
+PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "eglibc-initial"
+PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "eglibc"
+
+# eglibc is configured for OLDEST_KERNEL kernel version, so we set minimal
+# sane versions there
+
+OLDEST_KERNEL ?= "2.4.0"
+
+# ARM OABI is fine with 2.4.0, EABI is not, so we override on "-gnueabi"
+# TARGET_OS here, not on architecture which is 'arm' in both cases
+OLDEST_KERNEL_linux-gnueabi ?= "2.6.16"
+OLDEST_KERNEL_sparc64 ?= "2.4.21"
+OLDEST_KERNEL_ppc64 ?= "2.4.21"
+DISTRO_FEATURES_EGLIBC ?= "ipv6 backtrace big-macros bsd cxx-tests catgets \
+ charsets crypt crypt-ufc db-aliases envz fcvt fmtmsg \
+ fstab ftraverse getlogin idn inet inet-anl libm \
+ libm-big locales locale-code memusage nis nsswitch \
+ rcmd rtld-debug spawn streams sunrpc utmp utmpx \
+ wordexp posix-clang-wchar posix-regexp \
+ posix-regexp-glibc posix-wchar-io"
+
diff --git a/conf/distro/include/sane-feed-ipk.inc b/conf/distro/include/sane-feed-ipk.inc
new file mode 100644
index 0000000..14206bd
--- /dev/null
+++ b/conf/distro/include/sane-feed-ipk.inc
@@ -0,0 +1,4 @@
+INHERIT += "package_ipk"
+
+PREFERRED_PROVIDER_virtual/update-alternatives-native ?= "opkg-native"
+PREFERRED_PROVIDER_virtual/update-alternatives ?= ${PREFERRED_PROVIDER_opkg}
diff --git a/conf/distro/include/sane-feed.inc b/conf/distro/include/sane-feed.inc
new file mode 100644
index 0000000..70fc7a9
--- /dev/null
+++ b/conf/distro/include/sane-feed.inc
@@ -0,0 +1,177 @@
+# Originally brought to you by the Angstrom Distribution
+
+#############################################################################
+# FEED BUILDING SETTINGS
+#############################################################################
+
+# Put links to sources in deploy/sources to make it easier for people to be GPL compliant
+INHERIT += "src_distribute_local"
+SRC_DIST_LOCAL ?= "symlink"
+
+# Add FEED_ARCH to overrides
+OVERRIDES .= ":${FEED_ARCH}"
+
+FEED_ARCH ?= "${TARGET_ARCH}"
+
+# Blackfin machines
+FEED_ARCH_bfin = "blackfin"
+
+# armv4t machines
+
+FEED_ARCH_acern30 = "armv4t"
+FEED_ARCH_amsdelta = "armv4t"
+FEED_ARCH_ep93xx = "armv4t"
+FEED_ARCH_eteng500 = "armv4t"
+FEED_ARCH_om-gta01 = "armv4t"
+FEED_ARCH_om-gta02 = "armv4t"
+FEED_ARCH_h1940 = "armv4t"
+FEED_ARCH_h6300 = "armv4t"
+FEED_ARCH_kb9202 = "armv4t"
+FEED_ARCH_ks8695 = "armv4t"
+FEED_ARCH_rx1950 = "armv4t"
+FEED_ARCH_rx3000 = "armv4t"
+FEED_ARCH_sarge-at91 = "armv4t"
+FEED_ARCH_smdk2440 = "armv4t"
+FEED_ARCH_smdk2443 = "armv4t"
+
+# armv5t machines
+
+FEED_ARCH_a1200 = "armv5te"
+FEED_ARCH_a780 = "armv5te"
+FEED_ARCH_akita = "armv5te"
+FEED_ARCH_asus620 = "armv5te"
+FEED_ARCH_asus730 = "armv5te"
+FEED_ARCH_at91sam9260ek = "armv5te"
+FEED_ARCH_at91sam9261ek = "armv5te"
+FEED_ARCH_at91sam9263ek = "armv5te"
+FEED_ARCH_at91sam9rlek = "armv5te"
+FEED_ARCH_at91sam9g10ek = "armv5te"
+FEED_ARCH_at91sam9g20ek = "armv5te"
+FEED_ARCH_at91sam9g45ekes = "armv5te"
+FEED_ARCH_aximx50 = "armv5te"
+FEED_ARCH_aximx50v = "armv5te"
+FEED_ARCH_c7x0 = "armv5te"
+FEED_ARCH_compulab-pxa270 = "armv5te"
+FEED_ARCH_davinci-dvevm = "armv5te"
+FEED_ARCH_devkitidp-pxa255 = "armv5te"
+FEED_ARCH_e680 = "armv5te"
+FEED_ARCH_er0100 = "armv5te"
+FEED_ARCH_gumstix = "armv5te"
+FEED_ARCH_gumstix-verdex = "armv5te"
+FEED_ARCH_gumstix-connex = "armv5te"
+FEED_ARCH_h1910 = "armv5te"
+FEED_ARCH_h2200 = "armv5te"
+FEED_ARCH_h3900 = "armv5te"
+FEED_ARCH_h4000 = "armv5te"
+FEED_ARCH_h5000 = "armv5te"
+FEED_ARCH_htcalpine = "armv5te"
+FEED_ARCH_htcapache = "armv5te"
+FEED_ARCH_htcblueangel = "armv5te"
+FEED_ARCH_htchimalaya = "armv5te"
+FEED_ARCH_htcsable = "armv5te"
+FEED_ARCH_htctornado = "armv5te"
+FEED_ARCH_htcuniversal = "armv5te"
+FEED_ARCH_hx2000 = "armv5te"
+FEED_ARCH_hx4700 = "armv5te"
+FEED_ARCH_ixp4xxle = "armv5te"
+FEED_ARCH_logicpd-pxa270 = "armv5te"
+FEED_ARCH_looxc550 = "armv5te"
+FEED_ARCH_lsarm = "armv5te"
+FEED_ARCH_magician = "armv5te"
+FEED_ARCH_mainstone = "armv5te"
+FEED_ARCH_mnci = "armv5te"
+FEED_ARCH_mtx-3 = "armv5te"
+FEED_ARCH_mx21ads = "armv5te"
+FEED_ARCH_n2100 = "armv5te"
+FEED_ARCH_navman-icn330 = "armv5te"
+FEED_ARCH_netbook-pro = "armv5te"
+FEED_ARCH_nokia770 = "armv5te"
+FEED_ARCH_rokre2 = "armv5te"
+FEED_ARCH_nslu2le = "armv5te"
+FEED_ARCH_omap1510inn = "armv5te"
+FEED_ARCH_omap1610h2 = "armv5te"
+FEED_ARCH_omap1710h3 = "armv5te"
+FEED_ARCH_omap5912osk = "armv5te"
+FEED_ARCH_palmld = "armv5te"
+FEED_ARCH_palmt650 = "armv5te"
+FEED_ARCH_palmt680 = "armv5te"
+FEED_ARCH_palmtc = "armv5te"
+FEED_ARCH_palmtt = "armv5te"
+FEED_ARCH_palmtt3 = "armv5te"
+FEED_ARCH_palmtt5 = "armv5te"
+FEED_ARCH_palmtx = "armv5te"
+FEED_ARCH_palmz31 = "armv5te"
+FEED_ARCH_palmz71 = "armv5te"
+FEED_ARCH_palmz72 = "armv5te"
+FEED_ARCH_poodle = "armv5te"
+FEED_ARCH_qemuarm = "armv5te"
+FEED_ARCH_spitz = "armv5te"
+FEED_ARCH_tosa = "armv5te"
+FEED_ARCH_triton = "armv5te"
+
+FEED_ARCH_ixp4xxbe = "armv5teb"
+FEED_ARCH_nslu2be = "armv5teb"
+
+# armv6 machines
+
+FEED_ARCH_mx31ads = "armv6"
+FEED_ARCH_mx31moboard = "armv6"
+FEED_ARCH_nokia800 = "armv6"
+FEED_ARCH_omap2420h4 = "armv6"
+FEED_ARCH_omap2430sdp = "armv6"
+FEED_ARCH_pcm043 = "armv6"
+
+# i486 machines
+FEED_ARCH_geodegx = "i486"
+FEED_ARCH_geodelx = "i486"
+FEED_ARCH_netvista = "i486"
+FEED_ARCH_wrap = "i486"
+FEED_ARCH_x86 = "i486"
+
+# i586 machines
+FEED_ARCH_epia = "i586"
+FEED_ARCH_i586-generic = "i586"
+FEED_ARCH_qemux86 = "i586"
+
+# i686 machines
+
+FEED_ARCH_alix = "i686"
+FEED_ARCH_colinux = "i686"
+FEED_ARCH_guinness = "i686"
+FEED_ARCH_i686-generic = "i686"
+FEED_ARCH_progear = "i686"
+
+# powerpc machines
+
+FEED_ARCH_dht-walnut = "ppc405"
+FEED_ARCH_magicbox = "ppc405"
+FEED_ARCH_xilinx-ml403 = "ppc405"
+FEED_ARCH_xilinx-ml410 = "ppc405"
+FEED_ARCH_sequoia = "ppc440e"
+FEED_ARCH_efika = "ppc603e"
+FEED_ARCH_lite5200 = "ppc603e"
+FEED_ARCH_lsppchd = "ppc603e"
+FEED_ARCH_lsppchg = "ppc603e"
+FEED_ARCH_storcenter = "ppc603e"
+FEED_ARCH_turbostation = "ppc603e"
+FEED_ARCH_mpc8313e-rdb = "ppce300c3"
+FEED_ARCH_mpc8323e-rdb = "ppce300c2"
+
+# strongarm machines, no EABI
+
+FEED_ARCH_collie = "arm-oabi"
+FEED_ARCH_h3600 = "arm-oabi"
+FEED_ARCH_h3800 = "arm-oabi"
+FEED_ARCH_htcwallaby = "arm-oabi"
+FEED_ARCH_jornada56x = "arm-oabi"
+FEED_ARCH_jornada7xx = "arm-oabi"
+FEED_ARCH_shark = "arm-oabi"
+FEED_ARCH_simpad = "arm-oabi"
+
+# Tweak packaging for strongarm machines since they can't use EABI
+
+PACKAGE_EXTRA_ARCHS_collie = "arm-oabi"
+PACKAGE_EXTRA_ARCHS_h3600 = "arm-oabi"
+PACKAGE_EXTRA_ARCHS_h3800 = "arm-oabi"
+PACKAGE_EXTRA_ARCHS_simpad = "arm-oabi"
+PACKAGE_EXTRA_ARCHS_htcwallaby = "arm-oabi"
diff --git a/conf/distro/include/sane-toolchain-eglibc.inc b/conf/distro/include/sane-toolchain-eglibc.inc
new file mode 100644
index 0000000..d38ca5d
--- /dev/null
+++ b/conf/distro/include/sane-toolchain-eglibc.inc
@@ -0,0 +1,26 @@
+# Originally brought to you by the Angstrom Distribution
+
+# eglibc:
+# [23:00] oxo: glibc (any version) on sparc does not like (repeat me) "-Os"
+
+FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os ${DEBUG_FLAGS}"
+FULL_OPTIMIZATION_pn-perl = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O1 ${DEBUG_FLAGS}"
+FULL_OPTIMIZATION_sparc = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 ${DEBUG_FLAGS}"
+
+# gcc 4.4 and 4.5 has a problem with 'leakage' into libgcc.a with -Os
+FULL_OPTIMIZATION_powerpc = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 ${DEBUG_FLAGS}"
+
+# JaMa: I promise to report bug upstream, but as it can take a while to fix it, I'll switch to -O2 here
+# Tested with gcc-4.4.2 and gcc-4.4.3 on armv4t and armv5te and it fails with -Os, with gcc-4.3.3 it works OK with -Os
+# Here is testcase, but you have to rebuild whole libqtxml to test it
+# http://lists.shr-project.org/pipermail/shr-devel/2010-February/002169.html
+FULL_OPTIMIZATION_pn-qt4-x11-free = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 ${DEBUG_FLAGS}"
+# This I've seen only on armv4t, it segfaults when called from pisi, but whole test unit suite can pass
+FULL_OPTIMIZATION_pn-libsyncml = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 ${DEBUG_FLAGS}"
+
+BUILD_OPTIMIZATION_pn-perl = "-O1"
+BUILD_OPTIMIZATION_sparc = "-O2"
+
+TARGET_LINK_HASH_STYLE = "${@['-Wl,--hash-style=gnu',''][bb.data.getVar('TARGET_ARCH',d,1) in ['mips', 'mipsel', 'mips64', 'mips64el']]}"
+
+CXXFLAGS += "-fvisibility-inlines-hidden"
diff --git a/conf/distro/include/sane-toolchain.inc b/conf/distro/include/sane-toolchain.inc
new file mode 100644
index 0000000..5882fd7
--- /dev/null
+++ b/conf/distro/include/sane-toolchain.inc
@@ -0,0 +1,214 @@
+# Originally brought to you by the Angstrom Distribution
+
+#############################################################################
+# TOOLCHAIN VERSION SETTINGS
+#############################################################################
+
+# Base line versions, good for most things
+PREFERRED_GCC_VERSION ?= "4.5"
+PREFERRED_BINUTILS_VERSION ?= "2.21"
+PREFERRED_UCLIBC_VERSION ?= "git"
+PREFERRED_EGLIBC_VERSION ?= "2.12"
+PREFERRED_GLIBC_VERSION ?= "2.10.1"
+# we need hard assignment here, because bitbake.conf has
+# weak "no" first so weak "yes" here won't override it
+# also use hard assignment for version to make sure it's
+# new enough for SYSROOT support
+PREFERRED_LIBTOOL_VERSION = "2.4"
+LIBTOOL_HAS_SYSROOT = "yes"
+
+# Prefer glibc 2.6 and uclibc 0.9.30, these have had the most testing.
+PREFERRED_VERSION_glibc ?= "${PREFERRED_GLIBC_VERSION}"
+PREFERRED_VERSION_glibc-initial ?= "${PREFERRED_GLIBC_VERSION}"
+PREFERRED_VERSION_eglibc ?= "${PREFERRED_EGLIBC_VERSION}"
+PREFERRED_VERSION_eglibc-initial ?= "${PREFERRED_EGLIBC_VERSION}"
+
+# Some systems need a special gcc version
+PREFERRED_GCC_VERSION_486sx ?= "4.3.2"
+PREFERRED_GCC_VERSION_avr32 ?= "4.2.2"
+PREFERRED_GCC_VERSION_bfin ?= "4.1.2"
+PREFERRED_GCC_VERSION_xilinx-ml403 ?= "4.1.1"
+
+# This is unrelated to the kernel version, but glibc and some userspaceapps require a recent version to build against
+PREFERRED_VERSION_linux-libc-headers ?= "2.6.31"
+
+# Uncomment this if want need to build an armv7a kernel with CSL toolchain (<2.6.27 don't boot with mainline gcc)
+#KERNEL_CCSUFFIX_armv7a= "-4.2.1+csl-arm-2007q3-53"
+
+# Binutils
+PREFERRED_VERSION_binutils ?= "${PREFERRED_BINUTILS_VERSION}"
+PREFERRED_VERSION_binutils-cross ?= "${PREFERRED_BINUTILS_VERSION}"
+PREFERRED_VERSION_binutils-cross-sdk ?= "${PREFERRED_BINUTILS_VERSION}"
+
+# Avr32 only has patches for binutils 2.17 in OE
+PREFERRED_VERSION_binutils_avr32 = "2.17"
+PREFERRED_VERSION_binutils-cross_avr32 = "2.17"
+PREFERRED_VERSION_binutils-cross-sdk_avr32 = "2.17"
+
+# Compiler versions
+PREFERRED_VERSION_gcc ?= "${PREFERRED_GCC_VERSION}"
+PREFERRED_VERSION_gcc-cross ?= "${PREFERRED_GCC_VERSION}"
+PREFERRED_VERSION_gcc-cross-sdk ?= "${PREFERRED_GCC_VERSION}"
+PREFERRED_VERSION_gcc-cross-initial ?= "${PREFERRED_GCC_VERSION}"
+PREFERRED_VERSION_gcc-cross-intermediate ?= "${PREFERRED_GCC_VERSION}"
+
+# Others
+PREFERRED_VERSION_libtool = "${PREFERRED_LIBTOOL_VERSION}"
+PREFERRED_VERSION_libtool-cross = "${PREFERRED_LIBTOOL_VERSION}"
+PREFERRED_VERSION_libtool-native = "${PREFERRED_LIBTOOL_VERSION}"
+PREFERRED_VERSION_libtool-sdk = "${PREFERRED_LIBTOOL_VERSION}"
+PREFERRED_VERSION_libtool-nativesdk = "${PREFERRED_LIBTOOL_VERSION}"
+
+#############################################################################
+# TOOLCHAIN CUSTOMIZATION
+#############################################################################
+
+# Branding
+TARGET_VENDOR = "-oe"
+
+# Compiler selection
+TOOLCHAIN_TYPE ?= "internal"
+require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc
+
+# Add BASE_PACKAGE_ARCH to the overrides list so that we can override the
+# ARM_INSTRUCTION_SET like below
+
+OVERRIDES =. "${BASE_PACKAGE_ARCH}:"
+
+# ARM920T and up can use thumb mode to decrease binary size at the expense of speed
+# (the complete story is a bit more nuanced due to cache starvation)
+# Minimal turns on thumb for armv4t machine according to this RFC:
+# http://lists.linuxtogo.org/pipermail/angstrom-distro-devel/2008-October/002714.html
+
+# We can't set ARM_INSTRUCTION_SET_<override> directly since that will un-overridable in recipes like gcc
+PREFERRED_ARM_INSTRUCTION_SET_armv4t = "thumb"
+PREFERRED_ARM_INSTRUCTION_SET_armv5te = "thumb"
+PREFERRED_ARM_INSTRUCTION_SET_armv5teb = "thumb"
+PREFERRED_ARM_INSTRUCTION_SET ?= "arm"
+ARM_INSTRUCTION_SET = "${PREFERRED_ARM_INSTRUCTION_SET}"
+# "arm" "thumb"
+# The instruction set the compiler should use when generating application
+# code. The kernel is always compiled with arm code at present. arm code
+# is the original 32 bit ARM instruction set, thumb code is the 16 bit
+# encoded RISC sub-set. Thumb code is smaller (maybe 70% of the ARM size)
+# but requires more instructions (140% for 70% smaller code) so may be
+# slower.
+
+THUMB_INTERWORK = "yes"
+# "yes" "no"
+# Whether to compile with code to allow interworking between the two
+# instruction sets. This allows thumb code to be executed on a primarily
+# arm system and vice versa. It is strongly recommended that DISTROs not
+# turn this off - the actual cost is very small.
+
+# We don't want to keep OABI compat
+ARM_KEEP_OABI = "0"
+
+# ARM EABI is softfloat by default, but let's make sure :)
+# make it overridable for platforms with FPU, like ep93xx or i.mx31
+TARGET_FPU_arm ?= "soft"
+TARGET_FPU_armeb ?= "soft"
+TARGET_FPU_ixp4xx ?= "soft"
+TARGET_FPU_ppc405 ?= "soft"
+
+TARGET_FPU_armv6 ?= "hard"
+TARGET_FPU_armv6-novfp ?= "soft"
+TARGET_FPU_armv7a ?= "hard"
+TARGET_FPU_ppc603e ?= "hard"
+
+# webkit-gtk and cairo have alignment issues with double instructions on armv5 so
+# disable them here. TODO: This knowledge should rather be encoded in the actual
+# recipes!
+TARGET_CC_ARCH_pn-webkit-gtk_armv5te = "-march=armv4t"
+TARGET_CC_ARCH_pn-cairo_armv5te = "-march=armv4t"
+
+#############################################################################
+# C LIBRARY SETTINGS
+#############################################################################
+
+# Can be "glibc", "eglibc" or "uclibc"
+LIBC ?= "eglibc"
+require conf/distro/include/${LIBC}-${TOOLCHAIN_TYPE}.inc
+PSTAGE_EXTRAPATH = "${LIBC}"
+require conf/distro/include/sane-toolchain-${LIBC}.inc
+
+# Generate locales on the buildsystem instead of on the target. Speeds up first boot, set to "1" to enable
+PREFERRED_PROVIDER_qemu-native = "qemu-native"
+ENABLE_BINARY_LOCALE_GENERATION ?= "1"
+
+# We only want to build UTF8 locales
+LOCALE_UTF8_ONLY = "1"
+
+# Qemu doesn't like armv6/eabi/vfp
+ENABLE_BINARY_LOCALE_GENERATION_armv6 = "0"
+ENABLE_BINARY_LOCALE_GENERATION_armv6-novfp = "0"
+ENABLE_BINARY_LOCALE_GENERATION_armv7a = "0"
+
+#qemu has taken a dislike to armeb as well
+ENABLE_BINARY_LOCALE_GENERATION_armeb = "0"
+def detect_arm_abi (d):
+ import bb
+ if bb.data.getVar('DISTRO_FEATURES',d) is None:
+ if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'arm', 'armeb' ]:
+ return "oabi"
+ else:
+ return ""
+ if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'arm', 'armeb' ]:
+ if 'eabi' in bb.data.getVar('DISTRO_FEATURES',d).split():
+ return "eabi"
+ return "oabi"
+ return ""
+
+def compute_os_portion_of_target_triplet (d):
+ import bb
+ arm_eabi_unsupported_arches = "armv1 armv2 armv3"
+ ppc_spe_supporting_arches = "ppce500v2 ppce500"
+ gnu_suffix = ""
+ if bb.data.getVar('LIBC', d, 1) == "uclibc":
+ libc_suffix = "uclibc"
+ else:
+ libc_suffix = ""
+
+ if bb.data.getVar('TARGET_ARCH',d,1) in ['bfin']:
+ if libc_suffix is not "uclibc":
+ bb.fatal("bfin is not supported on glibc/eglibc. Please choose uclibc")
+ else:
+ os_suffix = "uclinux"
+ else:
+ os_suffix = "linux"
+ bparch = bb.data.getVar('BASE_PACKAGE_ARCH', d,1)
+
+ if bb.data.getVar('DISTRO_FEATURES',d,1) is not None and \
+ bparch is not None:
+ if 'eabi' in bb.data.getVar('DISTRO_FEATURES',d,1).split() and \
+ bb.data.getVar('TARGET_ARCH', d, 1) in [ 'arm', 'armeb' ]:
+ if bparch in arm_eabi_unsupported_arches.split():
+ bb.fatal("DISTRO requested EABI but selected machine does not support EABI")
+ abi_suffix = ""
+ else:
+ if libc_suffix is not "uclibc":
+ gnu_suffix = "gnu"
+ abi_suffix = "eabi"
+ elif bparch in ppc_spe_supporting_arches.split():
+ if libc_suffix is not "uclibc":
+ gnu_suffix = "gnu"
+ abi_suffix = "spe"
+ else:
+ abi_suffix = ""
+ else:
+ bb.note("DISTRO_FEATURES is not set abi suffix not set")
+ abi_suffix = ""
+
+ if bb.data.getVar('TOOLCHAIN_BRAND', d, 1) is not None and \
+ "csl" in bb.data.getVar('TOOLCHAIN_BRAND', d, 1):
+ 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
+
+# This is needed to get a correct PACKAGE_ARCH for packages that have PACKAGE_ARCH = ${MACHINE_ARCH}
+ARM_ABI = "${@detect_arm_abi(d)}"
+TARGET_OS = "${@compute_os_portion_of_target_triplet(d)}"
+include conf/distro/include/sane-toolchain-${ARM_ABI}.inc
diff --git a/conf/distro/include/toolchain-internal.inc b/conf/distro/include/toolchain-internal.inc
new file mode 100644
index 0000000..b875dae
--- /dev/null
+++ b/conf/distro/include/toolchain-internal.inc
@@ -0,0 +1,7 @@
+# Toolchain specific virtuals
+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"
+PREFERRED_PROVIDER_linux-libc-headers = "linux-libc-headers"