blob: 2da537e7d4c879d5931180b103661fa57f242c8a [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
Patrick Havelange001f9a72019-01-29 10:39:16 +010018 select BR2_TOOLCHAIN_HAS_UCONTEXT
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
Patrick Havelange001f9a72019-01-29 10:39:16 +010023 # ucontext is only available for a subset of the supported
24 # architectures
25 select BR2_TOOLCHAIN_HAS_UCONTEXT if BR2_ARM_CPU_HAS_ARM || BR2_i386 \
26 || BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el \
27 || BR2_sparc || BR2_x86_64
Waldemar Brodkorbfd00d6d2016-07-31 23:41:26 +020028 select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_m68k && !BR2_microblaze && !BR2_STATIC_LIBS
Thomas Petazzoni381616e2013-06-30 21:29:09 +020029
Thomas Petazzonia1d94aa2013-10-08 20:17:09 +020030config BR2_TOOLCHAIN_USES_MUSL
31 bool
Thomas Petazzonia1d94aa2013-10-08 20:17:09 +020032 select BR2_USE_WCHAR
33 select BR2_ENABLE_LOCALE
34 select BR2_TOOLCHAIN_HAS_THREADS
35 select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
Thomas Petazzonic64f9482014-02-18 22:08:59 +010036 select BR2_TOOLCHAIN_HAS_THREADS_NPTL
Patrick Havelange001f9a72019-01-29 10:39:16 +010037 select BR2_TOOLCHAIN_HAS_UCONTEXT
Baruch Siachfa397532017-05-23 01:07:09 +030038 select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_STATIC_LIBS
Thomas Petazzonia1d94aa2013-10-08 20:17:09 +020039
"Steven J. Hill"02f71aa2007-02-06 18:19:38 +000040choice
41 prompt "Toolchain type"
Eric Andersen2d523c22004-10-09 01:06:03 +000042 help
Bernhard Reutner-Fischer4b0d5a82007-09-26 21:12:38 +000043 Select whether to use the toolchain provided by buildroot
44 or an external toolchain.
45
46 Some vendors provide toolchains in binary form, some in
47 source form.
Bernhard Reutner-Fischer7bc7c8e2007-09-25 22:03:18 +000048
"Steven J. Hill"02f71aa2007-02-06 18:19:38 +000049config BR2_TOOLCHAIN_BUILDROOT
Bernhard Reutner-Fischer51a61c92007-09-22 14:16:25 +000050 bool "Buildroot toolchain"
Yann E. MORIN31a72612017-09-03 11:22:16 +020051 depends on BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT
Peter Korsgaard02a623d2008-08-04 19:07:05 +000052
"Steven J. Hill"02f71aa2007-02-06 18:19:38 +000053config BR2_TOOLCHAIN_EXTERNAL
Peter Korsgaardecc81fe2010-02-08 11:01:04 +010054 bool "External toolchain"
Thomas Petazzoni6c492d52010-12-13 17:27:39 +010055 help
56 Select if you want to use an existing cross-compiling
57 toolchain. Buildroot can either download automatically a
58 toolchain, or use an already installed toolchain.
Bernhard Reutner-Fischer4b0d5a82007-09-26 21:12:38 +000059
"Steven J. Hill"02f71aa2007-02-06 18:19:38 +000060endchoice
Eric Andersen2d523c22004-10-09 01:06:03 +000061
Yann E. MORIN2508b162010-07-28 00:08:16 +020062source "toolchain/toolchain-buildroot/Config.in"
Yann E. MORINf78ea9f2010-07-28 00:08:14 +020063source "toolchain/toolchain-external/Config.in"
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -030064
65# Generic toolchain options
66
67# we want gdb config in the middle of both source and external
68# toolchains, but mconf won't let us source the same file twice,
69# so put it here instead
70source "package/gdb/Config.in.host"
71
72comment "Toolchain Generic Options"
73
74# https://sourceware.org/bugzilla/show_bug.cgi?id=19615
75# Affect toolchains built with binutils 2.26 (fixed in binutils 2.26.1).
76config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19615
77 bool
78
Yann E. MORINb5142072018-11-25 10:19:49 +010079# https://sourceware.org/bugzilla/show_bug.cgi?id=20006
80# Affect toolchains built with binutils 2.26 (fixed in binutils 2.26.1).
81config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_20006
82 bool
83
Fabrice Fontaine5f6f9102018-08-18 00:10:13 +020084# Atomic types can be:
85# - never lock-free
86# - sometimes lock-free
87# - always lock-free
88# see https://en.cppreference.com/w/c/atomic/ATOMIC_LOCK_FREE_consts
89#
90# On most architectures, gcc provides "always lock-free" atomic types,
91# but a few architectures are limited to "sometimes lock-free"
92# types. This hidden option allows to know if the architecture
93# provides "always lock-free" atomic types.
94config BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
95 bool
96 default y
97 depends on !BR2_nios2
98 depends on !BR2_ARM_CPU_ARMV4
99 depends on !BR2_ARM_CPU_ARMV5
100 depends on !BR2_sparc_v8
101 depends on !BR2_m68k_cf5208
102
Max Filippov306f5072019-01-25 15:34:52 -0800103# GCC uses thunk functions to adjust the 'this' pointer when calling
104# C++ member functions in classes derived with multiple inheritance.
105# Generation of thunk functions requires support from the compiler
106# back end. In the absence of that support target-independent code
107# in the C++ front end is used to generate thunk functions, but it
108# does not support vararg functions.
109# or1k will support it in the gcc mainline starting with gcc-9.
110config BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK
111 bool
112 default y
113 depends on !BR2_or1k
114 depends on !BR2_xtensa
115
Fabrice Fontaine5f6f9102018-08-18 00:10:13 +0200116# Prior to gcc 7.x, exception_ptr, nested_exception and future from
117# libstdc++ would only be provided on architectures that support
118# always lock-free atomic ints. See
119# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735. This issue has
120# been removed in GCC 7.x, where exception propagation is now
121# supported without lock-free atomic int.
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -0300122config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
123 bool
Fabrice Fontaine5f6f9102018-08-18 00:10:13 +0200124 default y if !BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS && \
125 !BR2_TOOLCHAIN_GCC_AT_LEAST_7
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -0300126
Giulio Benetti42fc5712019-05-27 23:05:09 +0200127# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485. This bug still
128# exists in gcc 9.x
129config BR2_TOOLCHAIN_HAS_GCC_BUG_68485
130 bool
131 default y if BR2_microblaze
132
Matt Weberfd97bc82018-05-28 10:35:10 -0500133# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180. This bug no
134# longer exists in gcc 8.x.
135config BR2_TOOLCHAIN_HAS_GCC_BUG_85180
136 bool
137 default y if BR2_microblaze
Giulio Benettia94dd1c2019-05-21 15:39:21 +0200138 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8
Matt Weberfd97bc82018-05-28 10:35:10 -0500139
Matt Weberbd039662018-05-21 15:29:42 -0500140# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85862
141# An infinite loop exists in the find_base_term() logic of 6.x
142# on microblaze. http://autobuild.buildroot.net/results/158e8ebb39713e1b436a5cc1a1916f46c30694df/
143config BR2_TOOLCHAIN_HAS_GCC_BUG_85862
144 bool
145 default y if BR2_microblaze
146 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
147
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -0300148config BR2_TOOLCHAIN_HAS_NATIVE_RPC
149 bool
150
151config BR2_USE_WCHAR
152 bool
153
154config BR2_ENABLE_LOCALE
155 bool
156
157config BR2_INSTALL_LIBSTDCPP
158 bool
159
160config BR2_TOOLCHAIN_HAS_FORTRAN
161 bool
162
163config BR2_TOOLCHAIN_HAS_THREADS
164 bool
165
166config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
167 bool
168
169config BR2_TOOLCHAIN_HAS_THREADS_NPTL
170 bool
171
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -0300172config BR2_TOOLCHAIN_HAS_SSP
173 bool
174
Patrick Havelange001f9a72019-01-29 10:39:16 +0100175config BR2_TOOLCHAIN_HAS_UCONTEXT
176 bool
177
Ed Blake9c808712019-03-26 12:30:45 +0000178config BR2_TOOLCHAIN_HAS_OPENMP
179 bool
180
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -0300181config BR2_TOOLCHAIN_SUPPORTS_PIE
182 bool
183
184config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
185 bool "Copy gconv libraries"
186 depends on BR2_TOOLCHAIN_USES_GLIBC
187 help
188 The gconv libraries are used to convert between different
189 character sets (charsets).
190
Ricardo Martincoski6d4f66f2018-04-01 02:08:45 -0300191 Say 'y' if you need to store and/or display different
192 charsets.
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -0300193
194config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
195 string "Gconv libraries to copy"
196 depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
197 help
198 Set to the list of gconv libraries to copy.
199 Leave empty to copy all gconv libraries.
200
201 Specify only the basename of the libraries, leave
202 out the .so extension. Eg.:
203 IBM850 ISO8859-15 UNICODE
204
205 Note: the full set of gconv libs are ~8MiB (on ARM).
206
207# This boolean is true if the toolchain provides a built-in full
208# featured gettext implementation (glibc), and false if only a stub
209# gettext implementation is provided (uclibc, musl)
210config BR2_TOOLCHAIN_HAS_FULL_GETTEXT
211 bool
212
213config BR2_USE_MMU
214 bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
215 default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY
216 help
217 If your target has a MMU, you should say Y here. If you
218 are unsure, just say Y.
219
220config BR2_TARGET_OPTIMIZATION
221 string "Target Optimizations"
222 default ""
223 help
224 Optimizations to use when building for the target host.
225 NOTE: gcc optimization level is defined in build options.
226
227config BR2_TARGET_LDFLAGS
228 string "Target linker options"
229 help
Ricardo Martincoski6d4f66f2018-04-01 02:08:45 -0300230 Extra options to pass to the linker when building for the
231 target.
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -0300232
Ricardo Martincoski6d4f66f2018-04-01 02:08:45 -0300233 Note that options with a '$' sign (eg.
234 -Wl,-rpath='$ORIGIN/../lib') are not supported.
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -0300235
236config BR2_ECLIPSE_REGISTER
237 bool "Register toolchain within Eclipse Buildroot plug-in"
238 help
239 This options tells Buildroot to generate the necessary
240 configuration files to make your toolchain appear within
241 Eclipse, through the Eclipse Buildroot plugin.
242
243# Options for packages to depend on, if they require at least a
244# specific version of the kernel headers.
245# Toolchains should choose the adequate option (ie. the highest
246# version, not all of them).
247config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
248 bool
249
250config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
251 bool
252 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
253
254config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
255 bool
256 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
257
258config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
259 bool
260 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
261
262config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
263 bool
264 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
265
266config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
267 bool
268 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
269
270config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
271 bool
272 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
273
274config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
275 bool
276 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
277
278config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
279 bool
280 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
281
282config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
283 bool
284 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
285
286config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
287 bool
288 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
289
290config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
291 bool
292 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
293
294config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
295 bool
296 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
297
298config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
299 bool
300 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
301
302config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
303 bool
304 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
305
306config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
307 bool
308 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
309
310config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
311 bool
312 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
313
314config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
315 bool
316 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
317
318config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
319 bool
320 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
321
322config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
323 bool
324 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
325
326config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
327 bool
328 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
329
330config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
331 bool
332 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
333
334config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
335 bool
336 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
337
338config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
339 bool
340 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
341
342config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
343 bool
344 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
345
346config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
347 bool
348 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
349
350config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
351 bool
352 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
353
354config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
355 bool
356 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
357
358config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
359 bool
360 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
361
362config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
363 bool
364 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
365
366config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
367 bool
368 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
369
370config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
371 bool
372 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
373
374config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
375 bool
376 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
377
378config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
379 bool
380 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
381
382config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
383 bool
384 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
385
386config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
387 bool
388 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
389
Bernd Kuhls792ead72018-04-08 20:26:43 +0200390config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
391 bool
392 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
393
Fabio Estevam77fd06a2018-06-04 09:48:25 -0300394config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17
395 bool
396 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
397
Bernd Kuhlsc59c6c12018-08-19 21:35:54 +0200398config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18
399 bool
400 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17
401
Baruch Siach561770f2018-11-20 15:30:06 +0200402config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19
403 bool
404 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18
405
Thomas Petazzoni649883d2018-12-31 18:52:31 +0100406config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20
407 bool
408 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19
409
Joel Stanley33859462019-03-21 10:58:27 +1030410config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0
411 bool
412 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20
413
Clément Legerd2500dc2019-04-04 09:01:11 +0200414config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
415 bool
416 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0
417
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -0300418# This order guarantees that the highest version is set, as kconfig
419# stops affecting a value on the first matching default.
420config BR2_TOOLCHAIN_HEADERS_AT_LEAST
421 string
Clément Legerd2500dc2019-04-04 09:01:11 +0200422 default "5.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
Joel Stanley33859462019-03-21 10:58:27 +1030423 default "5.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0
Thomas Petazzoni649883d2018-12-31 18:52:31 +0100424 default "4.20" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20
Baruch Siach561770f2018-11-20 15:30:06 +0200425 default "4.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19
Bernd Kuhlsc59c6c12018-08-19 21:35:54 +0200426 default "4.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18
Fabio Estevam77fd06a2018-06-04 09:48:25 -0300427 default "4.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17
Bernd Kuhls792ead72018-04-08 20:26:43 +0200428 default "4.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -0300429 default "4.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
430 default "4.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
431 default "4.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
432 default "4.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
433 default "4.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
434 default "4.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
435 default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
436 default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
437 default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
438 default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
439 default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
440 default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
441 default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
442 default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
443 default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
444 default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
445 default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
446 default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
447 default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
448 default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
449 default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
450 default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
451 default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
452 default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
453 default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
454 default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
455 default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
456 default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
457 default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
458 default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
459 default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
460 default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
461 default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
462 default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
463 default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
464 default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
465 default "2.6"
466
467config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
468 bool
469
470config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
471 bool
472 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
473
474config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
475 bool
476 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
477
478config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
479 bool
480 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
481
482config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
483 bool
484 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
485
486config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
487 bool
488 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
489
490config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
491 bool
492 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
493
494config BR2_TOOLCHAIN_GCC_AT_LEAST_5
495 bool
496 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
497
498config BR2_TOOLCHAIN_GCC_AT_LEAST_6
499 bool
500 select BR2_TOOLCHAIN_GCC_AT_LEAST_5
501
502config BR2_TOOLCHAIN_GCC_AT_LEAST_7
503 bool
504 select BR2_TOOLCHAIN_GCC_AT_LEAST_6
505
Romain Naour0eb91bf2018-05-29 23:52:54 +0200506config BR2_TOOLCHAIN_GCC_AT_LEAST_8
507 bool
508 select BR2_TOOLCHAIN_GCC_AT_LEAST_7
509
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -0300510# This order guarantees that the highest version is set, as kconfig
511# stops affecting a value on the first matching default.
512config BR2_TOOLCHAIN_GCC_AT_LEAST
513 string
Romain Naour0eb91bf2018-05-29 23:52:54 +0200514 default "8" if BR2_TOOLCHAIN_GCC_AT_LEAST_8
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -0300515 default "7" if BR2_TOOLCHAIN_GCC_AT_LEAST_7
516 default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
517 default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
518 default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
519 default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
520 default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
521 default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
522 default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
523 default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
524 default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
525
526config BR2_TOOLCHAIN_HAS_MNAN_OPTION
527 bool
528 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
529
530config BR2_TOOLCHAIN_HAS_SYNC_1
531 bool
532 default y
Ricardo Martincoski6e3c9ad2018-04-01 02:08:26 -0300533 depends on !BR2_m68k_cf
534 depends on !BR2_microblaze
535 depends on !BR2_sparc
536 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
537
538config BR2_TOOLCHAIN_HAS_SYNC_2
539 bool
540 default y if BR2_TOOLCHAIN_HAS_SYNC_1
541
542config BR2_TOOLCHAIN_HAS_SYNC_4
543 bool
544 default y
545 depends on !BR2_m68k_cf
546 depends on !BR2_sparc
547 depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
548
549# The availability of __sync for 8-byte types on ARM is somewhat
550# complicated:
551#
552# - It appeared in gcc starting with gcc 4.7.
553#
554# - On ARMv7, there is no problem, it can be directly implemented in
555# userspace.
556#
557# - On < ARMv7, it requires help from the kernel. Unfortunately, the
558# libgcc code implementing 8-byte __sync with the help from the
559# kernel calls __write() when a failure occurs, which is a function
560# internal to glibc, not available in uClibc and musl. This means
561# that the 8-byte __sync operations are not available on < ARMv7
562# with uClibc and musl. This problem was fixed as part of gcc
563# PR68059, which was backported to the gcc 5 branch, but isn't yet
564# part of any gcc 5.x release.
565#
566config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
567 bool
568 default y
569 depends on BR2_arm || BR2_armeb
570 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
571 depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
572
573# 8-byte intrinsics available on most x86 CPUs, except a few old ones
574config BR2_TOOLCHAIN_X86_HAS_SYNC_8
575 bool
576 default y
577 depends on BR2_i386
578 depends on !BR2_x86_i486
579 depends on !BR2_x86_c3
580 depends on !BR2_x86_winchip_c6
581 depends on !BR2_x86_winchip2
582
583# 8-byte intrinsics available:
584# - On all 64 bits architecture
585# - On a certain combinations of ARM platforms
586# - On certain x86 32 bits CPUs
587config BR2_TOOLCHAIN_HAS_SYNC_8
588 bool
589 default y if BR2_ARCH_IS_64
590 default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
591 default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
592
593# libatomic is available since gcc 4.8, when thread support is
594# enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
595# part of the tuple, and is therefore not build on uclinux targets,
596# which is why BR2_BINFMT_FLAT configurations are excluded.
597config BR2_TOOLCHAIN_HAS_LIBATOMIC
598 bool
599 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
600 BR2_TOOLCHAIN_HAS_THREADS && \
601 !BR2_BINFMT_FLAT
602
603# __atomic intrinsics are available:
604# - with gcc 4.8, either through built-ins or libatomic, on all
605# architectures. Since we don't want to separate the cases where
606# libatomic is needed vs. not needed, we simplify thing and only
607# support situations where libatomic is available, even if on some
608# architectures libatomic is not strictly needed as all __atomic
609# intrinsics might be built-in. The only case where libatomic is
610# missing entirely is when the toolchain does not have support for
611# threads. However, a package that does not need threads but still
612# uses atomics is quite a corner case, which does not warrant the
613# added complexity.
614# - with gcc 4.7, libatomic did not exist, so only built-ins are
615# available. This means that __atomic can only be used in a subset
616# of the architectures
617config BR2_TOOLCHAIN_HAS_ATOMIC
618 bool
619 default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
620 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
621 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
622 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
623 default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
624
625# - libquadmath is not needed/available on all architectures (but gcc
626# correctly handles this already).
627# - At least, libquadmath is available on:
628# - i*86
629# - x86_64
630# - When available, libquadmath requires wchar support.
631config BR2_TOOLCHAIN_HAS_LIBQUADMATH
632 bool
633 default y if BR2_i386 || BR2_x86_64
Peter Korsgaarde2e49502008-12-15 15:28:48 +0000634
Bernhard Reutner-Fischer51a61c92007-09-22 14:16:25 +0000635endmenu