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