configs/imx6q-sabresd: Add new defconfig
[buildroot-gz.git] / toolchain / toolchain-common.in
blob7a217b65c47822673469721555fef8550757dbcb
1 # Generic toolchain options
3 # we want gdb config in the middle of both source and external
4 # toolchains, but mconf won't let us source the same file twice,
5 # so put it here instead
6 source "package/gdb/Config.in.host"
8 comment "Toolchain Generic Options"
10 # https://sourceware.org/bugzilla/show_bug.cgi?id=19405
11 config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405
12         bool
14 config BR2_TOOLCHAIN_HAS_NATIVE_RPC
15         bool
17 config BR2_USE_WCHAR
18         bool
20 config BR2_ENABLE_LOCALE
21         bool
23 config BR2_INSTALL_LIBSTDCPP
24         bool
26 config BR2_TOOLCHAIN_HAS_FORTRAN
27         bool
29 config BR2_TOOLCHAIN_HAS_THREADS
30         bool
32 config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
33         bool
35 config BR2_TOOLCHAIN_HAS_THREADS_NPTL
36         bool
38 config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
39         bool
41 config BR2_TOOLCHAIN_HAS_SSP
42         bool
44 config BR2_TOOLCHAIN_SUPPORTS_PIE
45         bool
47 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
48         bool "Copy gconv libraries"
49         depends on BR2_TOOLCHAIN_USES_GLIBC
50         help
51           The gconv libraries are used to convert between different
52           character sets (charsets).
54           Say 'y' if you need to store and/or display different charsets.
56 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
57         string "Gconv libraries to copy"
58         depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
59         help
60           Set to the list of gconv libraries to copy.
61           Leave empty to copy all gconv libraries.
63           Specify only the basename of the libraries, leave
64           out the .so extension. Eg.:
65             IBM850 ISO8859-15 UNICODE
67           Note: the full set of gconv libs are ~8MiB (on ARM).
69 # glibc and eglibc directly include gettext, so a separatly compiled
70 # gettext isn't needed and shouldn't be built to avoid conflicts. Some
71 # packages always need gettext, other packages only need gettext when
72 # locale support is enabled. See the documentation for how packages
73 # should rely on the following two options.
75 config BR2_NEEDS_GETTEXT
76         bool
77         default y if BR2_TOOLCHAIN_USES_UCLIBC
79 config BR2_NEEDS_GETTEXT_IF_LOCALE
80         bool
81         default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE)
83 config BR2_USE_MMU
84         bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
85         default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY
86         help
87           If your target has a MMU, you should say Y here.  If you
88           are unsure, just say Y.
90 config BR2_TARGET_OPTIMIZATION
91         string "Target Optimizations"
92         default ""
93         help
94           Optimizations to use when building for the target host.
95           NOTE: gcc optimization level is defined in build options.
97 config BR2_TARGET_LDFLAGS
98         string "Target linker options"
99         help
100           Extra options to pass to the linker when building for the target.
102           Note that options with a '$' sign (eg. -Wl,-rpath='$ORIGIN/../lib')
103           are not supported.
105 config BR2_ECLIPSE_REGISTER
106         bool "Register toolchain within Eclipse Buildroot plug-in"
107         help
108           This options tells Buildroot to generate the necessary
109           configuration files to make your toolchain appear within
110           Eclipse, through the Eclipse Buildroot plugin.
112 # Options for packages to depend on, if they require at least a
113 # specific version of the kernel headers.
114 # Toolchains should choose the adequate option (ie. the highest
115 # version, not all of them).
116 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
117         bool
119 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
120         bool
121         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
123 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
124         bool
125         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
127 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
128         bool
129         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
131 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
132         bool
133         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
135 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
136         bool
137         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
139 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
140         bool
141         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
143 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
144         bool
145         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
147 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
148         bool
149         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
151 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
152         bool
153         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
155 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
156         bool
157         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
159 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
160         bool
161         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
163 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
164         bool
165         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
167 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
168         bool
169         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
171 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
172         bool
173         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
175 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
176         bool
177         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
179 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
180         bool
181         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
183 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
184         bool
185         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
187 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
188         bool
189         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
191 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
192         bool
193         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
195 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
196         bool
197         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
199 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
200         bool
201         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
203 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
204         bool
205         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
207 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
208         bool
209         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
211 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
212         bool
213         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
215 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
216         bool
217         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
219 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
220         bool
221         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
223 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
224         bool
225         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
227 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
228         bool
229         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
231 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
232         bool
233         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
235 # This order guarantees that the highest version is set, as kconfig
236 # stops affecting a value on the first matching default.
237 config BR2_TOOLCHAIN_HEADERS_AT_LEAST
238         string
239         default "4.9"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
240         default "4.8"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
241         default "4.7"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
242         default "4.6"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
243         default "4.5"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
244         default "4.4"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
245         default "4.3"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
246         default "4.2"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
247         default "4.1"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
248         default "4.0"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
249         default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
250         default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
251         default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
252         default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
253         default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
254         default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
255         default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
256         default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
257         default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
258         default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
259         default "3.9"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
260         default "3.8"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
261         default "3.7"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
262         default "3.6"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
263         default "3.5"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
264         default "3.4"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
265         default "3.3"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
266         default "3.2"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
267         default "3.1"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
268         default "3.0"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
269         default "2.6"
271 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
272         bool
274 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
275         bool
276         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
278 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
279         bool
280         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
282 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
283         bool
284         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
286 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
287         bool
288         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
290 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
291         bool
292         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
294 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
295         bool
296         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
298 config BR2_TOOLCHAIN_GCC_AT_LEAST_5
299         bool
300         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
302 config BR2_TOOLCHAIN_GCC_AT_LEAST_6
303         bool
304         select BR2_TOOLCHAIN_GCC_AT_LEAST_5
306 # This order guarantees that the highest version is set, as kconfig
307 # stops affecting a value on the first matching default.
308 config BR2_TOOLCHAIN_GCC_AT_LEAST
309         string
310         default "6"     if BR2_TOOLCHAIN_GCC_AT_LEAST_6
311         default "5"     if BR2_TOOLCHAIN_GCC_AT_LEAST_5
312         default "4.9"   if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
313         default "4.8"   if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
314         default "4.7"   if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
315         default "4.6"   if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
316         default "4.5"   if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
317         default "4.4"   if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
318         default "4.3"   if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
320 config BR2_TOOLCHAIN_HAS_SYNC_1
321         bool
322         default y
323         depends on !BR2_bfin
324         depends on !BR2_m68k_cf
325         depends on !BR2_microblaze
326         depends on !BR2_sparc
327         depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
329 config BR2_TOOLCHAIN_HAS_SYNC_2
330         bool
331         default y if BR2_TOOLCHAIN_HAS_SYNC_1
333 config BR2_TOOLCHAIN_HAS_SYNC_4
334         bool
335         default y
336         depends on !BR2_m68k_cf
337         depends on !BR2_sparc
338         depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
340 # The availability of __sync for 8-byte types on ARM is somewhat
341 # complicated:
343 #  - It appeared in gcc starting with gcc 4.7.
345 #  - On ARMv7, there is no problem, it can be directly implemented in
346 #    userspace.
348 #  - On < ARMv7, it requires help from the kernel. Unfortunately, the
349 #    libgcc code implementing 8-byte __sync with the help from the
350 #    kernel calls __write() when a failure occurs, which is a function
351 #    internal to glibc, not available in uClibc and musl. This means
352 #    that the 8-byte __sync operations are not available on < ARMv7
353 #    with uClibc and musl. This problem was fixed as part of gcc
354 #    PR68059, which was backported to the gcc 5 branch, but isn't yet
355 #    part of any gcc 5.x release.
357 config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
358         bool
359         default y
360         depends on BR2_arm || BR2_armeb
361         depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
362         depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
364 # 8-byte intrinsics available on most x86 CPUs, except a few old ones
365 config BR2_TOOLCHAIN_X86_HAS_SYNC_8
366         bool
367         default y
368         depends on BR2_i386
369         depends on !BR2_x86_i486
370         depends on !BR2_x86_c3
371         depends on !BR2_x86_winchip_c6
372         depends on !BR2_x86_winchip2
374 # 8-byte intrinsics available:
375 #  - On all 64 bits architecture
376 #  - On a certain combinations of ARM platforms
377 #  - On certain x86 32 bits CPUs
378 config BR2_TOOLCHAIN_HAS_SYNC_8
379         bool
380         default y if BR2_ARCH_IS_64
381         default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
382         default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
384 # libatomic is available since gcc 4.8, when thread support is
385 # enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
386 # part of the tuple, and is therefore not build on uclinux targets,
387 # which is why BR2_BINFMT_FLAT configurations are excluded.
388 config BR2_TOOLCHAIN_HAS_LIBATOMIC
389         bool
390         default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
391                 BR2_TOOLCHAIN_HAS_THREADS && \
392                 !BR2_BINFMT_FLAT
394 # __atomic intrinsics are available:
395 # - with gcc 4.8, either through built-ins or libatomic, on all
396 #   architectures. Since we don't want to separate the cases where
397 #   libatomic is needed vs. not needed, we simplify thing and only
398 #   support situations where libatomic is available, even if on some
399 #   architectures libatomic is not strictly needed as all __atomic
400 #   intrinsics might be built-in. The only case where libatomic is
401 #   missing entirely is when the toolchain does not have support for
402 #   threads. However, a package that does not need threads but still
403 #   uses atomics is quite a corner case, which does not warrant the
404 #   added complexity.
405 # - with gcc 4.7, libatomic did not exist, so only built-ins are
406 #   available. This means that __atomic can only be used in a subset
407 #   of the architectures
408 config BR2_TOOLCHAIN_HAS_ATOMIC
409         bool
410         default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
411         default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
412         default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
413         default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
414         default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
416 # - libquadmath is not needed/available on all architectures (but gcc
417 #   correctly handles this already).
418 # - At least, libquadmath is available on:
419 #   - i*86
420 #   - x86_64
421 # - When available, libquadmath requires wchar support.
422 config BR2_TOOLCHAIN_HAS_LIBQUADMATH
423         bool
424         default y if BR2_i386 || BR2_x86_64