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_SUPPORTS_PIE
20 config BR2_TOOLCHAIN_USES_UCLIBC
22 select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_m68k && !BR2_microblaze && !BR2_STATIC_LIBS
24 config BR2_TOOLCHAIN_USES_MUSL
27 select BR2_ENABLE_LOCALE
28 select BR2_TOOLCHAIN_HAS_THREADS
29 select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
30 select BR2_TOOLCHAIN_HAS_THREADS_NPTL
31 select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_STATIC_LIBS
34 prompt "Toolchain type"
36 Select whether to use the toolchain provided by buildroot
37 or an external toolchain.
39 Some vendors provide toolchains in binary form, some in
42 config BR2_TOOLCHAIN_BUILDROOT
43 bool "Buildroot toolchain"
44 depends on BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT
46 config BR2_TOOLCHAIN_EXTERNAL
47 bool "External toolchain"
49 Select if you want to use an existing cross-compiling
50 toolchain. Buildroot can either download automatically a
51 toolchain, or use an already installed toolchain.
55 source "toolchain/toolchain-buildroot/Config.in"
56 source "toolchain/toolchain-external/Config.in"
58 # Generic toolchain options
60 # we want gdb config in the middle of both source and external
61 # toolchains, but mconf won't let us source the same file twice,
62 # so put it here instead
63 source "package/gdb/Config.in.host"
65 comment "Toolchain Generic Options"
67 # https://sourceware.org/bugzilla/show_bug.cgi?id=19615
68 # Affect toolchains built with binutils 2.26 (fixed in binutils 2.26.1).
69 config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19615
72 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
73 # exception_ptr, nested_exception, and future from libstdc++ are not
74 # available for architectures not supporting always lock-free atomic
76 config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
78 default y if BR2_nios2
79 default y if BR2_ARM_CPU_ARMV4
80 default y if BR2_ARM_CPU_ARMV5
81 default y if BR2_sparc_v8
82 default y if BR2_m68k_cf5208
83 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
85 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180. This bug no
86 # longer exists in gcc 8.x.
87 config BR2_TOOLCHAIN_HAS_GCC_BUG_85180
89 default y if BR2_microblaze
91 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85862
92 # An infinite loop exists in the find_base_term() logic of 6.x
93 # on microblaze. http://autobuild.buildroot.net/results/158e8ebb39713e1b436a5cc1a1916f46c30694df/
94 config BR2_TOOLCHAIN_HAS_GCC_BUG_85862
96 default y if BR2_microblaze
97 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
99 config BR2_TOOLCHAIN_HAS_NATIVE_RPC
105 config BR2_ENABLE_LOCALE
108 config BR2_INSTALL_LIBSTDCPP
111 config BR2_TOOLCHAIN_HAS_FORTRAN
114 config BR2_TOOLCHAIN_HAS_THREADS
117 config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
120 config BR2_TOOLCHAIN_HAS_THREADS_NPTL
123 config BR2_TOOLCHAIN_HAS_SSP
126 config BR2_TOOLCHAIN_SUPPORTS_PIE
129 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
130 bool "Copy gconv libraries"
131 depends on BR2_TOOLCHAIN_USES_GLIBC
133 The gconv libraries are used to convert between different
134 character sets (charsets).
136 Say 'y' if you need to store and/or display different
139 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
140 string "Gconv libraries to copy"
141 depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
143 Set to the list of gconv libraries to copy.
144 Leave empty to copy all gconv libraries.
146 Specify only the basename of the libraries, leave
147 out the .so extension. Eg.:
148 IBM850 ISO8859-15 UNICODE
150 Note: the full set of gconv libs are ~8MiB (on ARM).
152 # This boolean is true if the toolchain provides a built-in full
153 # featured gettext implementation (glibc), and false if only a stub
154 # gettext implementation is provided (uclibc, musl)
155 config BR2_TOOLCHAIN_HAS_FULL_GETTEXT
159 bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
160 default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY
162 If your target has a MMU, you should say Y here. If you
163 are unsure, just say Y.
165 config BR2_TARGET_OPTIMIZATION
166 string "Target Optimizations"
169 Optimizations to use when building for the target host.
170 NOTE: gcc optimization level is defined in build options.
172 config BR2_TARGET_LDFLAGS
173 string "Target linker options"
175 Extra options to pass to the linker when building for the
178 Note that options with a '$' sign (eg.
179 -Wl,-rpath='$ORIGIN/../lib') are not supported.
181 config BR2_ECLIPSE_REGISTER
182 bool "Register toolchain within Eclipse Buildroot plug-in"
184 This options tells Buildroot to generate the necessary
185 configuration files to make your toolchain appear within
186 Eclipse, through the Eclipse Buildroot plugin.
188 # Options for packages to depend on, if they require at least a
189 # specific version of the kernel headers.
190 # Toolchains should choose the adequate option (ie. the highest
191 # version, not all of them).
192 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
195 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
197 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
199 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
201 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
203 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
205 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
207 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
209 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
211 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
213 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
215 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
217 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
219 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
221 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
223 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
225 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
227 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
229 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
231 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
233 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
235 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
237 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
239 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
241 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
243 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
245 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
247 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
249 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
251 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
253 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
255 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
257 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
259 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
261 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
263 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
265 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
267 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
269 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
271 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
273 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
275 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
277 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
279 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
281 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
283 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
285 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
287 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
289 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
291 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
293 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
295 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
297 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
299 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
301 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
303 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
305 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
307 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
309 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
311 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
313 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
315 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
317 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
319 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
321 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
323 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
325 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
327 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
329 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
331 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
333 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
335 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
337 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
339 # This order guarantees that the highest version is set, as kconfig
340 # stops affecting a value on the first matching default.
341 config BR2_TOOLCHAIN_HEADERS_AT_LEAST
343 default "4.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
344 default "4.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
345 default "4.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
346 default "4.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
347 default "4.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
348 default "4.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
349 default "4.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
350 default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
351 default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
352 default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
353 default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
354 default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
355 default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
356 default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
357 default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
358 default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
359 default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
360 default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
361 default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
362 default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
363 default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
364 default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
365 default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
366 default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
367 default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
368 default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
369 default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
370 default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
371 default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
372 default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
373 default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
374 default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
375 default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
376 default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
377 default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
378 default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
379 default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
382 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
385 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
387 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
389 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
391 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
393 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
395 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
397 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
399 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
401 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
403 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
405 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
407 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
409 config BR2_TOOLCHAIN_GCC_AT_LEAST_5
411 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
413 config BR2_TOOLCHAIN_GCC_AT_LEAST_6
415 select BR2_TOOLCHAIN_GCC_AT_LEAST_5
417 config BR2_TOOLCHAIN_GCC_AT_LEAST_7
419 select BR2_TOOLCHAIN_GCC_AT_LEAST_6
421 config BR2_TOOLCHAIN_GCC_AT_LEAST_8
423 select BR2_TOOLCHAIN_GCC_AT_LEAST_7
425 # This order guarantees that the highest version is set, as kconfig
426 # stops affecting a value on the first matching default.
427 config BR2_TOOLCHAIN_GCC_AT_LEAST
429 default "8" if BR2_TOOLCHAIN_GCC_AT_LEAST_8
430 default "7" if BR2_TOOLCHAIN_GCC_AT_LEAST_7
431 default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
432 default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
433 default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
434 default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
435 default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
436 default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
437 default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
438 default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
439 default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
441 config BR2_TOOLCHAIN_HAS_MNAN_OPTION
443 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
445 config BR2_TOOLCHAIN_HAS_SYNC_1
448 depends on !BR2_m68k_cf
449 depends on !BR2_microblaze
450 depends on !BR2_sparc
451 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
453 config BR2_TOOLCHAIN_HAS_SYNC_2
455 default y if BR2_TOOLCHAIN_HAS_SYNC_1
457 config BR2_TOOLCHAIN_HAS_SYNC_4
460 depends on !BR2_m68k_cf
461 depends on !BR2_sparc
462 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
464 # The availability of __sync for 8-byte types on ARM is somewhat
467 # - It appeared in gcc starting with gcc 4.7.
469 # - On ARMv7, there is no problem, it can be directly implemented in
472 # - On < ARMv7, it requires help from the kernel. Unfortunately, the
473 # libgcc code implementing 8-byte __sync with the help from the
474 # kernel calls __write() when a failure occurs, which is a function
475 # internal to glibc, not available in uClibc and musl. This means
476 # that the 8-byte __sync operations are not available on < ARMv7
477 # with uClibc and musl. This problem was fixed as part of gcc
478 # PR68059, which was backported to the gcc 5 branch, but isn't yet
479 # part of any gcc 5.x release.
481 config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
484 depends on BR2_arm || BR2_armeb
485 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
486 depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
488 # 8-byte intrinsics available on most x86 CPUs, except a few old ones
489 config BR2_TOOLCHAIN_X86_HAS_SYNC_8
493 depends on !BR2_x86_i486
494 depends on !BR2_x86_c3
495 depends on !BR2_x86_winchip_c6
496 depends on !BR2_x86_winchip2
498 # 8-byte intrinsics available:
499 # - On all 64 bits architecture
500 # - On a certain combinations of ARM platforms
501 # - On certain x86 32 bits CPUs
502 config BR2_TOOLCHAIN_HAS_SYNC_8
504 default y if BR2_ARCH_IS_64
505 default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
506 default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
508 # libatomic is available since gcc 4.8, when thread support is
509 # enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
510 # part of the tuple, and is therefore not build on uclinux targets,
511 # which is why BR2_BINFMT_FLAT configurations are excluded.
512 config BR2_TOOLCHAIN_HAS_LIBATOMIC
514 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
515 BR2_TOOLCHAIN_HAS_THREADS && \
518 # __atomic intrinsics are available:
519 # - with gcc 4.8, either through built-ins or libatomic, on all
520 # architectures. Since we don't want to separate the cases where
521 # libatomic is needed vs. not needed, we simplify thing and only
522 # support situations where libatomic is available, even if on some
523 # architectures libatomic is not strictly needed as all __atomic
524 # intrinsics might be built-in. The only case where libatomic is
525 # missing entirely is when the toolchain does not have support for
526 # threads. However, a package that does not need threads but still
527 # uses atomics is quite a corner case, which does not warrant the
529 # - with gcc 4.7, libatomic did not exist, so only built-ins are
530 # available. This means that __atomic can only be used in a subset
531 # of the architectures
532 config BR2_TOOLCHAIN_HAS_ATOMIC
534 default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
535 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
536 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
537 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
538 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
540 # - libquadmath is not needed/available on all architectures (but gcc
541 # correctly handles this already).
542 # - At least, libquadmath is available on:
545 # - When available, libquadmath requires wchar support.
546 config BR2_TOOLCHAIN_HAS_LIBQUADMATH
548 default y if BR2_i386 || BR2_x86_64