1 # Originally brought to you by the Angstrom Distribution
3 #############################################################################
4 # TOOLCHAIN VERSION SETTINGS
5 #############################################################################
7 # Base line versions, good for most things
8 PREFERRED_GCC_VERSION ?= "4.2.4"
9 PREFERRED_BINUTILS ?= "2.18"
11 # Prefer glibc 2.6 and uclibc 0.9.30, these have had the most testing.
12 PREFERRED_VERSION_glibc ?= "2.6.1"
13 PREFERRED_VERSION_glibc-initial ?= "2.6.1"
14 PREFERRED_VERSION_uclibc ?= "0.9.30"
15 PREFERRED_VERSION_uclibc-initial ?= "0.9.30"
17 # Some systems need a special gcc version
18 PREFERRED_GCC_VERSION_486sx ?= "4.3.2"
19 PREFERRED_GCC_VERSION_avr32 ?= "4.2.2"
20 PREFERRED_GCC_VERSION_armv7a ?= "4.3.1"
21 PREFERRED_GCC_VERSION_bfin ?= "4.1.2"
22 PREFERRED_GCC_VERSION_ppc405 ?= "4.1.1"
23 PREFERRED_GCC_VERSION_xilinx-ml403 ?= "4.1.1"
24 PREFERRED_GCC_VERSION_xilinx-ml403 ?= "4.1.1"
26 # This is unrelated to the kernel version, but userspace apps (e.g. HAL) require a recent version to build against
27 PREFERRED_VERSION_linux-libc-headers = "2.6.23"
29 # Uncomment this if want need to build an armv7a kernel with CSL toolchain (<2.6.27 don't boot with mainline gcc)
30 #KERNEL_CCSUFFIX_armv7a= "-4.2.1+csl-arm-2007q3-53"
33 PREFERRED_VERSION_binutils ?= "${PREFERRED_BINUTILS}"
34 PREFERRED_VERSION_binutils-cross ?= "${PREFERRED_BINUTILS}"
35 PREFERRED_VERSION_binutils-cross-sdk ?= "${PREFERRED_BINUTILS}"
37 # Avr32 only has patches for binutils 2.17 in OE
38 PREFERRED_VERSION_binutils_avr32 = "2.17"
39 PREFERRED_VERSION_binutils-cross_avr32 = "2.17"
40 PREFERRED_VERSION_binutils-cross-sdk_avr32 = "2.17"
43 PREFERRED_VERSION_gcc ?= "${PREFERRED_GCC_VERSION}"
44 PREFERRED_VERSION_gcc-cross ?= "${PREFERRED_GCC_VERSION}"
45 PREFERRED_VERSION_gcc-cross-sdk ?= "${PREFERRED_GCC_VERSION}"
46 PREFERRED_VERSION_gcc-cross-initial ?= "${PREFERRED_GCC_VERSION}"
47 PREFERRED_VERSION_gcc-cross-intermediate ?= "${PREFERRED_GCC_VERSION}"
50 PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "binutils-cross"
51 PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "gcc-cross-initial"
52 PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-intermediate = "gcc-cross-intermediate"
53 PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "gcc-cross"
54 PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "gcc-cross"
57 PREFERRED_PROVIDER_linux-libc-headers = "linux-libc-headers"
59 #############################################################################
60 # TOOLCHAIN CUSTOMIZATION
61 #############################################################################
66 # ARM920T and up can use thumb mode to decrease binary size at the expense of speed
67 # (the complete story is a bit more nuanced due to cache starvation)
68 # Minimal turns on thumb for armv4t machine according to this RFC:
69 # http://lists.linuxtogo.org/pipermail/angstrom-distro-devel/2008-October/002714.html
71 # We can't set ARM_INSTRUCTION_SET_<override> directly since that will un-overridable in recipes like gcc
72 PREFERRED_ARM_INSTRUCTION_SET ?= "arm"
73 PREFERRED_ARM_INSTRUCTION_SET_armv4t = "thumb"
74 PREFERRED_ARM_INSTRUCTION_SET_armv5te = "thumb"
75 PREFERRED_ARM_INSTRUCTION_SET_armv5teb = "thumb"
76 ARM_INSTRUCTION_SET = "${PREFERRED_ARM_INSTRUCTION_SET}"
78 # The instruction set the compiler should use when generating application
79 # code. The kernel is always compiled with arm code at present. arm code
80 # is the original 32 bit ARM instruction set, thumb code is the 16 bit
81 # encoded RISC sub-set. Thumb code is smaller (maybe 70% of the ARM size)
82 # but requires more instructions (140% for 70% smaller code) so may be
85 THUMB_INTERWORK = "yes"
87 # Whether to compile with code to allow interworking between the two
88 # instruction sets. This allows thumb code to be executed on a primarily
89 # arm system and vice versa. It is strongly recommended that DISTROs not
90 # turn this off - the actual cost is very small.
92 # We don't want to keep OABI compat
95 # ARM EABI is softfloat by default, but let's make sure :)
96 # make it overridable for platforms with FPU, like ep93xx or i.mx31
97 TARGET_FPU_arm ?= "soft"
98 TARGET_FPU_armeb ?= "soft"
99 TARGET_FPU_ixp4xx ?= "soft"
100 TARGET_FPU_ppc405 ?= "soft"
102 TARGET_FPU_armv6 ?= "hard"
103 TARGET_FPU_armv6-novfp ?= "soft"
104 TARGET_FPU_armv7a ?= "hard"
105 TARGET_FPU_ppc603e ?= "hard"
107 # webkit-gtk and cairo have alignment issues with double instructions on armv5 so
108 # disable them here. TODO: This knowledge should rather be encoded in the actual
110 TARGET_CC_ARCH_pn-webkit-gtk_armv5te = "-march=armv4t"
111 TARGET_CC_ARCH_pn-cairo_armv5te = "-march=armv4t"
113 #############################################################################
115 #############################################################################
117 # Can be "glibc", "eglibc" or "uclibc"
119 require conf/distro/include/${LIBC}.inc
120 PSTAGE_EXTRAPATH = "${LIBC}"
121 require conf/distro/include/sane-toolchain-${LIBC}.inc
123 # Generate locales on the buildsystem instead of on the target. Speeds up first boot, set to "1" to enable
124 PREFERRED_PROVIDER_qemu-native = "qemu-native"
125 ENABLE_BINARY_LOCALE_GENERATION ?= "1"
127 # We only want to build UTF8 locales
128 LOCALE_UTF8_ONLY = "1"
130 # Qemu doesn't like armv6/eabi/vfp
131 ENABLE_BINARY_LOCALE_GENERATION_armv6 = "0"
132 ENABLE_BINARY_LOCALE_GENERATION_armv6-novfp = "0"
133 ENABLE_BINARY_LOCALE_GENERATION_armv7a = "0"
135 #qemu has taken a dislike to armeb as well
136 ENABLE_BINARY_LOCALE_GENERATION_armeb = "0"
138 # This is needed to get a correct PACKAGE_ARCH for packages that have PACKAGE_ARCH = ${MACHINE_ARCH}
139 ARM_ABI ?= "${@['','oabi'][bb.data.getVar('MACHINE',d) in ['collie','h3600', 'h3800', 'simpad', 'htcwallaby']]}"
140 include conf/distro/include/sane-toolchain-${ARM_ABI}.inc