toolchain-external: install libmvec.so from glibc toolchains
[buildroot-gz.git] / toolchain / toolchain-common.in
blobbf9dc7b93fdcc8fc8cc42594a08627773a1fcf3f
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
12         bool
14 config BR2_TOOLCHAIN_HAS_NATIVE_RPC
15         bool
17 config BR2_USE_WCHAR
18         bool
20 config BR2_ENABLE_LOCALE
21         bool
23 config BR2_INSTALL_LIBSTDCPP
24         bool
26 config BR2_TOOLCHAIN_HAS_FORTRAN
27         bool
29 config BR2_TOOLCHAIN_HAS_THREADS
30         bool
32 config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
33         bool
35 config BR2_TOOLCHAIN_HAS_THREADS_NPTL
36         bool
38 config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
39         bool
41 config BR2_TOOLCHAIN_HAS_SSP
42         bool
44 config BR2_TOOLCHAIN_SUPPORTS_PIE
45         bool
47 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
48         bool "Copy gconv libraries"
49         depends on BR2_TOOLCHAIN_USES_GLIBC
50         help
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
59         help
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
76         bool
77         default y if BR2_TOOLCHAIN_USES_UCLIBC
79 config BR2_NEEDS_GETTEXT_IF_LOCALE
80         bool
81         default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE)
83 config BR2_USE_MMU
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
86         help
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"
92         default ""
93         help
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"
99         help
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')
103           are not supported.
105 config BR2_ECLIPSE_REGISTER
106         bool "Register toolchain within Eclipse Buildroot plug-in"
107         help
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
117         bool
119 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
120         bool
121         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
123 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
124         bool
125         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
127 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
128         bool
129         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
131 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
132         bool
133         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
135 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
136         bool
137         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
139 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
140         bool
141         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
143 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
144         bool
145         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
147 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
148         bool
149         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
151 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
152         bool
153         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
155 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
156         bool
157         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
159 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
160         bool
161         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
163 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
164         bool
165         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
167 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
168         bool
169         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
171 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
172         bool
173         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
175 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
176         bool
177         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
179 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
180         bool
181         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
183 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
184         bool
185         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
187 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
188         bool
189         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
191 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
192         bool
193         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
195 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
196         bool
197         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
199 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
200         bool
201         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
203 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
204         bool
205         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
207 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
208         bool
209         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
211 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
212         bool
213         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
215 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
216         bool
217         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
219 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
220         bool
221         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
223 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
224         bool
225         select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
227 config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
228         bool
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
234         string
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
264         default "2.6"
266 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
267         bool
269 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
270         bool
271         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
273 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
274         bool
275         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
277 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
278         bool
279         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
281 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
282         bool
283         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
285 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
286         bool
287         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
289 config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
290         bool
291         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
293 config BR2_TOOLCHAIN_GCC_AT_LEAST_5
294         bool
295         select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
297 config BR2_TOOLCHAIN_GCC_AT_LEAST_6
298         bool
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
304         string
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
316         bool
317         default y
318         depends on !BR2_bfin
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
325         bool
326         default y if BR2_TOOLCHAIN_HAS_SYNC_1
328 config BR2_TOOLCHAIN_HAS_SYNC_4
329         bool
330         default y
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
336 # complicated:
338 #  - It appeared in gcc starting with gcc 4.7.
340 #  - On ARMv7, there is no problem, it can be directly implemented in
341 #    userspace.
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
353         bool
354         default y
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
361         bool
362         default y
363         depends on BR2_i386
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
374         bool
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
384         bool
385         default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
386                 BR2_TOOLCHAIN_HAS_THREADS && \
387                 !BR2_BINFMT_FLAT
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
399 #   added complexity.
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
404         bool
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:
414 #   - i*86
415 #   - x86_64
416 # - When available, libquadmath requires wchar support.
417 config BR2_TOOLCHAIN_HAS_LIBQUADMATH
418         bool
419         default y if BR2_i386 || BR2_x86_64