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 # https://sourceware.org/bugzilla/show_bug.cgi?id=19405
9 config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405
12 config BR2_TOOLCHAIN_HAS_NATIVE_RPC
18 config BR2_ENABLE_LOCALE
21 config BR2_INSTALL_LIBSTDCPP
24 config BR2_TOOLCHAIN_HAS_FORTRAN
27 config BR2_TOOLCHAIN_HAS_THREADS
30 config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
33 config BR2_TOOLCHAIN_HAS_THREADS_NPTL
36 config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
39 config BR2_TOOLCHAIN_HAS_SSP
42 config BR2_TOOLCHAIN_SUPPORTS_PIE
45 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
46 bool "Copy gconv libraries"
47 depends on BR2_TOOLCHAIN_USES_GLIBC
49 The gconv libraries are used to convert between different
50 character sets (charsets).
52 Say 'y' if you need to store and/or display different charsets.
54 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
55 string "Gconv libraries to copy"
56 depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
58 Set to the list of gconv libraries to copy.
59 Leave empty to copy all gconv libraries.
61 Specify only the basename of the libraries, leave
62 out the .so extension. Eg.:
63 IBM850 ISO8859-15 UNICODE
65 Note: the full set of gconv libs are ~8MiB (on ARM).
67 # glibc and eglibc directly include gettext, so a separatly compiled
68 # gettext isn't needed and shouldn't be built to avoid conflicts. Some
69 # packages always need gettext, other packages only need gettext when
70 # locale support is enabled. See the documentation for how packages
71 # should rely on the following two options.
73 config BR2_NEEDS_GETTEXT
75 default y if BR2_TOOLCHAIN_USES_UCLIBC
77 config BR2_NEEDS_GETTEXT_IF_LOCALE
79 default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE)
82 bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
83 default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY
85 If your target has a MMU, you should say Y here. If you
86 are unsure, just say Y.
88 config BR2_TARGET_OPTIMIZATION
89 string "Target Optimizations"
92 Optimizations to use when building for the target host.
93 NOTE: gcc optimization level is defined in build options.
95 config BR2_TARGET_LDFLAGS
96 string "Target linker options"
98 Extra options to pass to the linker when building for the target.
100 Note that options with a '$' sign (eg. -Wl,-rpath='$ORIGIN/../lib')
103 config BR2_ECLIPSE_REGISTER
104 bool "Register toolchain within Eclipse Buildroot plug-in"
106 This options tells Buildroot to generate the necessary
107 configuration files to make your toolchain appear within
108 Eclipse, through the Eclipse Buildroot plugin.
110 # Options for packages to depend on, if they require at least a
111 # specific version of the kernel headers.
112 # Toolchains should choose the adequate option (ie. the highest
113 # version, not all of them).
114 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
117 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
119 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
121 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
123 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
125 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
127 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
129 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
131 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
133 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
135 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
137 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
139 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
141 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
143 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
145 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
147 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
149 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
151 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
153 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
155 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
157 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
159 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
161 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
163 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
165 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
167 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
169 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
171 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
173 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
175 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
177 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
179 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
181 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
183 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
185 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
187 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
189 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
191 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
193 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
195 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
197 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
199 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
201 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
203 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
205 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
207 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
209 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
211 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
213 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
215 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
217 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
219 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
221 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
223 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
225 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
227 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
229 # This order guarantees that the highest version is set, as kconfig
230 # stops affecting a value on the first matching default.
231 config BR2_TOOLCHAIN_HEADERS_AT_LEAST
233 default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
234 default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
235 default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
236 default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
237 default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
238 default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
239 default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
240 default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
241 default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
242 default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
243 default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
244 default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
245 default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
246 default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
247 default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
248 default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
249 default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
250 default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
251 default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
252 default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
253 default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
254 default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
255 default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
256 default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
257 default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
258 default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
259 default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
260 default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
261 default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
264 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
267 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
269 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
271 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
273 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
275 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
277 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
279 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
281 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
283 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
285 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
287 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
289 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
291 config BR2_TOOLCHAIN_GCC_AT_LEAST_5
293 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
295 config BR2_TOOLCHAIN_GCC_AT_LEAST_6
297 select BR2_TOOLCHAIN_GCC_AT_LEAST_5
299 # This order guarantees that the highest version is set, as kconfig
300 # stops affecting a value on the first matching default.
301 config BR2_TOOLCHAIN_GCC_AT_LEAST
303 default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
304 default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
305 default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
306 default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
307 default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
308 default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
309 default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
310 default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
311 default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
313 config BR2_TOOLCHAIN_HAS_SYNC_1
317 depends on !BR2_m68k_cf
318 depends on !BR2_microblaze
319 depends on !BR2_sparc
320 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
322 config BR2_TOOLCHAIN_HAS_SYNC_2
324 default y if BR2_TOOLCHAIN_HAS_SYNC_1
326 config BR2_TOOLCHAIN_HAS_SYNC_4
329 depends on !BR2_m68k_cf
330 depends on !BR2_sparc
331 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
333 # The availability of __sync for 8-byte types on ARM is somewhat
336 # - It appeared in gcc starting with gcc 4.7.
338 # - On ARMv7, there is no problem, it can be directly implemented in
341 # - On < ARMv7, it requires help from the kernel. Unfortunately, the
342 # libgcc code implementing 8-byte __sync with the help from the
343 # kernel calls __write() when a failure occurs, which is a function
344 # internal to glibc, not available in uClibc and musl. This means
345 # that the 8-byte __sync operations are not available on < ARMv7
346 # with uClibc and musl. This problem was fixed as part of gcc
347 # PR68059, which was backported to the gcc 5 branch, but isn't yet
348 # part of any gcc 5.x release.
350 config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
353 depends on BR2_arm || BR2_armeb
354 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
355 depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
357 # 8-byte intrinsics available on most x86 CPUs, except a few old ones
358 config BR2_TOOLCHAIN_X86_HAS_SYNC_8
362 depends on !BR2_x86_i486
363 depends on !BR2_x86_c3
364 depends on !BR2_x86_winchip_c6
365 depends on !BR2_x86_winchip2
367 # 8-byte intrinsics available:
368 # - On all 64 bits architecture
369 # - On a certain combinations of ARM platforms
370 # - On certain x86 32 bits CPUs
371 config BR2_TOOLCHAIN_HAS_SYNC_8
373 default y if BR2_ARCH_IS_64
374 default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
375 default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
377 # libatomic is available since gcc 4.8, when thread support is
378 # enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
379 # part of the tuple, and is therefore not build on uclinux targets,
380 # which is why BR2_BINFMT_FLAT configurations are excluded.
381 config BR2_TOOLCHAIN_HAS_LIBATOMIC
383 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
384 BR2_TOOLCHAIN_HAS_THREADS && \
387 # __atomic intrinsics are available:
388 # - with gcc 4.8, either through built-ins or libatomic, on all
389 # architectures. Since we don't want to separate the cases where
390 # libatomic is needed vs. not needed, we simplify thing and only
391 # support situations where libatomic is available, even if on some
392 # architectures libatomic is not strictly needed as all __atomic
393 # intrinsics might be built-in. The only case where libatomic is
394 # missing entirely is when the toolchain does not have support for
395 # threads. However, a package that does not need threads but still
396 # uses atomics is quite a corner case, which does not warrant the
398 # - with gcc 4.7, libatomic did not exist, so only built-ins are
399 # available. This means that __atomic can only be used in a subset
400 # of the architectures
401 config BR2_TOOLCHAIN_HAS_ATOMIC
403 default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
404 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
405 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
406 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
407 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
409 # - libquadmath is not needed/available on all architectures (but gcc
410 # correctly handles this already).
411 # - At least, libquadmath is available on:
414 # - When available, libquadmath requires wchar support.
415 config BR2_TOOLCHAIN_HAS_LIBQUADMATH
417 default y if BR2_i386 || BR2_x86_64