blob: 15553772fd2a6871c835ad1b57206333d1010cc1 [file] [log] [blame]
Yann E. MORIN2508b162010-07-28 00:08:16 +02001# Generic toolchain options
2
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
Thomas Petazzonia0b6faa2013-04-07 00:04:33 +00006source "package/gdb/Config.in.host"
Yann E. MORIN2508b162010-07-28 00:08:16 +02007
Petri Gynther8218ab82016-08-08 11:34:59 -07008comment "Toolchain Generic Options"
9
Romain Naour73143ab2017-07-04 14:01:09 +020010# https://sourceware.org/bugzilla/show_bug.cgi?id=19615
11# Affect toolchains built with binutils 2.26 (fixed in binutils 2.26.1).
12config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19615
13 bool
14
Jörg Krauseaccba022017-02-09 18:47:54 +010015# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
16# exception_ptr, nested_exception, and future from libstdc++ are not
17# available for architectures not supporting always lock-free atomic
18# ints before GCC 7
19config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
20 bool
Thomas Petazzonided5a122017-02-09 21:31:28 +010021 default y if BR2_nios2
22 default y if BR2_ARM_CPU_ARMV4
23 default y if BR2_ARM_CPU_ARMV5
24 default y if BR2_sparc_v8
Jörg Kraused49b47d2017-06-06 21:52:07 +020025 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
Jörg Krauseaccba022017-02-09 18:47:54 +010026
Thomas Petazzoni0858e002012-11-03 18:47:49 +010027config BR2_TOOLCHAIN_HAS_NATIVE_RPC
Thomas Petazzonifff71172010-12-13 17:27:37 +010028 bool
29
30config BR2_USE_WCHAR
31 bool
Daniel Laird040bd642009-01-30 16:28:26 +000032
33config BR2_ENABLE_LOCALE
Thomas Petazzonifff71172010-12-13 17:27:37 +010034 bool
35
Thomas Petazzoni6b578c82010-12-13 17:27:41 +010036config BR2_INSTALL_LIBSTDCPP
37 bool
38
Samuel Martinb8a05372016-07-03 15:47:40 +020039config BR2_TOOLCHAIN_HAS_FORTRAN
40 bool
41
Thomas Petazzoni9eaad202010-12-13 17:27:44 +010042config BR2_TOOLCHAIN_HAS_THREADS
43 bool
44
Peter Korsgaard5931db02011-11-24 14:26:52 +010045config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
Peter Korsgaard5931db02011-11-24 14:26:52 +010046 bool
47
Thomas Petazzonic64f9482014-02-18 22:08:59 +010048config BR2_TOOLCHAIN_HAS_THREADS_NPTL
49 bool
50
Thomas Petazzonib9882922011-05-30 23:56:57 +020051config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
52 bool
53
Thomas Petazzonic5866be2013-09-02 18:06:36 +020054config BR2_TOOLCHAIN_HAS_SSP
55 bool
56
Waldemar Brodkorb3c939012016-07-11 16:35:14 +020057config BR2_TOOLCHAIN_SUPPORTS_PIE
58 bool
59
Yann E. MORIN11c10762014-07-27 21:28:32 +020060config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
61 bool "Copy gconv libraries"
62 depends on BR2_TOOLCHAIN_USES_GLIBC
63 help
64 The gconv libraries are used to convert between different
65 character sets (charsets).
66
67 Say 'y' if you need to store and/or display different charsets.
68
69config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
70 string "Gconv libraries to copy"
71 depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
72 help
73 Set to the list of gconv libraries to copy.
74 Leave empty to copy all gconv libraries.
75
76 Specify only the basename of the libraries, leave
77 out the .so extension. Eg.:
78 IBM850 ISO8859-15 UNICODE
79
80 Note: the full set of gconv libs are ~8MiB (on ARM).
81
Thomas Petazzoni85cb34a2017-07-04 16:47:46 +020082# This boolean is true if the toolchain provides a built-in full
83# featured gettext implementation (glibc), and false if only a stub
84# gettext implementation is provided (uclibc, musl)
85config BR2_TOOLCHAIN_HAS_FULL_GETTEXT
86 bool
87
Mike Frysingere5e5f5d2011-01-10 09:28:41 -050088config BR2_USE_MMU
Guido Martínez29563042015-06-03 19:34:03 -030089 bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
90 default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY
Mike Frysingere5e5f5d2011-01-10 09:28:41 -050091 help
92 If your target has a MMU, you should say Y here. If you
93 are unsure, just say Y.
94
Daniel Laird040bd642009-01-30 16:28:26 +000095config BR2_TARGET_OPTIMIZATION
96 string "Target Optimizations"
Yann E. MORIN01c34b32014-12-21 14:00:25 +010097 default ""
Daniel Laird040bd642009-01-30 16:28:26 +000098 help
99 Optimizations to use when building for the target host.
Paul Jones36391de2010-06-14 22:36:04 +1000100 NOTE: gcc optimization level is defined in build options.
Baruch Siachec8eda42011-06-23 12:21:21 +0300101
102config BR2_TARGET_LDFLAGS
103 string "Target linker options"
104 help
Thomas De Schampheleire8f8d4142012-01-13 20:23:23 +0100105 Extra options to pass to the linker when building for the target.
Thomas Petazzoni217ef082013-01-13 04:52:13 +0000106
Yann E. MORINa930d9c2014-07-31 00:57:15 +0200107 Note that options with a '$' sign (eg. -Wl,-rpath='$ORIGIN/../lib')
108 are not supported.
109
Thomas Petazzoni217ef082013-01-13 04:52:13 +0000110config BR2_ECLIPSE_REGISTER
111 bool "Register toolchain within Eclipse Buildroot plug-in"
112 help
113 This options tells Buildroot to generate the necessary
114 configuration files to make your toolchain appear within
115 Eclipse, through the Eclipse Buildroot plugin.
Yann E. MORINb155f5a2014-03-01 15:52:57 +0100116
117# Options for packages to depend on, if they require at least a
118# specific version of the kernel headers.
119# Toolchains should choose the adequate option (ie. the highest
120# version, not all of them).
121config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
122 bool
123
124config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
125 bool
126 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
127
128config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
129 bool
130 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
131
132config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
133 bool
134 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
135
136config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
137 bool
138 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
139
140config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
141 bool
142 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
143
144config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
145 bool
146 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
147
148config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
149 bool
150 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
151
152config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
153 bool
154 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
155
156config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
157 bool
158 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
159
160config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
161 bool
162 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
163
164config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
165 bool
166 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
167
168config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
169 bool
170 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
171
172config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
173 bool
174 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
Yann E. MORINa5a30962014-03-01 15:53:01 +0100175
Gustavo Zacarias4916b882014-04-01 06:19:48 -0300176config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
177 bool
178 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
179
Gustavo Zacariasfb29afe2014-06-09 08:30:33 -0300180config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
181 bool
182 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
183
Gustavo Zacarias911516f2014-08-03 23:29:22 -0300184config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
185 bool
186 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
187
Gustavo Zacarias2d312b72014-10-06 08:44:39 -0300188config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
189 bool
190 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
191
Gustavo Zacariasbf6f74d2014-12-08 08:10:39 -0300192config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
193 bool
194 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
195
Peter Korsgaard81366ed2015-02-09 13:31:23 +0100196config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
197 bool
198 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
199
Gustavo Zacariase714ee92015-04-13 10:00:23 -0300200config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
201 bool
202 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
203
Gustavo Zacariasdae7d8a2015-06-22 10:11:03 -0300204config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
205 bool
206 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
207
Peter Korsgaard8dc68292015-09-01 10:05:20 +0200208config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
209 bool
210 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
211
Vicente Olivert Rieraaef2df82015-11-02 15:56:51 +0100212config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
213 bool
214 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
215
Gustavo Zacariasdf2ad612016-01-11 07:52:36 -0300216config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
217 bool
218 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
219
Gustavo Zacarias3ece3fa2016-03-14 07:14:10 -0300220config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
221 bool
222 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
223
Gustavo Zacarias51800d22016-05-16 08:58:12 -0300224config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
225 bool
226 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
227
Fabio Estevame36bf632016-07-24 20:56:09 -0300228config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
229 bool
230 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
231
Fabio Estevamd3ac2bc2016-09-12 13:15:54 -0300232config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
233 bool
234 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
235
Fabio Estevam94025032016-12-11 20:01:49 -0200236config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
237 bool
238 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
239
Fabio Estevam369b66f2017-02-20 08:57:34 -0300240config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
241 bool
242 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
243
Samuel Martina381d852017-05-01 12:24:37 +0200244config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
245 bool
246 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
247
Joel Stanleye9f6a612017-07-06 14:26:16 +0930248config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
249 bool
250 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
251
Fabio Estevam1576b892017-09-03 19:58:31 -0300252config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
253 bool
254 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
255
Fabio Estevambf91e4b2017-11-12 20:47:06 -0200256config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
257 bool
258 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
259
Yann E. MORINa5a30962014-03-01 15:53:01 +0100260# This order guarantees that the highest version is set, as kconfig
261# stops affecting a value on the first matching default.
262config BR2_TOOLCHAIN_HEADERS_AT_LEAST
263 string
Fabio Estevambf91e4b2017-11-12 20:47:06 -0200264 default "4.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
Fabio Estevam1576b892017-09-03 19:58:31 -0300265 default "4.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
Joel Stanleye9f6a612017-07-06 14:26:16 +0930266 default "4.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
Samuel Martina381d852017-05-01 12:24:37 +0200267 default "4.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
Fabio Estevam369b66f2017-02-20 08:57:34 -0300268 default "4.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
Fabio Estevam94025032016-12-11 20:01:49 -0200269 default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
Fabio Estevamd3ac2bc2016-09-12 13:15:54 -0300270 default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
Fabio Estevame36bf632016-07-24 20:56:09 -0300271 default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
Gustavo Zacarias51800d22016-05-16 08:58:12 -0300272 default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
Gustavo Zacarias3ece3fa2016-03-14 07:14:10 -0300273 default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
Gustavo Zacariasdf2ad612016-01-11 07:52:36 -0300274 default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
Vicente Olivert Rieraaef2df82015-11-02 15:56:51 +0100275 default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
Peter Korsgaard8dc68292015-09-01 10:05:20 +0200276 default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
Gustavo Zacariasdae7d8a2015-06-22 10:11:03 -0300277 default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
Gustavo Zacariase714ee92015-04-13 10:00:23 -0300278 default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
Peter Korsgaard81366ed2015-02-09 13:31:23 +0100279 default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
Gustavo Zacariasbf6f74d2014-12-08 08:10:39 -0300280 default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
Gustavo Zacarias2d312b72014-10-06 08:44:39 -0300281 default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
Gustavo Zacarias911516f2014-08-03 23:29:22 -0300282 default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
Gustavo Zacariasfb29afe2014-06-09 08:30:33 -0300283 default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
Gustavo Zacarias4916b882014-04-01 06:19:48 -0300284 default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
Yann E. MORINa5a30962014-03-01 15:53:01 +0100285 default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
286 default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
287 default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
288 default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
289 default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
290 default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
291 default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
292 default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
293 default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
294 default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
295 default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
296 default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
297 default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
298 default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
299 default "2.6"
Thomas Petazzoni8ba2a762015-08-04 20:00:33 +0200300
301config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
302 bool
303
304config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
305 bool
306 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
307
308config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
309 bool
310 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
311
312config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
313 bool
314 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
315
316config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
317 bool
318 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
319
320config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
321 bool
322 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
323
324config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
325 bool
326 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
327
328config BR2_TOOLCHAIN_GCC_AT_LEAST_5
329 bool
330 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
331
Thomas Petazzoni519d83b2016-04-27 15:54:03 +0200332config BR2_TOOLCHAIN_GCC_AT_LEAST_6
333 bool
334 select BR2_TOOLCHAIN_GCC_AT_LEAST_5
335
Romain Naour43141612017-05-23 22:24:39 +0200336config BR2_TOOLCHAIN_GCC_AT_LEAST_7
337 bool
338 select BR2_TOOLCHAIN_GCC_AT_LEAST_6
339
Thomas Petazzoni8ba2a762015-08-04 20:00:33 +0200340# This order guarantees that the highest version is set, as kconfig
341# stops affecting a value on the first matching default.
342config BR2_TOOLCHAIN_GCC_AT_LEAST
343 string
Romain Naour43141612017-05-23 22:24:39 +0200344 default "7" if BR2_TOOLCHAIN_GCC_AT_LEAST_7
Thomas Petazzoni519d83b2016-04-27 15:54:03 +0200345 default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
Thomas Petazzoni8ba2a762015-08-04 20:00:33 +0200346 default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
347 default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
348 default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
349 default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
350 default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
351 default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
352 default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
353 default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
Thomas Petazzoni6856e412016-02-02 16:31:20 +0100354
Vicente Olivert Riera0af74112017-07-21 18:06:31 +0100355config BR2_TOOLCHAIN_HAS_MNAN_OPTION
356 bool
357 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
358
Vicente Olivert Riera087be352017-07-21 18:06:32 +0100359config BR2_TOOLCHAIN_HAS_MFPXX_OPTION
360 bool
361 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_5
362
Thomas Petazzoni6856e412016-02-02 16:31:20 +0100363config BR2_TOOLCHAIN_HAS_SYNC_1
364 bool
365 default y
Thomas Petazzoni6856e412016-02-02 16:31:20 +0100366 depends on !BR2_bfin
Waldemar Brodkorbdf00b172016-06-13 08:03:03 +0200367 depends on !BR2_m68k_cf
Thomas Petazzoni6856e412016-02-02 16:31:20 +0100368 depends on !BR2_microblaze
369 depends on !BR2_sparc
370 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
371
372config BR2_TOOLCHAIN_HAS_SYNC_2
373 bool
374 default y if BR2_TOOLCHAIN_HAS_SYNC_1
375
376config BR2_TOOLCHAIN_HAS_SYNC_4
377 bool
378 default y
Waldemar Brodkorbdf00b172016-06-13 08:03:03 +0200379 depends on !BR2_m68k_cf
Thomas Petazzoni6856e412016-02-02 16:31:20 +0100380 depends on !BR2_sparc
Thomas Petazzoni6856e412016-02-02 16:31:20 +0100381 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
382
383# The availability of __sync for 8-byte types on ARM is somewhat
384# complicated:
385#
386# - It appeared in gcc starting with gcc 4.7.
387#
388# - On ARMv7, there is no problem, it can be directly implemented in
389# userspace.
390#
391# - On < ARMv7, it requires help from the kernel. Unfortunately, the
392# libgcc code implementing 8-byte __sync with the help from the
393# kernel calls __write() when a failure occurs, which is a function
394# internal to glibc, not available in uClibc and musl. This means
395# that the 8-byte __sync operations are not available on < ARMv7
396# with uClibc and musl. This problem was fixed as part of gcc
397# PR68059, which was backported to the gcc 5 branch, but isn't yet
398# part of any gcc 5.x release.
399#
400config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
401 bool
402 default y
403 depends on BR2_arm || BR2_armeb
404 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
405 depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
406
407# 8-byte intrinsics available on most x86 CPUs, except a few old ones
408config BR2_TOOLCHAIN_X86_HAS_SYNC_8
409 bool
410 default y
411 depends on BR2_i386
Thomas Petazzoni6856e412016-02-02 16:31:20 +0100412 depends on !BR2_x86_i486
413 depends on !BR2_x86_c3
414 depends on !BR2_x86_winchip_c6
415 depends on !BR2_x86_winchip2
416
417# 8-byte intrinsics available:
418# - On all 64 bits architecture
419# - On a certain combinations of ARM platforms
420# - On certain x86 32 bits CPUs
421config BR2_TOOLCHAIN_HAS_SYNC_8
422 bool
423 default y if BR2_ARCH_IS_64
424 default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
425 default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
426
Thomas Petazzoni42735cb2016-03-06 21:47:16 +0100427# libatomic is available since gcc 4.8, when thread support is
Romain Naourb3d1fb22016-08-02 19:25:55 +0200428# enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
429# part of the tuple, and is therefore not build on uclinux targets,
430# which is why BR2_BINFMT_FLAT configurations are excluded.
Thomas Petazzoni42735cb2016-03-06 21:47:16 +0100431config BR2_TOOLCHAIN_HAS_LIBATOMIC
432 bool
433 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
Romain Naourb3d1fb22016-08-02 19:25:55 +0200434 BR2_TOOLCHAIN_HAS_THREADS && \
435 !BR2_BINFMT_FLAT
Thomas Petazzoni42735cb2016-03-06 21:47:16 +0100436
Thomas Petazzoni6856e412016-02-02 16:31:20 +0100437# __atomic intrinsics are available:
438# - with gcc 4.8, either through built-ins or libatomic, on all
Thomas Petazzoni42735cb2016-03-06 21:47:16 +0100439# architectures. Since we don't want to separate the cases where
440# libatomic is needed vs. not needed, we simplify thing and only
441# support situations where libatomic is available, even if on some
442# architectures libatomic is not strictly needed as all __atomic
443# intrinsics might be built-in. The only case where libatomic is
444# missing entirely is when the toolchain does not have support for
445# threads. However, a package that does not need threads but still
446# uses atomics is quite a corner case, which does not warrant the
447# added complexity.
Thomas Petazzoni6856e412016-02-02 16:31:20 +0100448# - with gcc 4.7, libatomic did not exist, so only built-ins are
449# available. This means that __atomic can only be used in a subset
450# of the architectures
451config BR2_TOOLCHAIN_HAS_ATOMIC
452 bool
Thomas Petazzoni42735cb2016-03-06 21:47:16 +0100453 default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
Thomas Petazzoni6856e412016-02-02 16:31:20 +0100454 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
455 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
456 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
457 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
Samuel Martinb16f8c72016-07-03 15:47:37 +0200458
459# - libquadmath is not needed/available on all architectures (but gcc
460# correctly handles this already).
461# - At least, libquadmath is available on:
462# - i*86
463# - x86_64
464# - When available, libquadmath requires wchar support.
465config BR2_TOOLCHAIN_HAS_LIBQUADMATH
466 bool
467 default y if BR2_i386 || BR2_x86_64