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=19405
11 config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405
14 config BR2_TOOLCHAIN_HAS_NATIVE_RPC
20 config BR2_ENABLE_LOCALE
23 config BR2_INSTALL_LIBSTDCPP
26 config BR2_TOOLCHAIN_HAS_FORTRAN
29 config BR2_TOOLCHAIN_HAS_THREADS
32 config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
35 config BR2_TOOLCHAIN_HAS_THREADS_NPTL
38 config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
41 config BR2_TOOLCHAIN_HAS_SSP
44 config BR2_TOOLCHAIN_SUPPORTS_PIE
47 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
48 bool "Copy gconv libraries"
49 depends on BR2_TOOLCHAIN_USES_GLIBC
51 The gconv libraries are used to convert between different
52 character sets (charsets).
54 Say 'y' if you need to store and/or display different charsets.
56 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
57 string "Gconv libraries to copy"
58 depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
60 Set to the list of gconv libraries to copy.
61 Leave empty to copy all gconv libraries.
63 Specify only the basename of the libraries, leave
64 out the .so extension. Eg.:
65 IBM850 ISO8859-15 UNICODE
67 Note: the full set of gconv libs are ~8MiB (on ARM).
69 # glibc and eglibc directly include gettext, so a separatly compiled
70 # gettext isn't needed and shouldn't be built to avoid conflicts. Some
71 # packages always need gettext, other packages only need gettext when
72 # locale support is enabled. See the documentation for how packages
73 # should rely on the following two options.
75 config BR2_NEEDS_GETTEXT
77 default y if BR2_TOOLCHAIN_USES_UCLIBC
79 config BR2_NEEDS_GETTEXT_IF_LOCALE
81 default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE)
84 bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
85 default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY
87 If your target has a MMU, you should say Y here. If you
88 are unsure, just say Y.
90 config BR2_TARGET_OPTIMIZATION
91 string "Target Optimizations"
94 Optimizations to use when building for the target host.
95 NOTE: gcc optimization level is defined in build options.
97 config BR2_TARGET_LDFLAGS
98 string "Target linker options"
100 Extra options to pass to the linker when building for the target.
102 Note that options with a '$' sign (eg. -Wl,-rpath='$ORIGIN/../lib')
105 config BR2_ECLIPSE_REGISTER
106 bool "Register toolchain within Eclipse Buildroot plug-in"
108 This options tells Buildroot to generate the necessary
109 configuration files to make your toolchain appear within
110 Eclipse, through the Eclipse Buildroot plugin.
112 # Options for packages to depend on, if they require at least a
113 # specific version of the kernel headers.
114 # Toolchains should choose the adequate option (ie. the highest
115 # version, not all of them).
116 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
119 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
121 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
123 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
125 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
127 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
129 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
131 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
133 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
135 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
137 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
139 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
141 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
143 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
145 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
147 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
149 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
151 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
153 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
155 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
157 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
159 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
161 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
163 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
165 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
167 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
169 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
171 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
173 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
175 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
177 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
179 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
181 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
183 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
185 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
187 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
189 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
191 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
193 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
195 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
197 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
199 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
201 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
203 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
205 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
207 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
209 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
211 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
213 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
215 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
217 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
219 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
221 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
223 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
225 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
227 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
229 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
231 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
233 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
235 # This order guarantees that the highest version is set, as kconfig
236 # stops affecting a value on the first matching default.
237 config BR2_TOOLCHAIN_HEADERS_AT_LEAST
239 default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
240 default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
241 default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
242 default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
243 default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
244 default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
245 default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
246 default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
247 default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
248 default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
249 default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
250 default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
251 default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
252 default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
253 default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
254 default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
255 default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
256 default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
257 default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
258 default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
259 default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
260 default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
261 default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
262 default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
263 default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
264 default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
265 default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
266 default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
267 default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
268 default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
271 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
274 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
276 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
278 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
280 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
282 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
284 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
286 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
288 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
290 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
292 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
294 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
296 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
298 config BR2_TOOLCHAIN_GCC_AT_LEAST_5
300 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
302 config BR2_TOOLCHAIN_GCC_AT_LEAST_6
304 select BR2_TOOLCHAIN_GCC_AT_LEAST_5
306 # This order guarantees that the highest version is set, as kconfig
307 # stops affecting a value on the first matching default.
308 config BR2_TOOLCHAIN_GCC_AT_LEAST
310 default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
311 default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
312 default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
313 default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
314 default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
315 default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
316 default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
317 default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
318 default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
320 config BR2_TOOLCHAIN_HAS_SYNC_1
324 depends on !BR2_m68k_cf
325 depends on !BR2_microblaze
326 depends on !BR2_sparc
327 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
329 config BR2_TOOLCHAIN_HAS_SYNC_2
331 default y if BR2_TOOLCHAIN_HAS_SYNC_1
333 config BR2_TOOLCHAIN_HAS_SYNC_4
336 depends on !BR2_m68k_cf
337 depends on !BR2_sparc
338 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
340 # The availability of __sync for 8-byte types on ARM is somewhat
343 # - It appeared in gcc starting with gcc 4.7.
345 # - On ARMv7, there is no problem, it can be directly implemented in
348 # - On < ARMv7, it requires help from the kernel. Unfortunately, the
349 # libgcc code implementing 8-byte __sync with the help from the
350 # kernel calls __write() when a failure occurs, which is a function
351 # internal to glibc, not available in uClibc and musl. This means
352 # that the 8-byte __sync operations are not available on < ARMv7
353 # with uClibc and musl. This problem was fixed as part of gcc
354 # PR68059, which was backported to the gcc 5 branch, but isn't yet
355 # part of any gcc 5.x release.
357 config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
360 depends on BR2_arm || BR2_armeb
361 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
362 depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
364 # 8-byte intrinsics available on most x86 CPUs, except a few old ones
365 config BR2_TOOLCHAIN_X86_HAS_SYNC_8
369 depends on !BR2_x86_i486
370 depends on !BR2_x86_c3
371 depends on !BR2_x86_winchip_c6
372 depends on !BR2_x86_winchip2
374 # 8-byte intrinsics available:
375 # - On all 64 bits architecture
376 # - On a certain combinations of ARM platforms
377 # - On certain x86 32 bits CPUs
378 config BR2_TOOLCHAIN_HAS_SYNC_8
380 default y if BR2_ARCH_IS_64
381 default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
382 default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
384 # libatomic is available since gcc 4.8, when thread support is
385 # enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
386 # part of the tuple, and is therefore not build on uclinux targets,
387 # which is why BR2_BINFMT_FLAT configurations are excluded.
388 config BR2_TOOLCHAIN_HAS_LIBATOMIC
390 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
391 BR2_TOOLCHAIN_HAS_THREADS && \
394 # __atomic intrinsics are available:
395 # - with gcc 4.8, either through built-ins or libatomic, on all
396 # architectures. Since we don't want to separate the cases where
397 # libatomic is needed vs. not needed, we simplify thing and only
398 # support situations where libatomic is available, even if on some
399 # architectures libatomic is not strictly needed as all __atomic
400 # intrinsics might be built-in. The only case where libatomic is
401 # missing entirely is when the toolchain does not have support for
402 # threads. However, a package that does not need threads but still
403 # uses atomics is quite a corner case, which does not warrant the
405 # - with gcc 4.7, libatomic did not exist, so only built-ins are
406 # available. This means that __atomic can only be used in a subset
407 # of the architectures
408 config BR2_TOOLCHAIN_HAS_ATOMIC
410 default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
411 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
412 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
413 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
414 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
416 # - libquadmath is not needed/available on all architectures (but gcc
417 # correctly handles this already).
418 # - At least, libquadmath is available on:
421 # - When available, libquadmath requires wchar support.
422 config BR2_TOOLCHAIN_HAS_LIBQUADMATH
424 default y if BR2_i386 || BR2_x86_64