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_UCONTEXT
19 select BR2_TOOLCHAIN_SUPPORTS_PIE
21 config BR2_TOOLCHAIN_USES_UCLIBC
23 # ucontext is only available for a subset of the supported
25 select BR2_TOOLCHAIN_HAS_UCONTEXT if BR2_ARM_CPU_HAS_ARM || BR2_i386 \
26 || BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el \
27 || BR2_sparc || BR2_x86_64
28 select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_m68k && !BR2_microblaze && !BR2_STATIC_LIBS
30 config BR2_TOOLCHAIN_USES_MUSL
33 select BR2_ENABLE_LOCALE
34 select BR2_TOOLCHAIN_HAS_THREADS
35 select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
36 select BR2_TOOLCHAIN_HAS_THREADS_NPTL
37 select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_STATIC_LIBS
40 prompt "Toolchain type"
42 Select whether to use the toolchain provided by buildroot
43 or an external toolchain.
45 Some vendors provide toolchains in binary form, some in
48 config BR2_TOOLCHAIN_BUILDROOT
49 bool "Buildroot toolchain"
50 depends on BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT
52 config BR2_TOOLCHAIN_EXTERNAL
53 bool "External toolchain"
55 Select if you want to use an existing cross-compiling
56 toolchain. Buildroot can either download automatically a
57 toolchain, or use an already installed toolchain.
61 source "toolchain/toolchain-buildroot/Config.in"
62 source "toolchain/toolchain-external/Config.in"
64 # Generic toolchain options
66 # we want gdb config in the middle of both source and external
67 # toolchains, but mconf won't let us source the same file twice,
68 # so put it here instead
69 source "package/gdb/Config.in.host"
71 comment "Toolchain Generic Options"
73 # https://sourceware.org/bugzilla/show_bug.cgi?id=30730
74 # Affect toolchains built with binutils 2.40, still not fixed.
75 config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_30730
77 default y if BR2_m68k_cf
79 # Atomic types can be:
81 # - sometimes lock-free
83 # see https://en.cppreference.com/w/c/atomic/ATOMIC_LOCK_FREE_consts
85 # On most architectures, gcc provides "always lock-free" atomic types,
86 # but a few architectures are limited to "sometimes lock-free"
87 # types. This hidden option allows to know if the architecture
88 # provides "always lock-free" atomic types.
89 config BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
93 depends on !BR2_ARM_CPU_ARMV4
94 depends on !BR2_ARM_CPU_ARMV5
95 depends on !BR2_sparc_v8
96 depends on !BR2_m68k_cf5208
97 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
99 # GCC uses thunk functions to adjust the 'this' pointer when calling
100 # C++ member functions in classes derived with multiple inheritance.
101 # Generation of thunk functions requires support from the compiler
102 # back end. In the absence of that support target-independent code
103 # in the C++ front end is used to generate thunk functions, but it
104 # does not support vararg functions.
105 # or1k will support it in the gcc mainline starting with gcc-9.
106 config BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK
110 depends on !BR2_xtensa
112 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43744. This bug
113 # reappeared on gcc 9.x and is still not fixed on gcc 11.x
114 config BR2_TOOLCHAIN_HAS_GCC_BUG_43744
116 default y if !BR2_TOOLCHAIN_GCC_AT_LEAST_8
117 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_9
120 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63261. This bug no
121 # longer exists in gcc 8.x.
122 config BR2_TOOLCHAIN_HAS_GCC_BUG_63261
124 default y if BR2_microblaze
125 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8
127 # Prior to gcc 7.x, exception_ptr, nested_exception and future from
128 # libstdc++ would only be provided on architectures that support
129 # always lock-free atomic ints. See
130 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735. This issue has
131 # been removed in GCC 7.x, where exception propagation is now
132 # supported without lock-free atomic int.
133 config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
135 default y if !BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS && \
136 !BR2_TOOLCHAIN_GCC_AT_LEAST_7
138 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485. This bug still
140 config BR2_TOOLCHAIN_HAS_GCC_BUG_68485
142 default y if BR2_microblaze
144 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81426
145 config BR2_TOOLCHAIN_HAS_GCC_BUG_81426
149 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83143
150 # Error: invalid operands (*UND* and .text sections) for `-' on sh4.
151 # This bug no longer exists in gcc 10.x but reappeared on gcc 11.x and
152 # it still not been fixed yet.
153 config BR2_TOOLCHAIN_HAS_GCC_BUG_83143
155 default y if !BR2_TOOLCHAIN_GCC_AT_LEAST_10
156 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_11
159 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180. This bug no
160 # longer exists in gcc 8.x.
161 config BR2_TOOLCHAIN_HAS_GCC_BUG_85180
163 default y if BR2_microblaze
164 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8
166 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85862
167 # An infinite loop exists in the find_base_term() logic of 6.x
168 # on microblaze. http://autobuild.buildroot.net/results/158e8ebb39713e1b436a5cc1a1916f46c30694df/
169 config BR2_TOOLCHAIN_HAS_GCC_BUG_85862
171 default y if BR2_microblaze
172 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
174 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620
175 # ICE: in do_output_reload, at reload1.c:7978 on microblaze.
176 # This bug no longer exists in gcc 10.x but reappeared in gcc 11.x
177 config BR2_TOOLCHAIN_HAS_GCC_BUG_90620
179 default y if BR2_microblaze
180 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10 \
181 || BR2_TOOLCHAIN_GCC_AT_LEAST_11
183 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93847
184 # ICE: compiler error: Segmentation fault on Nios II. This bug
185 # no longer exists in gcc 9.x.
186 config BR2_TOOLCHAIN_HAS_GCC_BUG_93847
188 default y if BR2_nios2 && !BR2_TOOLCHAIN_GCC_AT_LEAST_9
190 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99410
191 # Error: branch offset out of range on Nios II. This bug
192 # no longer exists in gcc 8.x but reappeared on gcc 9.x and still exists
194 config BR2_TOOLCHAIN_HAS_GCC_BUG_99410
196 default y if !BR2_TOOLCHAIN_GCC_AT_LEAST_8
197 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_9
200 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101737
201 # ICE: SH4 -Os causes internal compiler error. This bug
202 # still exists in gcc = 11.1.0
203 config BR2_TOOLCHAIN_HAS_GCC_BUG_101737
207 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101915
208 # ICE: in extract_insn, at recog.c:2294 on microblaze.
209 # This bug still exists in gcc = 12.1.0
210 config BR2_TOOLCHAIN_HAS_GCC_BUG_101915
212 default y if BR2_microblaze
214 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101916
215 # ICE: on SH4: Segmentation fault signal terminated program cc1.
216 # This bug still exists in gcc = 11.1.0
217 config BR2_TOOLCHAIN_HAS_GCC_BUG_101916
221 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101952
222 # ICE: on SH4: unaligned opcodes detected in executable segment.
223 # This bug still exists in gcc = 11.1.0
224 config BR2_TOOLCHAIN_HAS_GCC_BUG_101952
228 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104028
229 # ICE: on M68K: Error: value -16034 out of range
230 # This bug still exists in gcc = 11.1.0
231 config BR2_TOOLCHAIN_HAS_GCC_BUG_104028
233 default y if BR2_m68k
235 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107728
236 # https://sourceware.org/bugzilla/show_bug.cgi?id=29621
237 config BR2_TOOLCHAIN_HAS_GCC_BUG_107728
239 default y if BR2_microblazebe || BR2_microblazeel \
240 || BR2_mips || BR2_mipsel \
244 depends on BR2_TOOLCHAIN_USES_GLIBC
245 depends on BR2_OPTIMIZE_0
247 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110934
248 # ICE: on M68K: in change_address_1, at emit-rtl.cc:2287
249 # This bug exists in gcc = 12.3.0 and gcc = 13.2.0
250 config BR2_TOOLCHAIN_HAS_GCC_BUG_110934
252 default y if BR2_m68k
254 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111001
255 # ICE: on SH4: during RTL pass: sh_treg_combine2
256 # This bug exist in gcc = 13.2.0
257 config BR2_TOOLCHAIN_HAS_GCC_BUG_111001
260 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_13
261 depends on BR2_OPTIMIZE_1 || \
265 config BR2_TOOLCHAIN_HAS_NATIVE_RPC
271 config BR2_ENABLE_LOCALE
274 config BR2_INSTALL_LIBSTDCPP
277 config BR2_TOOLCHAIN_HAS_DLANG
280 config BR2_TOOLCHAIN_HAS_FORTRAN
283 config BR2_TOOLCHAIN_HAS_THREADS
286 config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
289 config BR2_TOOLCHAIN_HAS_THREADS_NPTL
292 config BR2_TOOLCHAIN_HAS_SSP
295 config BR2_TOOLCHAIN_HAS_SSP_STRONG
297 default y if BR2_TOOLCHAIN_HAS_SSP && BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
299 # This boolean is true if the toolchain provides a full featured
300 # ucontext implementation with ucontext_t and {get,make,set}context
301 config BR2_TOOLCHAIN_HAS_UCONTEXT
304 config BR2_TOOLCHAIN_HAS_OPENMP
307 config BR2_TOOLCHAIN_SUPPORTS_PIE
310 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
311 bool "Copy gconv libraries"
312 depends on BR2_TOOLCHAIN_USES_GLIBC
314 The gconv libraries are used to convert between different
315 character sets (charsets).
317 Say 'y' if you need to store and/or display different
320 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
321 string "Gconv libraries to copy"
322 depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
324 Set to the list of gconv libraries to copy.
325 Leave empty to copy all gconv libraries.
327 Specify only the basename of the libraries, leave
328 out the .so extension. Eg.:
329 IBM850 ISO8859-15 UNICODE
331 Note: the full set of gconv libs are ~8MiB (on ARM).
333 config BR2_TOOLCHAIN_EXTRA_LIBS
334 string "Extra toolchain libraries to be copied to target"
335 default BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS if BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS != "" # legacy
336 depends on !BR2_STATIC_LIBS
338 If your toolchain provides extra libraries that need to be
339 copied to the target filesystem, enter them here, separated
340 by spaces. The library should not include a suffix or any
341 type of pre/post wildcard.
343 Examples where this can be useful is for adding debug
344 libraries to the target like the GCC libsanitizer.
345 e.g. "libasan liblsan libtsan libubsan"
347 # This boolean is true if the toolchain provides a built-in full
348 # featured gettext implementation (glibc), and false if only a stub
349 # gettext implementation is provided (uclibc, musl)
350 config BR2_TOOLCHAIN_HAS_FULL_GETTEXT
353 config BR2_TARGET_OPTIMIZATION
354 string "Target Optimizations"
357 Optimizations to use when building for the target host.
358 NOTE: gcc optimization level is defined in build options.
360 config BR2_TARGET_LDFLAGS
361 string "Target linker options"
363 Extra options to pass to the linker when building for the
366 Note that options with a '$' sign (eg.
367 -Wl,-rpath='$ORIGIN/../lib') are not supported.
369 # Options for packages to depend on, if they require at least a
370 # specific version of the kernel headers.
371 # Toolchains should choose the adequate option (ie. the highest
372 # version, not all of them).
373 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
376 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
378 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
380 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
382 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
384 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
386 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
388 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
390 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
392 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
394 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
396 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
398 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
400 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
402 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
404 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
406 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
408 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
410 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
412 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
414 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
416 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
418 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
420 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
422 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
424 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
426 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
428 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
430 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
432 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
434 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
436 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
438 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
440 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
442 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
444 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
446 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
448 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
450 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
452 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
454 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
456 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
458 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
460 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
462 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
464 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
466 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
468 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
470 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
472 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
474 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
476 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
478 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
480 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
482 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
484 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
486 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
488 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
490 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
492 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
494 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
496 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
498 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
500 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
502 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
504 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
506 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
508 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
510 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
512 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
514 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
516 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
518 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
520 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17
522 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
524 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18
526 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17
528 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19
530 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18
532 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20
534 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19
536 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0
538 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20
540 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
542 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0
544 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2
546 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
548 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3
550 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2
552 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4
554 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3
556 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_5
558 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4
560 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_6
562 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_5
564 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_7
566 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_6
568 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_8
570 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_7
572 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9
574 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_8
576 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10
578 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9
580 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_11
582 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10
584 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_12
586 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_11
588 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_13
590 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_12
592 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_14
594 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_13
596 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_15
598 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_14
600 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_16
602 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_15
604 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_17
606 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_16
608 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_18
610 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_17
612 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_19
614 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_18
616 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_0
618 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_19
620 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_1
622 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_0
624 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_2
626 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_1
628 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_3
630 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_2
632 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_4
634 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_3
636 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_5
638 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_4
640 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_6
642 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_5
644 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_7
646 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_6
648 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_8
650 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_7
652 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_9
654 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_8
656 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_10
658 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_9
659 select BR2_TOOLCHAIN_HEADERS_LATEST
661 # This should be selected by the latest version, above, to indicate that
662 # Buildroot does not know of more recent headers than the ones selected.
663 # This allows using toolchains with headers more recent than Buildroot
664 # knows about, while still enforcing strict check for older headers.
665 config BR2_TOOLCHAIN_HEADERS_LATEST
668 # This order guarantees that the highest version is set, as kconfig
669 # stops affecting a value on the first matching default.
670 config BR2_TOOLCHAIN_HEADERS_AT_LEAST
672 default "6.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_10
673 default "6.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_9
674 default "6.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_8
675 default "6.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_7
676 default "6.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_6
677 default "6.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_5
678 default "6.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_4
679 default "6.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_3
680 default "6.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_2
681 default "6.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_1
682 default "6.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_0
683 default "5.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_19
684 default "5.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_18
685 default "5.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_17
686 default "5.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_16
687 default "5.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_15
688 default "5.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_14
689 default "5.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_13
690 default "5.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_12
691 default "5.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_11
692 default "5.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10
693 default "5.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9
694 default "5.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_8
695 default "5.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_7
696 default "5.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_6
697 default "5.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_5
698 default "5.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4
699 default "5.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3
700 default "5.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2
701 default "5.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
702 default "5.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0
703 default "4.20" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20
704 default "4.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19
705 default "4.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18
706 default "4.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17
707 default "4.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
708 default "4.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
709 default "4.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
710 default "4.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
711 default "4.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
712 default "4.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
713 default "4.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
714 default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
715 default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
716 default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
717 default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
718 default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
719 default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
720 default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
721 default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
722 default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
723 default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
724 default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
725 default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
726 default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
727 default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
728 default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
729 default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
730 default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
731 default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
732 default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
733 default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
734 default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
735 default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
736 default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
737 default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
738 default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
739 default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
740 default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
741 default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
742 default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
743 default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
746 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
749 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
751 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
753 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
755 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
757 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
759 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
761 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
763 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
765 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
767 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
769 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
771 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
773 config BR2_TOOLCHAIN_GCC_AT_LEAST_5
775 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
777 config BR2_TOOLCHAIN_GCC_AT_LEAST_6
779 select BR2_TOOLCHAIN_GCC_AT_LEAST_5
781 config BR2_TOOLCHAIN_GCC_AT_LEAST_7
783 select BR2_TOOLCHAIN_GCC_AT_LEAST_6
785 config BR2_TOOLCHAIN_GCC_AT_LEAST_8
787 select BR2_TOOLCHAIN_GCC_AT_LEAST_7
789 config BR2_TOOLCHAIN_GCC_AT_LEAST_9
791 select BR2_TOOLCHAIN_GCC_AT_LEAST_8
793 config BR2_TOOLCHAIN_GCC_AT_LEAST_10
795 select BR2_TOOLCHAIN_GCC_AT_LEAST_9
797 config BR2_TOOLCHAIN_GCC_AT_LEAST_11
799 select BR2_TOOLCHAIN_GCC_AT_LEAST_10
801 config BR2_TOOLCHAIN_GCC_AT_LEAST_12
803 select BR2_TOOLCHAIN_GCC_AT_LEAST_11
805 config BR2_TOOLCHAIN_GCC_AT_LEAST_13
807 select BR2_TOOLCHAIN_GCC_AT_LEAST_12
809 config BR2_TOOLCHAIN_GCC_AT_LEAST_14
811 select BR2_TOOLCHAIN_GCC_AT_LEAST_13
813 # This order guarantees that the highest version is set, as kconfig
814 # stops affecting a value on the first matching default.
815 config BR2_TOOLCHAIN_GCC_AT_LEAST
817 default "14" if BR2_TOOLCHAIN_GCC_AT_LEAST_14
818 default "13" if BR2_TOOLCHAIN_GCC_AT_LEAST_13
819 default "12" if BR2_TOOLCHAIN_GCC_AT_LEAST_12
820 default "11" if BR2_TOOLCHAIN_GCC_AT_LEAST_11
821 default "10" if BR2_TOOLCHAIN_GCC_AT_LEAST_10
822 default "9" if BR2_TOOLCHAIN_GCC_AT_LEAST_9
823 default "8" if BR2_TOOLCHAIN_GCC_AT_LEAST_8
824 default "7" if BR2_TOOLCHAIN_GCC_AT_LEAST_7
825 default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
826 default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
827 default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
828 default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
829 default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
830 default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
831 default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
832 default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
833 default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
835 config BR2_TOOLCHAIN_HAS_MNAN_OPTION
837 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
839 config BR2_TOOLCHAIN_HAS_SYNC_1
842 depends on !BR2_m68k_cf
843 depends on !BR2_microblaze
844 depends on !BR2_sparc
845 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
847 config BR2_TOOLCHAIN_HAS_SYNC_2
849 default y if BR2_TOOLCHAIN_HAS_SYNC_1
851 config BR2_TOOLCHAIN_HAS_SYNC_4
854 depends on !BR2_m68k_cf
855 depends on !BR2_sparc
856 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
858 # The availability of __sync for 8-byte types on ARM is somewhat
861 # - It appeared in gcc starting with gcc 4.7.
863 # - On ARMv7, there is no problem, it can be directly implemented in
866 # - On < ARMv7, it requires help from the kernel. Unfortunately, the
867 # libgcc code implementing 8-byte __sync with the help from the
868 # kernel calls __write() when a failure occurs, which is a function
869 # internal to glibc, not available in uClibc and musl. This means
870 # that the 8-byte __sync operations are not available on < ARMv7
871 # with uClibc and musl. This problem was fixed as part of gcc
872 # PR68059, which was backported to the gcc 5 branch, but isn't yet
873 # part of any gcc 5.x release.
875 config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
878 depends on BR2_arm || BR2_armeb
879 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
880 depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
882 # 8-byte intrinsics available on most x86 CPUs, except a few old ones
883 config BR2_TOOLCHAIN_X86_HAS_SYNC_8
887 depends on !BR2_x86_i486
888 depends on !BR2_x86_c3
889 depends on !BR2_x86_winchip_c6
890 depends on !BR2_x86_winchip2
892 # 8-byte intrinsics available:
893 # - On all 64 bits architecture
894 # - On a certain combinations of ARM platforms
895 # - On certain x86 32 bits CPUs
896 config BR2_TOOLCHAIN_HAS_SYNC_8
898 default y if BR2_ARCH_IS_64
899 default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
900 default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
902 # libatomic is available since gcc 4.8, when thread support is enabled.
903 # However, the gcc logic in libatomic/configure.tgt does not recognize
904 # "uclinux" as a valid OS part of the target tuple, and therefore it
905 # does not build libatomic. The "uclinux" part of the tuple is used by
906 # Buildroot when BR2_BINFMT_FLAT=y. This broken logic has only been
907 # fixed for arm since gcc 10.1.0.
908 config BR2_TOOLCHAIN_HAS_LIBATOMIC
910 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
911 depends on BR2_TOOLCHAIN_HAS_THREADS
912 depends on BR2_BINFMT_ELF || \
913 (BR2_BINFMT_FLAT && BR2_arm && \
914 BR2_TOOLCHAIN_GCC_AT_LEAST_10)
916 # __atomic intrinsics are available:
917 # - with gcc 4.8, either through built-ins or libatomic, on all
918 # architectures. Since we don't want to separate the cases where
919 # libatomic is needed vs. not needed, we simplify thing and only
920 # support situations where libatomic is available, even if on some
921 # architectures libatomic is not strictly needed as all __atomic
922 # intrinsics might be built-in. The only case where libatomic is
923 # missing entirely is when the toolchain does not have support for
924 # threads. However, a package that does not need threads but still
925 # uses atomics is quite a corner case, which does not warrant the
927 # - with gcc 4.7, libatomic did not exist, so only built-ins are
928 # available. This means that __atomic can only be used in a subset
929 # of the architectures
930 config BR2_TOOLCHAIN_HAS_ATOMIC
932 default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
933 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
934 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
935 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
936 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
938 # - libquadmath is not needed/available on all architectures (but gcc
939 # correctly handles this already).
940 # - At least, libquadmath is available on:
943 # - PowerPC with vector scalar (VSX) instruction set
944 # - When available, libquadmath requires wchar support.
945 config BR2_TOOLCHAIN_HAS_LIBQUADMATH
947 default y if BR2_i386 || BR2_x86_64
948 default y if BR2_POWERPC_CPU_HAS_VSX
950 comment "Bare metal toolchain"
952 config BR2_TOOLCHAIN_BARE_METAL_BUILDROOT
953 bool "Build a bare metal toolchain"
954 select BR2_PACKAGE_NEWLIB_BARE_METAL
956 Select if you need a bare-metal toolchain for building
957 platform specific firmware images.
959 source "toolchain/toolchain-bare-metal-buildroot/Config.in"