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 select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
46 depends on BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT
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 charsets.
129 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
130 string "Gconv libraries to copy"
131 depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
133 Set to the list of gconv libraries to copy.
134 Leave empty to copy all gconv libraries.
136 Specify only the basename of the libraries, leave
137 out the .so extension. Eg.:
138 IBM850 ISO8859-15 UNICODE
140 Note: the full set of gconv libs are ~8MiB (on ARM).
142 # This boolean is true if the toolchain provides a built-in full
143 # featured gettext implementation (glibc), and false if only a stub
144 # gettext implementation is provided (uclibc, musl)
145 config BR2_TOOLCHAIN_HAS_FULL_GETTEXT
149 bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
150 default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY
152 If your target has a MMU, you should say Y here. If you
153 are unsure, just say Y.
155 config BR2_TARGET_OPTIMIZATION
156 string "Target Optimizations"
159 Optimizations to use when building for the target host.
160 NOTE: gcc optimization level is defined in build options.
162 config BR2_TARGET_LDFLAGS
163 string "Target linker options"
165 Extra options to pass to the linker when building for the target.
167 Note that options with a '$' sign (eg. -Wl,-rpath='$ORIGIN/../lib')
170 config BR2_ECLIPSE_REGISTER
171 bool "Register toolchain within Eclipse Buildroot plug-in"
173 This options tells Buildroot to generate the necessary
174 configuration files to make your toolchain appear within
175 Eclipse, through the Eclipse Buildroot plugin.
177 # Options for packages to depend on, if they require at least a
178 # specific version of the kernel headers.
179 # Toolchains should choose the adequate option (ie. the highest
180 # version, not all of them).
181 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
184 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
186 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
188 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
190 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
192 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
194 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
196 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
198 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
200 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
202 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
204 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
206 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
208 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
210 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
212 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
214 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
216 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
218 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
220 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
222 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
224 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
226 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
228 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
230 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
232 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
234 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
236 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
238 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
240 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
242 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
244 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
246 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
248 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
250 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
252 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
254 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
256 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
258 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
260 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
262 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
264 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
266 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
268 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
270 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
272 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
274 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
276 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
278 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
280 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
282 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
284 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
286 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
288 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
290 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
292 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
294 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
296 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
298 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
300 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
302 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
304 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
306 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
308 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
310 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
312 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
314 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
316 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
318 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
320 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
322 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
324 # This order guarantees that the highest version is set, as kconfig
325 # stops affecting a value on the first matching default.
326 config BR2_TOOLCHAIN_HEADERS_AT_LEAST
328 default "4.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
329 default "4.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
330 default "4.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
331 default "4.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
332 default "4.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
333 default "4.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
334 default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
335 default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
336 default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
337 default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
338 default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
339 default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
340 default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
341 default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
342 default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
343 default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
344 default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
345 default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
346 default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
347 default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
348 default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
349 default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
350 default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
351 default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
352 default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
353 default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
354 default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
355 default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
356 default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
357 default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
358 default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
359 default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
360 default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
361 default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
362 default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
363 default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
366 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
369 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
371 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
373 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
375 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
377 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
379 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
381 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
383 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
385 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
387 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
389 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
391 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
393 config BR2_TOOLCHAIN_GCC_AT_LEAST_5
395 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
397 config BR2_TOOLCHAIN_GCC_AT_LEAST_6
399 select BR2_TOOLCHAIN_GCC_AT_LEAST_5
401 config BR2_TOOLCHAIN_GCC_AT_LEAST_7
403 select BR2_TOOLCHAIN_GCC_AT_LEAST_6
405 # This order guarantees that the highest version is set, as kconfig
406 # stops affecting a value on the first matching default.
407 config BR2_TOOLCHAIN_GCC_AT_LEAST
409 default "7" if BR2_TOOLCHAIN_GCC_AT_LEAST_7
410 default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
411 default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
412 default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
413 default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
414 default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
415 default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
416 default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
417 default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
418 default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
420 config BR2_TOOLCHAIN_HAS_MNAN_OPTION
422 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
424 config BR2_TOOLCHAIN_HAS_SYNC_1
428 depends on !BR2_m68k_cf
429 depends on !BR2_microblaze
430 depends on !BR2_sparc
431 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
433 config BR2_TOOLCHAIN_HAS_SYNC_2
435 default y if BR2_TOOLCHAIN_HAS_SYNC_1
437 config BR2_TOOLCHAIN_HAS_SYNC_4
440 depends on !BR2_m68k_cf
441 depends on !BR2_sparc
442 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
444 # The availability of __sync for 8-byte types on ARM is somewhat
447 # - It appeared in gcc starting with gcc 4.7.
449 # - On ARMv7, there is no problem, it can be directly implemented in
452 # - On < ARMv7, it requires help from the kernel. Unfortunately, the
453 # libgcc code implementing 8-byte __sync with the help from the
454 # kernel calls __write() when a failure occurs, which is a function
455 # internal to glibc, not available in uClibc and musl. This means
456 # that the 8-byte __sync operations are not available on < ARMv7
457 # with uClibc and musl. This problem was fixed as part of gcc
458 # PR68059, which was backported to the gcc 5 branch, but isn't yet
459 # part of any gcc 5.x release.
461 config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
464 depends on BR2_arm || BR2_armeb
465 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
466 depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
468 # 8-byte intrinsics available on most x86 CPUs, except a few old ones
469 config BR2_TOOLCHAIN_X86_HAS_SYNC_8
473 depends on !BR2_x86_i486
474 depends on !BR2_x86_c3
475 depends on !BR2_x86_winchip_c6
476 depends on !BR2_x86_winchip2
478 # 8-byte intrinsics available:
479 # - On all 64 bits architecture
480 # - On a certain combinations of ARM platforms
481 # - On certain x86 32 bits CPUs
482 config BR2_TOOLCHAIN_HAS_SYNC_8
484 default y if BR2_ARCH_IS_64
485 default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
486 default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
488 # libatomic is available since gcc 4.8, when thread support is
489 # enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
490 # part of the tuple, and is therefore not build on uclinux targets,
491 # which is why BR2_BINFMT_FLAT configurations are excluded.
492 config BR2_TOOLCHAIN_HAS_LIBATOMIC
494 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
495 BR2_TOOLCHAIN_HAS_THREADS && \
498 # __atomic intrinsics are available:
499 # - with gcc 4.8, either through built-ins or libatomic, on all
500 # architectures. Since we don't want to separate the cases where
501 # libatomic is needed vs. not needed, we simplify thing and only
502 # support situations where libatomic is available, even if on some
503 # architectures libatomic is not strictly needed as all __atomic
504 # intrinsics might be built-in. The only case where libatomic is
505 # missing entirely is when the toolchain does not have support for
506 # threads. However, a package that does not need threads but still
507 # uses atomics is quite a corner case, which does not warrant the
509 # - with gcc 4.7, libatomic did not exist, so only built-ins are
510 # available. This means that __atomic can only be used in a subset
511 # of the architectures
512 config BR2_TOOLCHAIN_HAS_ATOMIC
514 default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
515 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
516 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
517 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
518 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
520 # - libquadmath is not needed/available on all architectures (but gcc
521 # correctly handles this already).
522 # - At least, libquadmath is available on:
525 # - When available, libquadmath requires wchar support.
526 config BR2_TOOLCHAIN_HAS_LIBQUADMATH
528 default y if BR2_i386 || BR2_x86_64