package/systemd: bump version
[buildroot-gz.git] / toolchain / toolchain-common.in
blob5611b5bbe8ca4dc19415165dc24d28353dbdac6f
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
10         bool
12 config BR2_TOOLCHAIN_HAS_NATIVE_RPC
13         bool
15 config BR2_USE_WCHAR
16         bool
18 config BR2_ENABLE_LOCALE
19         bool
21 config BR2_INSTALL_LIBSTDCPP
22         bool
24 config BR2_TOOLCHAIN_HAS_FORTRAN
25         bool
27 config BR2_TOOLCHAIN_HAS_THREADS
28         bool
30 config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
31         bool
33 config BR2_TOOLCHAIN_HAS_THREADS_NPTL
34         bool
36 config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
37         bool
39 config BR2_TOOLCHAIN_HAS_SSP
40         bool
42 config BR2_TOOLCHAIN_SUPPORTS_PIE
43         bool
45 config BR2_ENABLE_LOCALE_PURGE
46         bool "Purge unwanted locales"
47         help
48           Explicitly specify what locales to install on target. If N
49           then all locales supported by packages are installed.
51 config BR2_ENABLE_LOCALE_WHITELIST
52         string "Locales to keep"
53         default "C en_US de fr"
54         depends on BR2_ENABLE_LOCALE_PURGE
55         help
56           Whitespace seperated list of locales to allow on target.
57           Locales not listed here will be removed from the target.
58           See 'locale -a' on your host for a list of locales available
59           on your build host, or have a look in /usr/share/locale in
60           the target file system for available locales.
62           Notice that listing a locale here doesn't guarantee that it
63           will be available on the target - That purely depends on the
64           support for that locale in the selected packages.
66 config BR2_GENERATE_LOCALE
67         string "Generate locale data"
68         default ""
69         depends on \
70                 (BR2_TOOLCHAIN_BUILDROOT_UCLIBC && BR2_ENABLE_LOCALE) || \
71                 BR2_TOOLCHAIN_USES_GLIBC
72         help
73           Generate support for a list of locales. Locales can be
74           specified with or without encoding, when no encoding is
75           specified, UTF-8 is assumed. Examples of locales: en_US,
76           fr_FR.UTF-8.
78 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
79         bool "Copy gconv libraries"
80         depends on BR2_TOOLCHAIN_USES_GLIBC
81         help
82           The gconv libraries are used to convert between different
83           character sets (charsets).
85           Say 'y' if you need to store and/or display different charsets.
87 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
88         string "Gconv libraries to copy"
89         depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
90         help
91           Set to the list of gconv libraries to copy.
92           Leave empty to copy all gconv libraries.
94           Specify only the basename of the libraries, leave
95           out the .so extension. Eg.:
96             IBM850 ISO8859-15 UNICODE
98           Note: the full set of gconv libs are ~8MiB (on ARM).
100 # glibc and eglibc directly include gettext, so a separatly compiled
101 # gettext isn't needed and shouldn't be built to avoid conflicts. Some
102 # packages always need gettext, other packages only need gettext when
103 # locale support is enabled. See the documentation for how packages
104 # should rely on the following two options.
106 config BR2_NEEDS_GETTEXT
107         bool
108         default y if BR2_TOOLCHAIN_USES_UCLIBC
110 config BR2_NEEDS_GETTEXT_IF_LOCALE
111         bool
112         default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE)
114 config BR2_USE_MMU
115         bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
116         default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY
117         help
118           If your target has a MMU, you should say Y here.  If you
119           are unsure, just say Y.
121 config BR2_TARGET_OPTIMIZATION
122         string "Target Optimizations"
123         default ""
124         help
125           Optimizations to use when building for the target host.
126           NOTE: gcc optimization level is defined in build options.
128 config BR2_TARGET_LDFLAGS
129         string "Target linker options"
130         help
131           Extra options to pass to the linker when building for the target.
133           Note that options with a '$' sign (eg. -Wl,-rpath='$ORIGIN/../lib')
134           are not supported.
136 config BR2_ECLIPSE_REGISTER
137         bool "Register toolchain within Eclipse Buildroot plug-in"
138         help
139           This options tells Buildroot to generate the necessary
140           configuration files to make your toolchain appear within
141           Eclipse, through the Eclipse Buildroot plugin.
143 # Options for packages to depend on, if they require at least a
144 # specific version of the kernel headers.
145 # Toolchains should choose the adequate option (ie. the highest
146 # version, not all of them).
147 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
148         bool
150 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
151         bool
152         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
154 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
155         bool
156         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
158 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
159         bool
160         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
162 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
163         bool
164         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
166 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
167         bool
168         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
170 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
171         bool
172         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
174 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
175         bool
176         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
178 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
179         bool
180         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
182 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
183         bool
184         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
186 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
187         bool
188         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
190 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
191         bool
192         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
194 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
195         bool
196         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
198 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
199         bool
200         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
202 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
203         bool
204         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
206 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
207         bool
208         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
210 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
211         bool
212         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
214 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
215         bool
216         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
218 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
219         bool
220         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
222 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
223         bool
224         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
226 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
227         bool
228         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
230 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
231         bool
232         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
234 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
235         bool
236         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
238 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
239         bool
240         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
242 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
243         bool
244         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
246 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
247         bool
248         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
250 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
251         bool
252         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
254 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
255         bool
256         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
258 # This order guarantees that the highest version is set, as kconfig
259 # stops affecting a value on the first matching default.
260 config BR2_TOOLCHAIN_HEADERS_AT_LEAST
261         string
262         default "4.7"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
263         default "4.6"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
264         default "4.5"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
265         default "4.4"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
266         default "4.3"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
267         default "4.2"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
268         default "4.1"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
269         default "4.0"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
270         default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
271         default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
272         default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
273         default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
274         default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
275         default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
276         default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
277         default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
278         default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
279         default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
280         default "3.9"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
281         default "3.8"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
282         default "3.7"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
283         default "3.6"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
284         default "3.5"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
285         default "3.4"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
286         default "3.3"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
287         default "3.2"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
288         default "3.1"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
289         default "3.0"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
290         default "2.6"
292 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
293         bool
295 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
296         bool
297         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
299 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
300         bool
301         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
303 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
304         bool
305         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
307 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
308         bool
309         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
311 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
312         bool
313         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
315 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
316         bool
317         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
319 config BR2_TOOLCHAIN_GCC_AT_LEAST_5
320         bool
321         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
323 config BR2_TOOLCHAIN_GCC_AT_LEAST_6
324         bool
325         select BR2_TOOLCHAIN_GCC_AT_LEAST_5
327 # This order guarantees that the highest version is set, as kconfig
328 # stops affecting a value on the first matching default.
329 config BR2_TOOLCHAIN_GCC_AT_LEAST
330         string
331         default "6"     if BR2_TOOLCHAIN_GCC_AT_LEAST_6
332         default "5"     if BR2_TOOLCHAIN_GCC_AT_LEAST_5
333         default "4.9"   if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
334         default "4.8"   if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
335         default "4.7"   if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
336         default "4.6"   if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
337         default "4.5"   if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
338         default "4.4"   if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
339         default "4.3"   if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
341 config BR2_TOOLCHAIN_HAS_SYNC_1
342         bool
343         default y
344         depends on !BR2_bfin
345         depends on !BR2_m68k_cf
346         depends on !BR2_microblaze
347         depends on !BR2_sparc
348         depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
350 config BR2_TOOLCHAIN_HAS_SYNC_2
351         bool
352         default y if BR2_TOOLCHAIN_HAS_SYNC_1
354 config BR2_TOOLCHAIN_HAS_SYNC_4
355         bool
356         default y
357         depends on !BR2_m68k_cf
358         depends on !BR2_sparc
359         depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
361 # The availability of __sync for 8-byte types on ARM is somewhat
362 # complicated:
364 #  - It appeared in gcc starting with gcc 4.7.
366 #  - On ARMv7, there is no problem, it can be directly implemented in
367 #    userspace.
369 #  - On < ARMv7, it requires help from the kernel. Unfortunately, the
370 #    libgcc code implementing 8-byte __sync with the help from the
371 #    kernel calls __write() when a failure occurs, which is a function
372 #    internal to glibc, not available in uClibc and musl. This means
373 #    that the 8-byte __sync operations are not available on < ARMv7
374 #    with uClibc and musl. This problem was fixed as part of gcc
375 #    PR68059, which was backported to the gcc 5 branch, but isn't yet
376 #    part of any gcc 5.x release.
378 config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
379         bool
380         default y
381         depends on BR2_arm || BR2_armeb
382         depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
383         depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
385 # 8-byte intrinsics available on most x86 CPUs, except a few old ones
386 config BR2_TOOLCHAIN_X86_HAS_SYNC_8
387         bool
388         default y
389         depends on BR2_i386
390         depends on !BR2_x86_i486
391         depends on !BR2_x86_c3
392         depends on !BR2_x86_winchip_c6
393         depends on !BR2_x86_winchip2
395 # 8-byte intrinsics available:
396 #  - On all 64 bits architecture
397 #  - On a certain combinations of ARM platforms
398 #  - On certain x86 32 bits CPUs
399 config BR2_TOOLCHAIN_HAS_SYNC_8
400         bool
401         default y if BR2_ARCH_IS_64
402         default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
403         default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
405 # libatomic is available since gcc 4.8, when thread support is
406 # enabled.
407 config BR2_TOOLCHAIN_HAS_LIBATOMIC
408         bool
409         default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
410                 BR2_TOOLCHAIN_HAS_THREADS
412 # __atomic intrinsics are available:
413 # - with gcc 4.8, either through built-ins or libatomic, on all
414 #   architectures. Since we don't want to separate the cases where
415 #   libatomic is needed vs. not needed, we simplify thing and only
416 #   support situations where libatomic is available, even if on some
417 #   architectures libatomic is not strictly needed as all __atomic
418 #   intrinsics might be built-in. The only case where libatomic is
419 #   missing entirely is when the toolchain does not have support for
420 #   threads. However, a package that does not need threads but still
421 #   uses atomics is quite a corner case, which does not warrant the
422 #   added complexity.
423 # - with gcc 4.7, libatomic did not exist, so only built-ins are
424 #   available. This means that __atomic can only be used in a subset
425 #   of the architectures
426 config BR2_TOOLCHAIN_HAS_ATOMIC
427         bool
428         default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
429         default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
430         default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
431         default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
432         default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
434 # - libquadmath is not needed/available on all architectures (but gcc
435 #   correctly handles this already).
436 # - At least, libquadmath is available on:
437 #   - i*86
438 #   - x86_64
439 # - When available, libquadmath requires wchar support.
440 config BR2_TOOLCHAIN_HAS_LIBQUADMATH
441         bool
442         default y if BR2_i386 || BR2_x86_64