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://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
11 # exception_ptr, nested_exception, and future from libstdc++ are not
12 # available for architectures not supporting always lock-free atomic
14 config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
16 default y if BR2_nios2
17 default y if BR2_ARM_CPU_ARMV4
18 default y if BR2_ARM_CPU_ARMV5
19 default y if BR2_sparc_v8
21 # https://sourceware.org/bugzilla/show_bug.cgi?id=19405
22 config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405
25 config BR2_TOOLCHAIN_HAS_NATIVE_RPC
31 config BR2_ENABLE_LOCALE
34 config BR2_INSTALL_LIBSTDCPP
37 config BR2_TOOLCHAIN_HAS_FORTRAN
40 config BR2_TOOLCHAIN_HAS_THREADS
43 config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
46 config BR2_TOOLCHAIN_HAS_THREADS_NPTL
49 config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
52 config BR2_TOOLCHAIN_HAS_SSP
55 config BR2_TOOLCHAIN_SUPPORTS_PIE
58 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
59 bool "Copy gconv libraries"
60 depends on BR2_TOOLCHAIN_USES_GLIBC
62 The gconv libraries are used to convert between different
63 character sets (charsets).
65 Say 'y' if you need to store and/or display different charsets.
67 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
68 string "Gconv libraries to copy"
69 depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
71 Set to the list of gconv libraries to copy.
72 Leave empty to copy all gconv libraries.
74 Specify only the basename of the libraries, leave
75 out the .so extension. Eg.:
76 IBM850 ISO8859-15 UNICODE
78 Note: the full set of gconv libs are ~8MiB (on ARM).
80 # glibc and eglibc directly include gettext, so a separatly compiled
81 # gettext isn't needed and shouldn't be built to avoid conflicts. Some
82 # packages always need gettext, other packages only need gettext when
83 # locale support is enabled. See the documentation for how packages
84 # should rely on the following two options.
86 config BR2_NEEDS_GETTEXT
88 default y if BR2_TOOLCHAIN_USES_UCLIBC
90 config BR2_NEEDS_GETTEXT_IF_LOCALE
92 default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE)
95 bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
96 default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY
98 If your target has a MMU, you should say Y here. If you
99 are unsure, just say Y.
101 config BR2_TARGET_OPTIMIZATION
102 string "Target Optimizations"
105 Optimizations to use when building for the target host.
106 NOTE: gcc optimization level is defined in build options.
108 config BR2_TARGET_LDFLAGS
109 string "Target linker options"
111 Extra options to pass to the linker when building for the target.
113 Note that options with a '$' sign (eg. -Wl,-rpath='$ORIGIN/../lib')
116 config BR2_ECLIPSE_REGISTER
117 bool "Register toolchain within Eclipse Buildroot plug-in"
119 This options tells Buildroot to generate the necessary
120 configuration files to make your toolchain appear within
121 Eclipse, through the Eclipse Buildroot plugin.
123 # Options for packages to depend on, if they require at least a
124 # specific version of the kernel headers.
125 # Toolchains should choose the adequate option (ie. the highest
126 # version, not all of them).
127 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
130 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
132 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
134 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
136 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
138 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
140 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
142 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
144 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
146 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
148 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
150 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
152 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
154 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
156 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
158 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
160 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
162 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
164 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
166 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
168 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
170 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
172 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
174 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
176 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
178 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
180 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
182 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
184 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
186 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
188 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
190 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
192 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
194 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
196 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
198 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
200 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
202 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
204 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
206 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
208 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
210 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
212 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
214 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
216 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
218 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
220 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
222 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
224 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
226 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
228 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
230 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
232 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
234 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
236 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
238 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
240 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
242 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
244 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
246 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
248 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
250 # This order guarantees that the highest version is set, as kconfig
251 # stops affecting a value on the first matching default.
252 config BR2_TOOLCHAIN_HEADERS_AT_LEAST
254 default "4.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
255 default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
256 default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
257 default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
258 default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
259 default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
260 default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
261 default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
262 default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
263 default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
264 default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
265 default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
266 default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
267 default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
268 default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
269 default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
270 default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
271 default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
272 default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
273 default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
274 default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
275 default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
276 default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
277 default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
278 default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
279 default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
280 default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
281 default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
282 default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
283 default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
284 default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
287 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
290 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
292 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
294 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
296 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
298 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
300 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
302 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
304 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
306 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
308 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
310 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
312 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
314 config BR2_TOOLCHAIN_GCC_AT_LEAST_5
316 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
318 config BR2_TOOLCHAIN_GCC_AT_LEAST_6
320 select BR2_TOOLCHAIN_GCC_AT_LEAST_5
322 # This order guarantees that the highest version is set, as kconfig
323 # stops affecting a value on the first matching default.
324 config BR2_TOOLCHAIN_GCC_AT_LEAST
326 default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
327 default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
328 default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
329 default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
330 default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
331 default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
332 default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
333 default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
334 default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
336 config BR2_TOOLCHAIN_HAS_SYNC_1
340 depends on !BR2_m68k_cf
341 depends on !BR2_microblaze
342 depends on !BR2_sparc
343 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
345 config BR2_TOOLCHAIN_HAS_SYNC_2
347 default y if BR2_TOOLCHAIN_HAS_SYNC_1
349 config BR2_TOOLCHAIN_HAS_SYNC_4
352 depends on !BR2_m68k_cf
353 depends on !BR2_sparc
354 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
356 # The availability of __sync for 8-byte types on ARM is somewhat
359 # - It appeared in gcc starting with gcc 4.7.
361 # - On ARMv7, there is no problem, it can be directly implemented in
364 # - On < ARMv7, it requires help from the kernel. Unfortunately, the
365 # libgcc code implementing 8-byte __sync with the help from the
366 # kernel calls __write() when a failure occurs, which is a function
367 # internal to glibc, not available in uClibc and musl. This means
368 # that the 8-byte __sync operations are not available on < ARMv7
369 # with uClibc and musl. This problem was fixed as part of gcc
370 # PR68059, which was backported to the gcc 5 branch, but isn't yet
371 # part of any gcc 5.x release.
373 config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
376 depends on BR2_arm || BR2_armeb
377 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
378 depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
380 # 8-byte intrinsics available on most x86 CPUs, except a few old ones
381 config BR2_TOOLCHAIN_X86_HAS_SYNC_8
385 depends on !BR2_x86_i486
386 depends on !BR2_x86_c3
387 depends on !BR2_x86_winchip_c6
388 depends on !BR2_x86_winchip2
390 # 8-byte intrinsics available:
391 # - On all 64 bits architecture
392 # - On a certain combinations of ARM platforms
393 # - On certain x86 32 bits CPUs
394 config BR2_TOOLCHAIN_HAS_SYNC_8
396 default y if BR2_ARCH_IS_64
397 default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
398 default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
400 # libatomic is available since gcc 4.8, when thread support is
401 # enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
402 # part of the tuple, and is therefore not build on uclinux targets,
403 # which is why BR2_BINFMT_FLAT configurations are excluded.
404 config BR2_TOOLCHAIN_HAS_LIBATOMIC
406 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
407 BR2_TOOLCHAIN_HAS_THREADS && \
410 # __atomic intrinsics are available:
411 # - with gcc 4.8, either through built-ins or libatomic, on all
412 # architectures. Since we don't want to separate the cases where
413 # libatomic is needed vs. not needed, we simplify thing and only
414 # support situations where libatomic is available, even if on some
415 # architectures libatomic is not strictly needed as all __atomic
416 # intrinsics might be built-in. The only case where libatomic is
417 # missing entirely is when the toolchain does not have support for
418 # threads. However, a package that does not need threads but still
419 # uses atomics is quite a corner case, which does not warrant the
421 # - with gcc 4.7, libatomic did not exist, so only built-ins are
422 # available. This means that __atomic can only be used in a subset
423 # of the architectures
424 config BR2_TOOLCHAIN_HAS_ATOMIC
426 default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
427 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
428 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
429 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
430 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
432 # - libquadmath is not needed/available on all architectures (but gcc
433 # correctly handles this already).
434 # - At least, libquadmath is available on:
437 # - When available, libquadmath requires wchar support.
438 config BR2_TOOLCHAIN_HAS_LIBQUADMATH
440 default y if BR2_i386 || BR2_x86_64