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