sane-toolchain.inc: add indirection again, it's really necessary
[vuplus_openembedded] / conf / distro / include / sane-toolchain.inc
1 # Originally brought to you by the Angstrom Distribution
2
3 #############################################################################
4 # TOOLCHAIN VERSION SETTINGS
5 #############################################################################
6
7 # Base line versions, good for most things
8 PREFERRED_GCC_VERSION                ?= "4.2.4"
9 PREFERRED_BINUTILS                   ?= "2.18"
10
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"
16
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"
25
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"
28
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"
31
32 # Binutils
33 PREFERRED_VERSION_binutils           ?= "${PREFERRED_BINUTILS}"
34 PREFERRED_VERSION_binutils-cross     ?= "${PREFERRED_BINUTILS}"
35 PREFERRED_VERSION_binutils-cross-sdk ?= "${PREFERRED_BINUTILS}"
36
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"
41
42 # Compiler versions
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}"
48
49 # Compiler selection
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"
55
56 # Others
57 PREFERRED_PROVIDER_linux-libc-headers = "linux-libc-headers"
58
59 #############################################################################
60 # TOOLCHAIN CUSTOMIZATION
61 #############################################################################
62
63 # Branding
64 TARGET_VENDOR = "-oe"
65
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
70
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}
77 # "arm" "thumb"
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
83 #    slower.
84
85 THUMB_INTERWORK = "yes"
86 # "yes" "no"
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.
91
92 # We don't want to keep OABI compat
93 ARM_KEEP_OABI = "0"
94 # Do keep OABI compat for om-gta01 to keep the gllin binary working
95 ARM_KEEP_OABI_pn-linux-openmoko-2.6.24_om-gta01 = "1"
96 ARM_KEEP_OABI_pn-linux-openmoko-2.6.28_om-gta01 = "1"
97
98 # ARM EABI is softfloat by default, but let's make sure :)
99 # make it overridable for platforms with FPU, like ep93xx or i.mx31
100 TARGET_FPU_arm ?= "soft"
101 TARGET_FPU_armeb ?= "soft"
102 TARGET_FPU_ixp4xx ?= "soft"
103 TARGET_FPU_ppc405 ?= "soft"
104
105 TARGET_FPU_armv6 ?= "hard"
106 TARGET_FPU_armv6-novfp ?= "soft"
107 TARGET_FPU_armv7a ?= "hard"
108 TARGET_FPU_ppc603e ?= "hard"
109
110 # webkit-gtk and cairo have alignment issues with double instructions on armv5 so
111 # disable them here
112 TARGET_CC_ARCH_pn-webkit-gtk_armv5te = "-march=armv4t"
113 TARGET_CC_ARCH_pn-cairo_armv5te = "-march=armv4t"
114
115 #############################################################################
116 # C LIBRARY SETTINGS
117 #############################################################################
118
119 # Can be "glibc", "eglibc" or "uclibc"
120 PREFERRED_LIBC ?= "glibc"
121 PSTAGE_EXTRAPATH = "${PREFERRED_LIBC}"
122
123 CACHE = "${TMPDIR}/cache/${PREFERRED_LIBC}/${MACHINE}"
124 DEPLOY_DIR = "${TMPDIR}/deploy/${PREFERRED_LIBC}"
125 require conf/distro/include/sane-toolchain-${PREFERRED_LIBC}.inc
126
127 # Generate locales on the buildsystem instead of on the target. Speeds up first boot, set to "1" to enable
128 PREFERRED_PROVIDER_qemu-native = "qemu-native"
129 ENABLE_BINARY_LOCALE_GENERATION ?= "1"
130
131 # We only want to build UTF8 locales
132 LOCALE_UTF8_ONLY = "1"
133
134 # Qemu doesn't like armv6/eabi/vfp
135 ENABLE_BINARY_LOCALE_GENERATION_armv6 = "0"
136 ENABLE_BINARY_LOCALE_GENERATION_armv6-novfp = "0"
137 ENABLE_BINARY_LOCALE_GENERATION_armv7a = "0"
138
139 #qemu has taken a dislike to armeb as well
140 ENABLE_BINARY_LOCALE_GENERATION_armeb = "0"
141
142 # This is needed to get a correct PACKAGE_ARCH for packages that have PACKAGE_ARCH = ${MACHINE_ARCH}
143 ARM_ABI ?= "${@['','oabi'][bb.data.getVar('MACHINE',d) in ['collie','h3600', 'h3800', 'simpad', 'htcwallaby']]}"
144 include conf/distro/include/sane-toolchain-${ARM_ABI}.inc