1 # Generic toolchain options
3 # we want gdb config in the middle of both source and external
4 # toolchains, but mconf won't let us source the same file twice,
5 # so put it here instead
6 source "package/gdb/Config.in.host"
8 comment "Toolchain Generic Options"
10 # https://sourceware.org/bugzilla/show_bug.cgi?id=19615
11 # Affect toolchains built with binutils 2.26 (fixed in binutils 2.26.1).
12 config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19615
15 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
16 # exception_ptr, nested_exception, and future from libstdc++ are not
17 # available for architectures not supporting always lock-free atomic
19 config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
21 default y if BR2_nios2
22 default y if BR2_ARM_CPU_ARMV4
23 default y if BR2_ARM_CPU_ARMV5
24 default y if BR2_sparc_v8
25 default y if BR2_m68k_cf5208
26 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
28 config BR2_TOOLCHAIN_HAS_NATIVE_RPC
34 config BR2_ENABLE_LOCALE
37 config BR2_INSTALL_LIBSTDCPP
40 config BR2_TOOLCHAIN_HAS_FORTRAN
43 config BR2_TOOLCHAIN_HAS_THREADS
46 config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
49 config BR2_TOOLCHAIN_HAS_THREADS_NPTL
52 config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
55 config BR2_TOOLCHAIN_HAS_SSP
58 config BR2_TOOLCHAIN_SUPPORTS_PIE
61 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
62 bool "Copy gconv libraries"
63 depends on BR2_TOOLCHAIN_USES_GLIBC
65 The gconv libraries are used to convert between different
66 character sets (charsets).
68 Say 'y' if you need to store and/or display different charsets.
70 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
71 string "Gconv libraries to copy"
72 depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
74 Set to the list of gconv libraries to copy.
75 Leave empty to copy all gconv libraries.
77 Specify only the basename of the libraries, leave
78 out the .so extension. Eg.:
79 IBM850 ISO8859-15 UNICODE
81 Note: the full set of gconv libs are ~8MiB (on ARM).
83 # This boolean is true if the toolchain provides a built-in full
84 # featured gettext implementation (glibc), and false if only a stub
85 # gettext implementation is provided (uclibc, musl)
86 config BR2_TOOLCHAIN_HAS_FULL_GETTEXT
90 bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
91 default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY
93 If your target has a MMU, you should say Y here. If you
94 are unsure, just say Y.
96 config BR2_TARGET_OPTIMIZATION
97 string "Target Optimizations"
100 Optimizations to use when building for the target host.
101 NOTE: gcc optimization level is defined in build options.
103 config BR2_TARGET_LDFLAGS
104 string "Target linker options"
106 Extra options to pass to the linker when building for the target.
108 Note that options with a '$' sign (eg. -Wl,-rpath='$ORIGIN/../lib')
111 config BR2_ECLIPSE_REGISTER
112 bool "Register toolchain within Eclipse Buildroot plug-in"
114 This options tells Buildroot to generate the necessary
115 configuration files to make your toolchain appear within
116 Eclipse, through the Eclipse Buildroot plugin.
118 # Options for packages to depend on, if they require at least a
119 # specific version of the kernel headers.
120 # Toolchains should choose the adequate option (ie. the highest
121 # version, not all of them).
122 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
125 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
127 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
129 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
131 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
133 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
135 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
137 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
139 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
141 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
143 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
145 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
147 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
149 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
151 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
153 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
155 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
157 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
159 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
161 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
163 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
165 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
167 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
169 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
171 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
173 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
175 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
177 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
179 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
181 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
183 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
185 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
187 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
189 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
191 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
193 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
195 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
197 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
199 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
201 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
203 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
205 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
207 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
209 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
211 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
213 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
215 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
217 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
219 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
221 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
223 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
225 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
227 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
229 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
231 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
233 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
235 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
237 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
239 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
241 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
243 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
245 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
247 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
249 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
251 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
253 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
255 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
257 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
259 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
261 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
263 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
265 # This order guarantees that the highest version is set, as kconfig
266 # stops affecting a value on the first matching default.
267 config BR2_TOOLCHAIN_HEADERS_AT_LEAST
269 default "4.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
270 default "4.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
271 default "4.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
272 default "4.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
273 default "4.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
274 default "4.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
275 default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
276 default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
277 default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
278 default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
279 default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
280 default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
281 default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
282 default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
283 default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
284 default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
285 default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
286 default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
287 default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
288 default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
289 default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
290 default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
291 default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
292 default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
293 default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
294 default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
295 default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
296 default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
297 default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
298 default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
299 default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
300 default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
301 default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
302 default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
303 default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
304 default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
307 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
310 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
312 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
314 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
316 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
318 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
320 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
322 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
324 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
326 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
328 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
330 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
332 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
334 config BR2_TOOLCHAIN_GCC_AT_LEAST_5
336 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
338 config BR2_TOOLCHAIN_GCC_AT_LEAST_6
340 select BR2_TOOLCHAIN_GCC_AT_LEAST_5
342 config BR2_TOOLCHAIN_GCC_AT_LEAST_7
344 select BR2_TOOLCHAIN_GCC_AT_LEAST_6
346 # This order guarantees that the highest version is set, as kconfig
347 # stops affecting a value on the first matching default.
348 config BR2_TOOLCHAIN_GCC_AT_LEAST
350 default "7" if BR2_TOOLCHAIN_GCC_AT_LEAST_7
351 default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
352 default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
353 default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
354 default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
355 default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
356 default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
357 default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
358 default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
359 default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
361 config BR2_TOOLCHAIN_HAS_MNAN_OPTION
363 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
365 config BR2_TOOLCHAIN_HAS_SYNC_1
369 depends on !BR2_m68k_cf
370 depends on !BR2_microblaze
371 depends on !BR2_sparc
372 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
374 config BR2_TOOLCHAIN_HAS_SYNC_2
376 default y if BR2_TOOLCHAIN_HAS_SYNC_1
378 config BR2_TOOLCHAIN_HAS_SYNC_4
381 depends on !BR2_m68k_cf
382 depends on !BR2_sparc
383 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
385 # The availability of __sync for 8-byte types on ARM is somewhat
388 # - It appeared in gcc starting with gcc 4.7.
390 # - On ARMv7, there is no problem, it can be directly implemented in
393 # - On < ARMv7, it requires help from the kernel. Unfortunately, the
394 # libgcc code implementing 8-byte __sync with the help from the
395 # kernel calls __write() when a failure occurs, which is a function
396 # internal to glibc, not available in uClibc and musl. This means
397 # that the 8-byte __sync operations are not available on < ARMv7
398 # with uClibc and musl. This problem was fixed as part of gcc
399 # PR68059, which was backported to the gcc 5 branch, but isn't yet
400 # part of any gcc 5.x release.
402 config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
405 depends on BR2_arm || BR2_armeb
406 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
407 depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
409 # 8-byte intrinsics available on most x86 CPUs, except a few old ones
410 config BR2_TOOLCHAIN_X86_HAS_SYNC_8
414 depends on !BR2_x86_i486
415 depends on !BR2_x86_c3
416 depends on !BR2_x86_winchip_c6
417 depends on !BR2_x86_winchip2
419 # 8-byte intrinsics available:
420 # - On all 64 bits architecture
421 # - On a certain combinations of ARM platforms
422 # - On certain x86 32 bits CPUs
423 config BR2_TOOLCHAIN_HAS_SYNC_8
425 default y if BR2_ARCH_IS_64
426 default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
427 default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
429 # libatomic is available since gcc 4.8, when thread support is
430 # enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
431 # part of the tuple, and is therefore not build on uclinux targets,
432 # which is why BR2_BINFMT_FLAT configurations are excluded.
433 config BR2_TOOLCHAIN_HAS_LIBATOMIC
435 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
436 BR2_TOOLCHAIN_HAS_THREADS && \
439 # __atomic intrinsics are available:
440 # - with gcc 4.8, either through built-ins or libatomic, on all
441 # architectures. Since we don't want to separate the cases where
442 # libatomic is needed vs. not needed, we simplify thing and only
443 # support situations where libatomic is available, even if on some
444 # architectures libatomic is not strictly needed as all __atomic
445 # intrinsics might be built-in. The only case where libatomic is
446 # missing entirely is when the toolchain does not have support for
447 # threads. However, a package that does not need threads but still
448 # uses atomics is quite a corner case, which does not warrant the
450 # - with gcc 4.7, libatomic did not exist, so only built-ins are
451 # available. This means that __atomic can only be used in a subset
452 # of the architectures
453 config BR2_TOOLCHAIN_HAS_ATOMIC
455 default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
456 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
457 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
458 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
459 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
461 # - libquadmath is not needed/available on all architectures (but gcc
462 # correctly handles this already).
463 # - At least, libquadmath is available on:
466 # - When available, libquadmath requires wchar support.
467 config BR2_TOOLCHAIN_HAS_LIBQUADMATH
469 default y if BR2_i386 || BR2_x86_64