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 # This order guarantees that the highest version is set, as kconfig
247 # stops affecting a value on the first matching default.
248 config BR2_TOOLCHAIN_HEADERS_AT_LEAST
250 default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
251 default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
252 default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
253 default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
254 default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
255 default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
256 default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
257 default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
258 default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
259 default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
260 default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
261 default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
262 default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
263 default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
264 default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
265 default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
266 default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
267 default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
268 default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
269 default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
270 default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
271 default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
272 default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
273 default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
274 default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
275 default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
276 default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
277 default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
278 default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
279 default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
282 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
285 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
287 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
289 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
291 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
293 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
295 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
297 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
299 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
301 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
303 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
305 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
307 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
309 config BR2_TOOLCHAIN_GCC_AT_LEAST_5
311 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
313 config BR2_TOOLCHAIN_GCC_AT_LEAST_6
315 select BR2_TOOLCHAIN_GCC_AT_LEAST_5
317 # This order guarantees that the highest version is set, as kconfig
318 # stops affecting a value on the first matching default.
319 config BR2_TOOLCHAIN_GCC_AT_LEAST
321 default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
322 default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
323 default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
324 default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
325 default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
326 default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
327 default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
328 default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
329 default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
331 config BR2_TOOLCHAIN_HAS_SYNC_1
335 depends on !BR2_m68k_cf
336 depends on !BR2_microblaze
337 depends on !BR2_sparc
338 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
340 config BR2_TOOLCHAIN_HAS_SYNC_2
342 default y if BR2_TOOLCHAIN_HAS_SYNC_1
344 config BR2_TOOLCHAIN_HAS_SYNC_4
347 depends on !BR2_m68k_cf
348 depends on !BR2_sparc
349 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
351 # The availability of __sync for 8-byte types on ARM is somewhat
354 # - It appeared in gcc starting with gcc 4.7.
356 # - On ARMv7, there is no problem, it can be directly implemented in
359 # - On < ARMv7, it requires help from the kernel. Unfortunately, the
360 # libgcc code implementing 8-byte __sync with the help from the
361 # kernel calls __write() when a failure occurs, which is a function
362 # internal to glibc, not available in uClibc and musl. This means
363 # that the 8-byte __sync operations are not available on < ARMv7
364 # with uClibc and musl. This problem was fixed as part of gcc
365 # PR68059, which was backported to the gcc 5 branch, but isn't yet
366 # part of any gcc 5.x release.
368 config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
371 depends on BR2_arm || BR2_armeb
372 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
373 depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
375 # 8-byte intrinsics available on most x86 CPUs, except a few old ones
376 config BR2_TOOLCHAIN_X86_HAS_SYNC_8
380 depends on !BR2_x86_i486
381 depends on !BR2_x86_c3
382 depends on !BR2_x86_winchip_c6
383 depends on !BR2_x86_winchip2
385 # 8-byte intrinsics available:
386 # - On all 64 bits architecture
387 # - On a certain combinations of ARM platforms
388 # - On certain x86 32 bits CPUs
389 config BR2_TOOLCHAIN_HAS_SYNC_8
391 default y if BR2_ARCH_IS_64
392 default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
393 default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
395 # libatomic is available since gcc 4.8, when thread support is
396 # enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
397 # part of the tuple, and is therefore not build on uclinux targets,
398 # which is why BR2_BINFMT_FLAT configurations are excluded.
399 config BR2_TOOLCHAIN_HAS_LIBATOMIC
401 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
402 BR2_TOOLCHAIN_HAS_THREADS && \
405 # __atomic intrinsics are available:
406 # - with gcc 4.8, either through built-ins or libatomic, on all
407 # architectures. Since we don't want to separate the cases where
408 # libatomic is needed vs. not needed, we simplify thing and only
409 # support situations where libatomic is available, even if on some
410 # architectures libatomic is not strictly needed as all __atomic
411 # intrinsics might be built-in. The only case where libatomic is
412 # missing entirely is when the toolchain does not have support for
413 # threads. However, a package that does not need threads but still
414 # uses atomics is quite a corner case, which does not warrant the
416 # - with gcc 4.7, libatomic did not exist, so only built-ins are
417 # available. This means that __atomic can only be used in a subset
418 # of the architectures
419 config BR2_TOOLCHAIN_HAS_ATOMIC
421 default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
422 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
423 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
424 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
425 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
427 # - libquadmath is not needed/available on all architectures (but gcc
428 # correctly handles this already).
429 # - At least, libquadmath is available on:
432 # - When available, libquadmath requires wchar support.
433 config BR2_TOOLCHAIN_HAS_LIBQUADMATH
435 default y if BR2_i386 || BR2_x86_64