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 config BR2_TOOLCHAIN_HAS_NATIVE_RPC
93 config BR2_ENABLE_LOCALE
96 config BR2_INSTALL_LIBSTDCPP
99 config BR2_TOOLCHAIN_HAS_FORTRAN
102 config BR2_TOOLCHAIN_HAS_THREADS
105 config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
108 config BR2_TOOLCHAIN_HAS_THREADS_NPTL
111 config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
114 config BR2_TOOLCHAIN_HAS_SSP
117 config BR2_TOOLCHAIN_SUPPORTS_PIE
120 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
121 bool "Copy gconv libraries"
122 depends on BR2_TOOLCHAIN_USES_GLIBC
124 The gconv libraries are used to convert between different
125 character sets (charsets).
127 Say 'y' if you need to store and/or display different
130 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
131 string "Gconv libraries to copy"
132 depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
134 Set to the list of gconv libraries to copy.
135 Leave empty to copy all gconv libraries.
137 Specify only the basename of the libraries, leave
138 out the .so extension. Eg.:
139 IBM850 ISO8859-15 UNICODE
141 Note: the full set of gconv libs are ~8MiB (on ARM).
143 # This boolean is true if the toolchain provides a built-in full
144 # featured gettext implementation (glibc), and false if only a stub
145 # gettext implementation is provided (uclibc, musl)
146 config BR2_TOOLCHAIN_HAS_FULL_GETTEXT
150 bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
151 default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY
153 If your target has a MMU, you should say Y here. If you
154 are unsure, just say Y.
156 config BR2_TARGET_OPTIMIZATION
157 string "Target Optimizations"
160 Optimizations to use when building for the target host.
161 NOTE: gcc optimization level is defined in build options.
163 config BR2_TARGET_LDFLAGS
164 string "Target linker options"
166 Extra options to pass to the linker when building for the
169 Note that options with a '$' sign (eg.
170 -Wl,-rpath='$ORIGIN/../lib') are not supported.
172 config BR2_ECLIPSE_REGISTER
173 bool "Register toolchain within Eclipse Buildroot plug-in"
175 This options tells Buildroot to generate the necessary
176 configuration files to make your toolchain appear within
177 Eclipse, through the Eclipse Buildroot plugin.
179 # Options for packages to depend on, if they require at least a
180 # specific version of the kernel headers.
181 # Toolchains should choose the adequate option (ie. the highest
182 # version, not all of them).
183 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
186 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
188 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
190 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
192 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
194 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
196 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
198 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
200 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
202 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
204 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
206 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
208 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
210 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
212 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
214 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
216 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
218 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
220 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
222 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
224 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
226 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
228 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
230 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
232 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
234 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
236 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
238 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
240 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
242 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
244 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
246 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
248 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
250 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
252 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
254 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
256 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
258 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
260 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
262 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
264 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
266 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
268 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
270 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
272 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
274 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
276 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
278 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
280 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
282 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
284 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
286 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
288 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
290 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
292 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
294 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
296 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
298 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
300 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
302 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
304 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
306 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
308 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
310 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
312 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
314 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
316 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
318 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
320 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
322 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
324 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
326 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
328 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
330 # This order guarantees that the highest version is set, as kconfig
331 # stops affecting a value on the first matching default.
332 config BR2_TOOLCHAIN_HEADERS_AT_LEAST
334 default "4.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
335 default "4.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
336 default "4.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
337 default "4.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
338 default "4.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
339 default "4.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
340 default "4.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
341 default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
342 default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
343 default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
344 default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
345 default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
346 default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
347 default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
348 default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
349 default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
350 default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
351 default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
352 default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
353 default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
354 default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
355 default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
356 default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
357 default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
358 default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
359 default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
360 default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
361 default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
362 default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
363 default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
364 default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
365 default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
366 default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
367 default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
368 default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
369 default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
370 default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
373 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
376 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
378 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
380 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
382 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
384 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
386 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
388 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
390 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
392 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
394 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
396 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
398 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
400 config BR2_TOOLCHAIN_GCC_AT_LEAST_5
402 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
404 config BR2_TOOLCHAIN_GCC_AT_LEAST_6
406 select BR2_TOOLCHAIN_GCC_AT_LEAST_5
408 config BR2_TOOLCHAIN_GCC_AT_LEAST_7
410 select BR2_TOOLCHAIN_GCC_AT_LEAST_6
412 # This order guarantees that the highest version is set, as kconfig
413 # stops affecting a value on the first matching default.
414 config BR2_TOOLCHAIN_GCC_AT_LEAST
416 default "7" if BR2_TOOLCHAIN_GCC_AT_LEAST_7
417 default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
418 default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
419 default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
420 default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
421 default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
422 default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
423 default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
424 default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
425 default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
427 config BR2_TOOLCHAIN_HAS_MNAN_OPTION
429 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
431 config BR2_TOOLCHAIN_HAS_SYNC_1
434 depends on !BR2_m68k_cf
435 depends on !BR2_microblaze
436 depends on !BR2_sparc
437 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
439 config BR2_TOOLCHAIN_HAS_SYNC_2
441 default y if BR2_TOOLCHAIN_HAS_SYNC_1
443 config BR2_TOOLCHAIN_HAS_SYNC_4
446 depends on !BR2_m68k_cf
447 depends on !BR2_sparc
448 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
450 # The availability of __sync for 8-byte types on ARM is somewhat
453 # - It appeared in gcc starting with gcc 4.7.
455 # - On ARMv7, there is no problem, it can be directly implemented in
458 # - On < ARMv7, it requires help from the kernel. Unfortunately, the
459 # libgcc code implementing 8-byte __sync with the help from the
460 # kernel calls __write() when a failure occurs, which is a function
461 # internal to glibc, not available in uClibc and musl. This means
462 # that the 8-byte __sync operations are not available on < ARMv7
463 # with uClibc and musl. This problem was fixed as part of gcc
464 # PR68059, which was backported to the gcc 5 branch, but isn't yet
465 # part of any gcc 5.x release.
467 config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
470 depends on BR2_arm || BR2_armeb
471 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
472 depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
474 # 8-byte intrinsics available on most x86 CPUs, except a few old ones
475 config BR2_TOOLCHAIN_X86_HAS_SYNC_8
479 depends on !BR2_x86_i486
480 depends on !BR2_x86_c3
481 depends on !BR2_x86_winchip_c6
482 depends on !BR2_x86_winchip2
484 # 8-byte intrinsics available:
485 # - On all 64 bits architecture
486 # - On a certain combinations of ARM platforms
487 # - On certain x86 32 bits CPUs
488 config BR2_TOOLCHAIN_HAS_SYNC_8
490 default y if BR2_ARCH_IS_64
491 default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
492 default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
494 # libatomic is available since gcc 4.8, when thread support is
495 # enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
496 # part of the tuple, and is therefore not build on uclinux targets,
497 # which is why BR2_BINFMT_FLAT configurations are excluded.
498 config BR2_TOOLCHAIN_HAS_LIBATOMIC
500 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
501 BR2_TOOLCHAIN_HAS_THREADS && \
504 # __atomic intrinsics are available:
505 # - with gcc 4.8, either through built-ins or libatomic, on all
506 # architectures. Since we don't want to separate the cases where
507 # libatomic is needed vs. not needed, we simplify thing and only
508 # support situations where libatomic is available, even if on some
509 # architectures libatomic is not strictly needed as all __atomic
510 # intrinsics might be built-in. The only case where libatomic is
511 # missing entirely is when the toolchain does not have support for
512 # threads. However, a package that does not need threads but still
513 # uses atomics is quite a corner case, which does not warrant the
515 # - with gcc 4.7, libatomic did not exist, so only built-ins are
516 # available. This means that __atomic can only be used in a subset
517 # of the architectures
518 config BR2_TOOLCHAIN_HAS_ATOMIC
520 default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
521 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
522 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
523 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
524 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
526 # - libquadmath is not needed/available on all architectures (but gcc
527 # correctly handles this already).
528 # - At least, libquadmath is available on:
531 # - When available, libquadmath requires wchar support.
532 config BR2_TOOLCHAIN_HAS_LIBQUADMATH
534 default y if BR2_i386 || BR2_x86_64