3 # Invisible option that makes sure the toolchain package always gets
9 # Should be selected for glibc or eglibc
10 config BR2_TOOLCHAIN_USES_GLIBC
13 select BR2_ENABLE_LOCALE
14 select BR2_TOOLCHAIN_HAS_FULL_GETTEXT
15 select BR2_TOOLCHAIN_HAS_THREADS
16 select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
17 select BR2_TOOLCHAIN_HAS_THREADS_NPTL
18 select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
19 select BR2_TOOLCHAIN_SUPPORTS_PIE
21 config BR2_TOOLCHAIN_USES_UCLIBC
23 select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_m68k && !BR2_microblaze && !BR2_STATIC_LIBS
25 config BR2_TOOLCHAIN_USES_MUSL
28 select BR2_ENABLE_LOCALE
29 select BR2_TOOLCHAIN_HAS_THREADS
30 select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
31 select BR2_TOOLCHAIN_HAS_THREADS_NPTL
32 select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_STATIC_LIBS
35 prompt "Toolchain type"
37 Select whether to use the toolchain provided by buildroot
38 or an external toolchain.
40 Some vendors provide toolchains in binary form, some in
43 config BR2_TOOLCHAIN_BUILDROOT
44 bool "Buildroot toolchain"
45 depends on BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT
46 select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
48 config BR2_TOOLCHAIN_EXTERNAL
49 bool "External toolchain"
51 Select if you want to use an existing cross-compiling
52 toolchain. Buildroot can either download automatically a
53 toolchain, or use an already installed toolchain.
57 source "toolchain/toolchain-buildroot/Config.in"
58 source "toolchain/toolchain-external/Config.in"
60 # Generic toolchain options
62 # we want gdb config in the middle of both source and external
63 # toolchains, but mconf won't let us source the same file twice,
64 # so put it here instead
65 source "package/gdb/Config.in.host"
67 comment "Toolchain Generic Options"
69 # https://sourceware.org/bugzilla/show_bug.cgi?id=19615
70 # Affect toolchains built with binutils 2.26 (fixed in binutils 2.26.1).
71 config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19615
74 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
75 # exception_ptr, nested_exception, and future from libstdc++ are not
76 # available for architectures not supporting always lock-free atomic
78 config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
80 default y if BR2_nios2
81 default y if BR2_ARM_CPU_ARMV4
82 default y if BR2_ARM_CPU_ARMV5
83 default y if BR2_sparc_v8
84 default y if BR2_m68k_cf5208
85 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
87 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85862
88 # An infinite loop exists in the find_base_term() logic of 6.x
89 # on microblaze. http://autobuild.buildroot.net/results/158e8ebb39713e1b436a5cc1a1916f46c30694df/
90 config BR2_TOOLCHAIN_HAS_GCC_BUG_85862
92 default y if BR2_microblaze
93 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
95 config BR2_TOOLCHAIN_HAS_NATIVE_RPC
101 config BR2_ENABLE_LOCALE
104 config BR2_INSTALL_LIBSTDCPP
107 config BR2_TOOLCHAIN_HAS_FORTRAN
110 config BR2_TOOLCHAIN_HAS_THREADS
113 config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
116 config BR2_TOOLCHAIN_HAS_THREADS_NPTL
119 config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
122 config BR2_TOOLCHAIN_HAS_SSP
125 config BR2_TOOLCHAIN_SUPPORTS_PIE
128 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
129 bool "Copy gconv libraries"
130 depends on BR2_TOOLCHAIN_USES_GLIBC
132 The gconv libraries are used to convert between different
133 character sets (charsets).
135 Say 'y' if you need to store and/or display different
138 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
139 string "Gconv libraries to copy"
140 depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
142 Set to the list of gconv libraries to copy.
143 Leave empty to copy all gconv libraries.
145 Specify only the basename of the libraries, leave
146 out the .so extension. Eg.:
147 IBM850 ISO8859-15 UNICODE
149 Note: the full set of gconv libs are ~8MiB (on ARM).
151 # This boolean is true if the toolchain provides a built-in full
152 # featured gettext implementation (glibc), and false if only a stub
153 # gettext implementation is provided (uclibc, musl)
154 config BR2_TOOLCHAIN_HAS_FULL_GETTEXT
158 bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
159 default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY
161 If your target has a MMU, you should say Y here. If you
162 are unsure, just say Y.
164 config BR2_TARGET_OPTIMIZATION
165 string "Target Optimizations"
168 Optimizations to use when building for the target host.
169 NOTE: gcc optimization level is defined in build options.
171 config BR2_TARGET_LDFLAGS
172 string "Target linker options"
174 Extra options to pass to the linker when building for the
177 Note that options with a '$' sign (eg.
178 -Wl,-rpath='$ORIGIN/../lib') are not supported.
180 config BR2_ECLIPSE_REGISTER
181 bool "Register toolchain within Eclipse Buildroot plug-in"
183 This options tells Buildroot to generate the necessary
184 configuration files to make your toolchain appear within
185 Eclipse, through the Eclipse Buildroot plugin.
187 # Options for packages to depend on, if they require at least a
188 # specific version of the kernel headers.
189 # Toolchains should choose the adequate option (ie. the highest
190 # version, not all of them).
191 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
194 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
196 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
198 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
200 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
202 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
204 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
206 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
208 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
210 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
212 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
214 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
216 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
218 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
220 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
222 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
224 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
226 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
228 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
230 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
232 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
234 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
236 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
238 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
240 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
242 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
244 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
246 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
248 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
250 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
252 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
254 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
256 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
258 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
260 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
262 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
264 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
266 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
268 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
270 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
272 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
274 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
276 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
278 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
280 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
282 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
284 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
286 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
288 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
290 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
292 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
294 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
296 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
298 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
300 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
302 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
304 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
306 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
308 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
310 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
312 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
314 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
316 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
318 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
320 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
322 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
324 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
326 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
328 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
330 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
332 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
334 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
336 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
338 # This order guarantees that the highest version is set, as kconfig
339 # stops affecting a value on the first matching default.
340 config BR2_TOOLCHAIN_HEADERS_AT_LEAST
342 default "4.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
343 default "4.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
344 default "4.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
345 default "4.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
346 default "4.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
347 default "4.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
348 default "4.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
349 default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
350 default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
351 default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
352 default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
353 default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
354 default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
355 default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
356 default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
357 default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
358 default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
359 default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
360 default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
361 default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
362 default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
363 default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
364 default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
365 default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
366 default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
367 default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
368 default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
369 default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
370 default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
371 default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
372 default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
373 default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
374 default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
375 default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
376 default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
377 default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
378 default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
381 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
384 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
386 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
388 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
390 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
392 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
394 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
396 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
398 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
400 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
402 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
404 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
406 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
408 config BR2_TOOLCHAIN_GCC_AT_LEAST_5
410 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
412 config BR2_TOOLCHAIN_GCC_AT_LEAST_6
414 select BR2_TOOLCHAIN_GCC_AT_LEAST_5
416 config BR2_TOOLCHAIN_GCC_AT_LEAST_7
418 select BR2_TOOLCHAIN_GCC_AT_LEAST_6
420 # This order guarantees that the highest version is set, as kconfig
421 # stops affecting a value on the first matching default.
422 config BR2_TOOLCHAIN_GCC_AT_LEAST
424 default "7" if BR2_TOOLCHAIN_GCC_AT_LEAST_7
425 default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
426 default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
427 default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
428 default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
429 default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
430 default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
431 default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
432 default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
433 default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
435 config BR2_TOOLCHAIN_HAS_MNAN_OPTION
437 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
439 config BR2_TOOLCHAIN_HAS_SYNC_1
442 depends on !BR2_m68k_cf
443 depends on !BR2_microblaze
444 depends on !BR2_sparc
445 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
447 config BR2_TOOLCHAIN_HAS_SYNC_2
449 default y if BR2_TOOLCHAIN_HAS_SYNC_1
451 config BR2_TOOLCHAIN_HAS_SYNC_4
454 depends on !BR2_m68k_cf
455 depends on !BR2_sparc
456 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
458 # The availability of __sync for 8-byte types on ARM is somewhat
461 # - It appeared in gcc starting with gcc 4.7.
463 # - On ARMv7, there is no problem, it can be directly implemented in
466 # - On < ARMv7, it requires help from the kernel. Unfortunately, the
467 # libgcc code implementing 8-byte __sync with the help from the
468 # kernel calls __write() when a failure occurs, which is a function
469 # internal to glibc, not available in uClibc and musl. This means
470 # that the 8-byte __sync operations are not available on < ARMv7
471 # with uClibc and musl. This problem was fixed as part of gcc
472 # PR68059, which was backported to the gcc 5 branch, but isn't yet
473 # part of any gcc 5.x release.
475 config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
478 depends on BR2_arm || BR2_armeb
479 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
480 depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
482 # 8-byte intrinsics available on most x86 CPUs, except a few old ones
483 config BR2_TOOLCHAIN_X86_HAS_SYNC_8
487 depends on !BR2_x86_i486
488 depends on !BR2_x86_c3
489 depends on !BR2_x86_winchip_c6
490 depends on !BR2_x86_winchip2
492 # 8-byte intrinsics available:
493 # - On all 64 bits architecture
494 # - On a certain combinations of ARM platforms
495 # - On certain x86 32 bits CPUs
496 config BR2_TOOLCHAIN_HAS_SYNC_8
498 default y if BR2_ARCH_IS_64
499 default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
500 default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
502 # libatomic is available since gcc 4.8, when thread support is
503 # enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
504 # part of the tuple, and is therefore not build on uclinux targets,
505 # which is why BR2_BINFMT_FLAT configurations are excluded.
506 config BR2_TOOLCHAIN_HAS_LIBATOMIC
508 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
509 BR2_TOOLCHAIN_HAS_THREADS && \
512 # __atomic intrinsics are available:
513 # - with gcc 4.8, either through built-ins or libatomic, on all
514 # architectures. Since we don't want to separate the cases where
515 # libatomic is needed vs. not needed, we simplify thing and only
516 # support situations where libatomic is available, even if on some
517 # architectures libatomic is not strictly needed as all __atomic
518 # intrinsics might be built-in. The only case where libatomic is
519 # missing entirely is when the toolchain does not have support for
520 # threads. However, a package that does not need threads but still
521 # uses atomics is quite a corner case, which does not warrant the
523 # - with gcc 4.7, libatomic did not exist, so only built-ins are
524 # available. This means that __atomic can only be used in a subset
525 # of the architectures
526 config BR2_TOOLCHAIN_HAS_ATOMIC
528 default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
529 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
530 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
531 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
532 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
534 # - libquadmath is not needed/available on all architectures (but gcc
535 # correctly handles this already).
536 # - At least, libquadmath is available on:
539 # - When available, libquadmath requires wchar support.
540 config BR2_TOOLCHAIN_HAS_LIBQUADMATH
542 default y if BR2_i386 || BR2_x86_64