blob: 212fbbd300309c429cde110cd56164d952fd51ed [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
127 Say 'y' if you need to store and/or display different charsets.
128
129config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
130 string "Gconv libraries to copy"
131 depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
132 help
133 Set to the list of gconv libraries to copy.
134 Leave empty to copy all gconv libraries.
135
136 Specify only the basename of the libraries, leave
137 out the .so extension. Eg.:
138 IBM850 ISO8859-15 UNICODE
139
140 Note: the full set of gconv libs are ~8MiB (on ARM).
141
142# This boolean is true if the toolchain provides a built-in full
143# featured gettext implementation (glibc), and false if only a stub
144# gettext implementation is provided (uclibc, musl)
145config BR2_TOOLCHAIN_HAS_FULL_GETTEXT
146 bool
147
148config BR2_USE_MMU
149 bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
150 default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY
151 help
152 If your target has a MMU, you should say Y here. If you
153 are unsure, just say Y.
154
155config BR2_TARGET_OPTIMIZATION
156 string "Target Optimizations"
157 default ""
158 help
159 Optimizations to use when building for the target host.
160 NOTE: gcc optimization level is defined in build options.
161
162config BR2_TARGET_LDFLAGS
163 string "Target linker options"
164 help
165 Extra options to pass to the linker when building for the target.
166
167 Note that options with a '$' sign (eg. -Wl,-rpath='$ORIGIN/../lib')
168 are not supported.
169
170config BR2_ECLIPSE_REGISTER
171 bool "Register toolchain within Eclipse Buildroot plug-in"
172 help
173 This options tells Buildroot to generate the necessary
174 configuration files to make your toolchain appear within
175 Eclipse, through the Eclipse Buildroot plugin.
176
177# Options for packages to depend on, if they require at least a
178# specific version of the kernel headers.
179# Toolchains should choose the adequate option (ie. the highest
180# version, not all of them).
181config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
182 bool
183
184config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
185 bool
186 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
187
188config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
189 bool
190 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
191
192config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
193 bool
194 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
195
196config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
197 bool
198 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
199
200config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
201 bool
202 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
203
204config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
205 bool
206 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
207
208config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
209 bool
210 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
211
212config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
213 bool
214 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
215
216config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
217 bool
218 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
219
220config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
221 bool
222 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
223
224config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
225 bool
226 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
227
228config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
229 bool
230 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
231
232config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
233 bool
234 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
235
236config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
237 bool
238 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
239
240config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
241 bool
242 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
243
244config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
245 bool
246 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
247
248config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
249 bool
250 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
251
252config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
253 bool
254 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
255
256config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
257 bool
258 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
259
260config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
261 bool
262 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
263
264config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
265 bool
266 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
267
268config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
269 bool
270 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
271
272config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
273 bool
274 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
275
276config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
277 bool
278 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
279
280config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
281 bool
282 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
283
284config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
285 bool
286 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
287
288config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
289 bool
290 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
291
292config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
293 bool
294 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
295
296config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
297 bool
298 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
299
300config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
301 bool
302 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
303
304config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
305 bool
306 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
307
308config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
309 bool
310 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
311
312config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
313 bool
314 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
315
316config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
317 bool
318 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
319
320config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
321 bool
322 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
323
324# This order guarantees that the highest version is set, as kconfig
325# stops affecting a value on the first matching default.
326config BR2_TOOLCHAIN_HEADERS_AT_LEAST
327 string
328 default "4.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
329 default "4.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
330 default "4.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
331 default "4.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
332 default "4.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
333 default "4.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
334 default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
335 default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
336 default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
337 default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
338 default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
339 default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
340 default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
341 default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
342 default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
343 default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
344 default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
345 default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
346 default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
347 default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
348 default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
349 default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
350 default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
351 default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
352 default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
353 default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
354 default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
355 default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
356 default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
357 default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
358 default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
359 default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
360 default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
361 default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
362 default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
363 default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
364 default "2.6"
365
366config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
367 bool
368
369config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
370 bool
371 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
372
373config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
374 bool
375 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
376
377config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
378 bool
379 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
380
381config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
382 bool
383 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
384
385config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
386 bool
387 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
388
389config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
390 bool
391 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
392
393config BR2_TOOLCHAIN_GCC_AT_LEAST_5
394 bool
395 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
396
397config BR2_TOOLCHAIN_GCC_AT_LEAST_6
398 bool
399 select BR2_TOOLCHAIN_GCC_AT_LEAST_5
400
401config BR2_TOOLCHAIN_GCC_AT_LEAST_7
402 bool
403 select BR2_TOOLCHAIN_GCC_AT_LEAST_6
404
405# This order guarantees that the highest version is set, as kconfig
406# stops affecting a value on the first matching default.
407config BR2_TOOLCHAIN_GCC_AT_LEAST
408 string
409 default "7" if BR2_TOOLCHAIN_GCC_AT_LEAST_7
410 default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
411 default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
412 default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
413 default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
414 default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
415 default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
416 default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
417 default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
418 default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
419
420config BR2_TOOLCHAIN_HAS_MNAN_OPTION
421 bool
422 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
423
424config BR2_TOOLCHAIN_HAS_SYNC_1
425 bool
426 default y
427 depends on !BR2_bfin
428 depends on !BR2_m68k_cf
429 depends on !BR2_microblaze
430 depends on !BR2_sparc
431 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
432
433config BR2_TOOLCHAIN_HAS_SYNC_2
434 bool
435 default y if BR2_TOOLCHAIN_HAS_SYNC_1
436
437config BR2_TOOLCHAIN_HAS_SYNC_4
438 bool
439 default y
440 depends on !BR2_m68k_cf
441 depends on !BR2_sparc
442 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
443
444# The availability of __sync for 8-byte types on ARM is somewhat
445# complicated:
446#
447# - It appeared in gcc starting with gcc 4.7.
448#
449# - On ARMv7, there is no problem, it can be directly implemented in
450# userspace.
451#
452# - On < ARMv7, it requires help from the kernel. Unfortunately, the
453# libgcc code implementing 8-byte __sync with the help from the
454# kernel calls __write() when a failure occurs, which is a function
455# internal to glibc, not available in uClibc and musl. This means
456# that the 8-byte __sync operations are not available on < ARMv7
457# with uClibc and musl. This problem was fixed as part of gcc
458# PR68059, which was backported to the gcc 5 branch, but isn't yet
459# part of any gcc 5.x release.
460#
461config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
462 bool
463 default y
464 depends on BR2_arm || BR2_armeb
465 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
466 depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
467
468# 8-byte intrinsics available on most x86 CPUs, except a few old ones
469config BR2_TOOLCHAIN_X86_HAS_SYNC_8
470 bool
471 default y
472 depends on BR2_i386
473 depends on !BR2_x86_i486
474 depends on !BR2_x86_c3
475 depends on !BR2_x86_winchip_c6
476 depends on !BR2_x86_winchip2
477
478# 8-byte intrinsics available:
479# - On all 64 bits architecture
480# - On a certain combinations of ARM platforms
481# - On certain x86 32 bits CPUs
482config BR2_TOOLCHAIN_HAS_SYNC_8
483 bool
484 default y if BR2_ARCH_IS_64
485 default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
486 default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
487
488# libatomic is available since gcc 4.8, when thread support is
489# enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
490# part of the tuple, and is therefore not build on uclinux targets,
491# which is why BR2_BINFMT_FLAT configurations are excluded.
492config BR2_TOOLCHAIN_HAS_LIBATOMIC
493 bool
494 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
495 BR2_TOOLCHAIN_HAS_THREADS && \
496 !BR2_BINFMT_FLAT
497
498# __atomic intrinsics are available:
499# - with gcc 4.8, either through built-ins or libatomic, on all
500# architectures. Since we don't want to separate the cases where
501# libatomic is needed vs. not needed, we simplify thing and only
502# support situations where libatomic is available, even if on some
503# architectures libatomic is not strictly needed as all __atomic
504# intrinsics might be built-in. The only case where libatomic is
505# missing entirely is when the toolchain does not have support for
506# threads. However, a package that does not need threads but still
507# uses atomics is quite a corner case, which does not warrant the
508# added complexity.
509# - with gcc 4.7, libatomic did not exist, so only built-ins are
510# available. This means that __atomic can only be used in a subset
511# of the architectures
512config BR2_TOOLCHAIN_HAS_ATOMIC
513 bool
514 default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
515 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
516 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
517 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
518 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
519
520# - libquadmath is not needed/available on all architectures (but gcc
521# correctly handles this already).
522# - At least, libquadmath is available on:
523# - i*86
524# - x86_64
525# - When available, libquadmath requires wchar support.
526config BR2_TOOLCHAIN_HAS_LIBQUADMATH
527 bool
528 default y if BR2_i386 || BR2_x86_64
Peter Korsgaarde2e49502008-12-15 15:28:48 +0000529
Bernhard Reutner-Fischer51a61c92007-09-22 14:16:25 +0000530endmenu