blob: e2ef1e7ef39ea1c6453116906e249ae5954b3105 [file] [log] [blame]
Bernhard Reutner-Fischer51a61c92007-09-22 14:16:25 +00001menu "Toolchain"
Thomas Petazzoni381616e2013-06-30 21:29:09 +02002
Fabio Porcedda5f70a002014-04-07 11:56:48 +02003# Invisible option that makes sure the toolchain package always gets
4# built
5config BR2_TOOLCHAIN
6 bool
7 default y
8
Thomas Petazzoni381616e2013-06-30 21:29:09 +02009# Should be selected for glibc or eglibc
10config BR2_TOOLCHAIN_USES_GLIBC
11 bool
Thomas Petazzoni381616e2013-06-30 21:29:09 +020012 select BR2_USE_WCHAR
13 select BR2_ENABLE_LOCALE
Thomas Petazzoni85cb34a2017-07-04 16:47:46 +020014 select BR2_TOOLCHAIN_HAS_FULL_GETTEXT
Thomas Petazzoni381616e2013-06-30 21:29:09 +020015 select BR2_TOOLCHAIN_HAS_THREADS
16 select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
Thomas Petazzonic64f9482014-02-18 22:08:59 +010017 select BR2_TOOLCHAIN_HAS_THREADS_NPTL
Thomas Petazzoni381616e2013-06-30 21:29:09 +020018 select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
Waldemar Brodkorb3c939012016-07-11 16:35:14 +020019 select BR2_TOOLCHAIN_SUPPORTS_PIE
Thomas Petazzoni381616e2013-06-30 21:29:09 +020020
21config BR2_TOOLCHAIN_USES_UCLIBC
22 bool
Waldemar Brodkorbfd00d6d2016-07-31 23:41:26 +020023 select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_m68k && !BR2_microblaze && !BR2_STATIC_LIBS
Thomas Petazzoni381616e2013-06-30 21:29:09 +020024
Thomas Petazzonia1d94aa2013-10-08 20:17:09 +020025config BR2_TOOLCHAIN_USES_MUSL
26 bool
Thomas Petazzonia1d94aa2013-10-08 20:17:09 +020027 select BR2_USE_WCHAR
28 select BR2_ENABLE_LOCALE
29 select BR2_TOOLCHAIN_HAS_THREADS
30 select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
Thomas Petazzonic64f9482014-02-18 22:08:59 +010031 select BR2_TOOLCHAIN_HAS_THREADS_NPTL
Baruch Siachfa397532017-05-23 01:07:09 +030032 select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_STATIC_LIBS
Thomas Petazzonia1d94aa2013-10-08 20:17:09 +020033
"Steven J. Hill"02f71aa2007-02-06 18:19:38 +000034choice
35 prompt "Toolchain type"
Eric Andersen2d523c22004-10-09 01:06:03 +000036 help
Bernhard Reutner-Fischer4b0d5a82007-09-26 21:12:38 +000037 Select whether to use the toolchain provided by buildroot
38 or an external toolchain.
39
40 Some vendors provide toolchains in binary form, some in
41 source form.
Bernhard Reutner-Fischer7bc7c8e2007-09-25 22:03:18 +000042
"Steven J. Hill"02f71aa2007-02-06 18:19:38 +000043config BR2_TOOLCHAIN_BUILDROOT
Bernhard Reutner-Fischer51a61c92007-09-22 14:16:25 +000044 bool "Buildroot toolchain"
Yann E. MORIN31a72612017-09-03 11:22:16 +020045 depends on BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT
Ricardo Martincoski7a63dcb2018-04-01 02:08:38 -030046 select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
Peter Korsgaard02a623d2008-08-04 19:07:05 +000047
"Steven J. Hill"02f71aa2007-02-06 18:19:38 +000048config BR2_TOOLCHAIN_EXTERNAL
Peter Korsgaardecc81fe2010-02-08 11:01:04 +010049 bool "External toolchain"
Thomas Petazzoni6c492d52010-12-13 17:27:39 +010050 help
51 Select if you want to use an existing cross-compiling
52 toolchain. Buildroot can either download automatically a
53 toolchain, or use an already installed toolchain.
Bernhard Reutner-Fischer4b0d5a82007-09-26 21:12:38 +000054
"Steven J. Hill"02f71aa2007-02-06 18:19:38 +000055endchoice
Eric Andersen2d523c22004-10-09 01:06:03 +000056
Yann E. MORIN2508b162010-07-28 00:08:16 +020057source "toolchain/toolchain-buildroot/Config.in"
Yann E. MORINf78ea9f2010-07-28 00:08:14 +020058source "toolchain/toolchain-external/Config.in"
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -030059
60# Generic toolchain options
61
62# we want gdb config in the middle of both source and external
63# toolchains, but mconf won't let us source the same file twice,
64# so put it here instead
65source "package/gdb/Config.in.host"
66
67comment "Toolchain Generic Options"
68
69# https://sourceware.org/bugzilla/show_bug.cgi?id=19615
70# Affect toolchains built with binutils 2.26 (fixed in binutils 2.26.1).
71config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19615
72 bool
73
74# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
75# exception_ptr, nested_exception, and future from libstdc++ are not
76# available for architectures not supporting always lock-free atomic
77# ints before GCC 7
78config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
79 bool
80 default y if BR2_nios2
81 default y if BR2_ARM_CPU_ARMV4
82 default y if BR2_ARM_CPU_ARMV5
83 default y if BR2_sparc_v8
84 default y if BR2_m68k_cf5208
85 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
86
87config BR2_TOOLCHAIN_HAS_NATIVE_RPC
88 bool
89
90config BR2_USE_WCHAR
91 bool
92
93config BR2_ENABLE_LOCALE
94 bool
95
96config BR2_INSTALL_LIBSTDCPP
97 bool
98
99config BR2_TOOLCHAIN_HAS_FORTRAN
100 bool
101
102config BR2_TOOLCHAIN_HAS_THREADS
103 bool
104
105config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
106 bool
107
108config BR2_TOOLCHAIN_HAS_THREADS_NPTL
109 bool
110
111config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
112 bool
113
114config BR2_TOOLCHAIN_HAS_SSP
115 bool
116
117config BR2_TOOLCHAIN_SUPPORTS_PIE
118 bool
119
120config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
121 bool "Copy gconv libraries"
122 depends on BR2_TOOLCHAIN_USES_GLIBC
123 help
124 The gconv libraries are used to convert between different
125 character sets (charsets).
126
Ricardo Martincoski6d4f66f2018-04-01 02:08:45 -0300127 Say 'y' if you need to store and/or display different
128 charsets.
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -0300129
130config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
131 string "Gconv libraries to copy"
132 depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
133 help
134 Set to the list of gconv libraries to copy.
135 Leave empty to copy all gconv libraries.
136
137 Specify only the basename of the libraries, leave
138 out the .so extension. Eg.:
139 IBM850 ISO8859-15 UNICODE
140
141 Note: the full set of gconv libs are ~8MiB (on ARM).
142
143# This boolean is true if the toolchain provides a built-in full
144# featured gettext implementation (glibc), and false if only a stub
145# gettext implementation is provided (uclibc, musl)
146config BR2_TOOLCHAIN_HAS_FULL_GETTEXT
147 bool
148
149config BR2_USE_MMU
150 bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
151 default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY
152 help
153 If your target has a MMU, you should say Y here. If you
154 are unsure, just say Y.
155
156config BR2_TARGET_OPTIMIZATION
157 string "Target Optimizations"
158 default ""
159 help
160 Optimizations to use when building for the target host.
161 NOTE: gcc optimization level is defined in build options.
162
163config BR2_TARGET_LDFLAGS
164 string "Target linker options"
165 help
Ricardo Martincoski6d4f66f2018-04-01 02:08:45 -0300166 Extra options to pass to the linker when building for the
167 target.
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -0300168
Ricardo Martincoski6d4f66f2018-04-01 02:08:45 -0300169 Note that options with a '$' sign (eg.
170 -Wl,-rpath='$ORIGIN/../lib') are not supported.
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -0300171
172config BR2_ECLIPSE_REGISTER
173 bool "Register toolchain within Eclipse Buildroot plug-in"
174 help
175 This options tells Buildroot to generate the necessary
176 configuration files to make your toolchain appear within
177 Eclipse, through the Eclipse Buildroot plugin.
178
179# Options for packages to depend on, if they require at least a
180# specific version of the kernel headers.
181# Toolchains should choose the adequate option (ie. the highest
182# version, not all of them).
183config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
184 bool
185
186config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
187 bool
188 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
189
190config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
191 bool
192 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
193
194config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
195 bool
196 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
197
198config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
199 bool
200 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
201
202config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
203 bool
204 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
205
206config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
207 bool
208 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
209
210config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
211 bool
212 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
213
214config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
215 bool
216 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
217
218config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
219 bool
220 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
221
222config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
223 bool
224 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
225
226config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
227 bool
228 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
229
230config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
231 bool
232 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
233
234config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
235 bool
236 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
237
238config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
239 bool
240 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
241
242config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
243 bool
244 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
245
246config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
247 bool
248 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
249
250config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
251 bool
252 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
253
254config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
255 bool
256 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
257
258config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
259 bool
260 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
261
262config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
263 bool
264 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
265
266config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
267 bool
268 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
269
270config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
271 bool
272 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
273
274config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
275 bool
276 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
277
278config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
279 bool
280 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
281
282config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
283 bool
284 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
285
286config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
287 bool
288 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
289
290config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
291 bool
292 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
293
294config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
295 bool
296 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
297
298config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
299 bool
300 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
301
302config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
303 bool
304 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
305
306config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
307 bool
308 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
309
310config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
311 bool
312 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
313
314config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
315 bool
316 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
317
318config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
319 bool
320 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
321
322config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
323 bool
324 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
325
Bernd Kuhls792ead72018-04-08 20:26:43 +0200326config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
327 bool
328 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
329
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -0300330# This order guarantees that the highest version is set, as kconfig
331# stops affecting a value on the first matching default.
332config BR2_TOOLCHAIN_HEADERS_AT_LEAST
333 string
Bernd Kuhls792ead72018-04-08 20:26:43 +0200334 default "4.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -0300335 default "4.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
336 default "4.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
337 default "4.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
338 default "4.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
339 default "4.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
340 default "4.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
341 default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
342 default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
343 default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
344 default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
345 default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
346 default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
347 default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
348 default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
349 default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
350 default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
351 default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
352 default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
353 default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
354 default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
355 default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
356 default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
357 default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
358 default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
359 default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
360 default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
361 default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
362 default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
363 default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
364 default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
365 default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
366 default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
367 default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
368 default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
369 default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
370 default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
371 default "2.6"
372
373config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
374 bool
375
376config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
377 bool
378 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
379
380config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
381 bool
382 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
383
384config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
385 bool
386 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
387
388config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
389 bool
390 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
391
392config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
393 bool
394 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
395
396config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
397 bool
398 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
399
400config BR2_TOOLCHAIN_GCC_AT_LEAST_5
401 bool
402 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
403
404config BR2_TOOLCHAIN_GCC_AT_LEAST_6
405 bool
406 select BR2_TOOLCHAIN_GCC_AT_LEAST_5
407
408config BR2_TOOLCHAIN_GCC_AT_LEAST_7
409 bool
410 select BR2_TOOLCHAIN_GCC_AT_LEAST_6
411
412# This order guarantees that the highest version is set, as kconfig
413# stops affecting a value on the first matching default.
414config BR2_TOOLCHAIN_GCC_AT_LEAST
415 string
416 default "7" if BR2_TOOLCHAIN_GCC_AT_LEAST_7
417 default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
418 default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
419 default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
420 default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
421 default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
422 default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
423 default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
424 default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
425 default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
426
427config BR2_TOOLCHAIN_HAS_MNAN_OPTION
428 bool
429 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
430
431config BR2_TOOLCHAIN_HAS_SYNC_1
432 bool
433 default y
434 depends on !BR2_bfin
435 depends on !BR2_m68k_cf
436 depends on !BR2_microblaze
437 depends on !BR2_sparc
438 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
439
440config BR2_TOOLCHAIN_HAS_SYNC_2
441 bool
442 default y if BR2_TOOLCHAIN_HAS_SYNC_1
443
444config BR2_TOOLCHAIN_HAS_SYNC_4
445 bool
446 default y
447 depends on !BR2_m68k_cf
448 depends on !BR2_sparc
449 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
450
451# The availability of __sync for 8-byte types on ARM is somewhat
452# complicated:
453#
454# - It appeared in gcc starting with gcc 4.7.
455#
456# - On ARMv7, there is no problem, it can be directly implemented in
457# userspace.
458#
459# - On < ARMv7, it requires help from the kernel. Unfortunately, the
460# libgcc code implementing 8-byte __sync with the help from the
461# kernel calls __write() when a failure occurs, which is a function
462# internal to glibc, not available in uClibc and musl. This means
463# that the 8-byte __sync operations are not available on < ARMv7
464# with uClibc and musl. This problem was fixed as part of gcc
465# PR68059, which was backported to the gcc 5 branch, but isn't yet
466# part of any gcc 5.x release.
467#
468config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
469 bool
470 default y
471 depends on BR2_arm || BR2_armeb
472 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
473 depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
474
475# 8-byte intrinsics available on most x86 CPUs, except a few old ones
476config BR2_TOOLCHAIN_X86_HAS_SYNC_8
477 bool
478 default y
479 depends on BR2_i386
480 depends on !BR2_x86_i486
481 depends on !BR2_x86_c3
482 depends on !BR2_x86_winchip_c6
483 depends on !BR2_x86_winchip2
484
485# 8-byte intrinsics available:
486# - On all 64 bits architecture
487# - On a certain combinations of ARM platforms
488# - On certain x86 32 bits CPUs
489config BR2_TOOLCHAIN_HAS_SYNC_8
490 bool
491 default y if BR2_ARCH_IS_64
492 default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
493 default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
494
495# libatomic is available since gcc 4.8, when thread support is
496# enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
497# part of the tuple, and is therefore not build on uclinux targets,
498# which is why BR2_BINFMT_FLAT configurations are excluded.
499config BR2_TOOLCHAIN_HAS_LIBATOMIC
500 bool
501 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
502 BR2_TOOLCHAIN_HAS_THREADS && \
503 !BR2_BINFMT_FLAT
504
505# __atomic intrinsics are available:
506# - with gcc 4.8, either through built-ins or libatomic, on all
507# architectures. Since we don't want to separate the cases where
508# libatomic is needed vs. not needed, we simplify thing and only
509# support situations where libatomic is available, even if on some
510# architectures libatomic is not strictly needed as all __atomic
511# intrinsics might be built-in. The only case where libatomic is
512# missing entirely is when the toolchain does not have support for
513# threads. However, a package that does not need threads but still
514# uses atomics is quite a corner case, which does not warrant the
515# added complexity.
516# - with gcc 4.7, libatomic did not exist, so only built-ins are
517# available. This means that __atomic can only be used in a subset
518# of the architectures
519config BR2_TOOLCHAIN_HAS_ATOMIC
520 bool
521 default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
522 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
523 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
524 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
525 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
526
527# - libquadmath is not needed/available on all architectures (but gcc
528# correctly handles this already).
529# - At least, libquadmath is available on:
530# - i*86
531# - x86_64
532# - When available, libquadmath requires wchar support.
533config BR2_TOOLCHAIN_HAS_LIBQUADMATH
534 bool
535 default y if BR2_i386 || BR2_x86_64
Peter Korsgaarde2e49502008-12-15 15:28:48 +0000536
Bernhard Reutner-Fischer51a61c92007-09-22 14:16:25 +0000537endmenu