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 # This order guarantees that the highest version is set, as kconfig
327 # stops affecting a value on the first matching default.
328 config BR2_TOOLCHAIN_HEADERS_AT_LEAST
330 default "4.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
331 default "4.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
332 default "4.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
333 default "4.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
334 default "4.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
335 default "4.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
336 default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
337 default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
338 default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
339 default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
340 default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
341 default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
342 default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
343 default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
344 default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
345 default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
346 default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
347 default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
348 default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
349 default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
350 default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
351 default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
352 default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
353 default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
354 default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
355 default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
356 default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
357 default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
358 default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
359 default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
360 default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
361 default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
362 default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
363 default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
364 default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
365 default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
368 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
371 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
373 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
375 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
377 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
379 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
381 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
383 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
385 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
387 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
389 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
391 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
393 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
395 config BR2_TOOLCHAIN_GCC_AT_LEAST_5
397 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
399 config BR2_TOOLCHAIN_GCC_AT_LEAST_6
401 select BR2_TOOLCHAIN_GCC_AT_LEAST_5
403 config BR2_TOOLCHAIN_GCC_AT_LEAST_7
405 select BR2_TOOLCHAIN_GCC_AT_LEAST_6
407 # This order guarantees that the highest version is set, as kconfig
408 # stops affecting a value on the first matching default.
409 config BR2_TOOLCHAIN_GCC_AT_LEAST
411 default "7" if BR2_TOOLCHAIN_GCC_AT_LEAST_7
412 default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
413 default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
414 default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
415 default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
416 default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
417 default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
418 default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
419 default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
420 default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
422 config BR2_TOOLCHAIN_HAS_MNAN_OPTION
424 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
426 config BR2_TOOLCHAIN_HAS_SYNC_1
430 depends on !BR2_m68k_cf
431 depends on !BR2_microblaze
432 depends on !BR2_sparc
433 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
435 config BR2_TOOLCHAIN_HAS_SYNC_2
437 default y if BR2_TOOLCHAIN_HAS_SYNC_1
439 config BR2_TOOLCHAIN_HAS_SYNC_4
442 depends on !BR2_m68k_cf
443 depends on !BR2_sparc
444 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
446 # The availability of __sync for 8-byte types on ARM is somewhat
449 # - It appeared in gcc starting with gcc 4.7.
451 # - On ARMv7, there is no problem, it can be directly implemented in
454 # - On < ARMv7, it requires help from the kernel. Unfortunately, the
455 # libgcc code implementing 8-byte __sync with the help from the
456 # kernel calls __write() when a failure occurs, which is a function
457 # internal to glibc, not available in uClibc and musl. This means
458 # that the 8-byte __sync operations are not available on < ARMv7
459 # with uClibc and musl. This problem was fixed as part of gcc
460 # PR68059, which was backported to the gcc 5 branch, but isn't yet
461 # part of any gcc 5.x release.
463 config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
466 depends on BR2_arm || BR2_armeb
467 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
468 depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
470 # 8-byte intrinsics available on most x86 CPUs, except a few old ones
471 config BR2_TOOLCHAIN_X86_HAS_SYNC_8
475 depends on !BR2_x86_i486
476 depends on !BR2_x86_c3
477 depends on !BR2_x86_winchip_c6
478 depends on !BR2_x86_winchip2
480 # 8-byte intrinsics available:
481 # - On all 64 bits architecture
482 # - On a certain combinations of ARM platforms
483 # - On certain x86 32 bits CPUs
484 config BR2_TOOLCHAIN_HAS_SYNC_8
486 default y if BR2_ARCH_IS_64
487 default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
488 default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
490 # libatomic is available since gcc 4.8, when thread support is
491 # enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
492 # part of the tuple, and is therefore not build on uclinux targets,
493 # which is why BR2_BINFMT_FLAT configurations are excluded.
494 config BR2_TOOLCHAIN_HAS_LIBATOMIC
496 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
497 BR2_TOOLCHAIN_HAS_THREADS && \
500 # __atomic intrinsics are available:
501 # - with gcc 4.8, either through built-ins or libatomic, on all
502 # architectures. Since we don't want to separate the cases where
503 # libatomic is needed vs. not needed, we simplify thing and only
504 # support situations where libatomic is available, even if on some
505 # architectures libatomic is not strictly needed as all __atomic
506 # intrinsics might be built-in. The only case where libatomic is
507 # missing entirely is when the toolchain does not have support for
508 # threads. However, a package that does not need threads but still
509 # uses atomics is quite a corner case, which does not warrant the
511 # - with gcc 4.7, libatomic did not exist, so only built-ins are
512 # available. This means that __atomic can only be used in a subset
513 # of the architectures
514 config BR2_TOOLCHAIN_HAS_ATOMIC
516 default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
517 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
518 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
519 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
520 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
522 # - libquadmath is not needed/available on all architectures (but gcc
523 # correctly handles this already).
524 # - At least, libquadmath is available on:
527 # - When available, libquadmath requires wchar support.
528 config BR2_TOOLCHAIN_HAS_LIBQUADMATH
530 default y if BR2_i386 || BR2_x86_64