Config.in 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712
  1. menu "Toolchain"
  2. # Invisible option that makes sure the toolchain package always gets
  3. # built
  4. config BR2_TOOLCHAIN
  5. bool
  6. default y
  7. # Should be selected for glibc or eglibc
  8. config BR2_TOOLCHAIN_USES_GLIBC
  9. bool
  10. select BR2_USE_WCHAR
  11. select BR2_ENABLE_LOCALE
  12. select BR2_TOOLCHAIN_HAS_FULL_GETTEXT
  13. select BR2_TOOLCHAIN_HAS_THREADS
  14. select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
  15. select BR2_TOOLCHAIN_HAS_THREADS_NPTL
  16. select BR2_TOOLCHAIN_HAS_UCONTEXT
  17. select BR2_TOOLCHAIN_SUPPORTS_PIE
  18. config BR2_TOOLCHAIN_USES_UCLIBC
  19. bool
  20. # ucontext is only available for a subset of the supported
  21. # architectures
  22. select BR2_TOOLCHAIN_HAS_UCONTEXT if BR2_ARM_CPU_HAS_ARM || BR2_i386 \
  23. || BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el \
  24. || BR2_sparc || BR2_x86_64
  25. select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_m68k && !BR2_microblaze && !BR2_STATIC_LIBS
  26. config BR2_TOOLCHAIN_USES_MUSL
  27. bool
  28. select BR2_USE_WCHAR
  29. select BR2_ENABLE_LOCALE
  30. select BR2_TOOLCHAIN_HAS_THREADS
  31. select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
  32. select BR2_TOOLCHAIN_HAS_THREADS_NPTL
  33. select BR2_TOOLCHAIN_HAS_UCONTEXT
  34. select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_STATIC_LIBS
  35. choice
  36. prompt "Toolchain type"
  37. help
  38. Select whether to use the toolchain provided by buildroot
  39. or an external toolchain.
  40. Some vendors provide toolchains in binary form, some in
  41. source form.
  42. config BR2_TOOLCHAIN_BUILDROOT
  43. bool "Buildroot toolchain"
  44. depends on BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT
  45. config BR2_TOOLCHAIN_EXTERNAL
  46. bool "External toolchain"
  47. help
  48. Select if you want to use an existing cross-compiling
  49. toolchain. Buildroot can either download automatically a
  50. toolchain, or use an already installed toolchain.
  51. endchoice
  52. source "toolchain/toolchain-buildroot/Config.in"
  53. source "toolchain/toolchain-external/Config.in"
  54. # Generic toolchain options
  55. # we want gdb config in the middle of both source and external
  56. # toolchains, but mconf won't let us source the same file twice,
  57. # so put it here instead
  58. source "package/gdb/Config.in.host"
  59. comment "Toolchain Generic Options"
  60. # https://sourceware.org/bugzilla/show_bug.cgi?id=19615
  61. # Affect toolchains built with binutils 2.26 (fixed in binutils 2.26.1).
  62. config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19615
  63. bool
  64. # https://sourceware.org/bugzilla/show_bug.cgi?id=20006
  65. # Affect toolchains built with binutils 2.26 (fixed in binutils 2.26.1).
  66. config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_20006
  67. bool
  68. # https://sourceware.org/bugzilla/show_bug.cgi?id=21464
  69. # Affect toolchains built with binutils 2.31.1, still not fixed.
  70. config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464
  71. bool
  72. default y if BR2_or1k
  73. # Atomic types can be:
  74. # - never lock-free
  75. # - sometimes lock-free
  76. # - always lock-free
  77. # see https://en.cppreference.com/w/c/atomic/ATOMIC_LOCK_FREE_consts
  78. #
  79. # On most architectures, gcc provides "always lock-free" atomic types,
  80. # but a few architectures are limited to "sometimes lock-free"
  81. # types. This hidden option allows to know if the architecture
  82. # provides "always lock-free" atomic types.
  83. config BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
  84. bool
  85. default y
  86. depends on !BR2_nios2
  87. depends on !BR2_ARM_CPU_ARMV4
  88. depends on !BR2_ARM_CPU_ARMV5
  89. depends on !BR2_sparc_v8
  90. depends on !BR2_m68k_cf5208
  91. # GCC uses thunk functions to adjust the 'this' pointer when calling
  92. # C++ member functions in classes derived with multiple inheritance.
  93. # Generation of thunk functions requires support from the compiler
  94. # back end. In the absence of that support target-independent code
  95. # in the C++ front end is used to generate thunk functions, but it
  96. # does not support vararg functions.
  97. # or1k will support it in the gcc mainline starting with gcc-9.
  98. config BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK
  99. bool
  100. default y
  101. depends on !BR2_or1k
  102. depends on !BR2_xtensa
  103. # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63261. This bug no
  104. # longer exists in gcc 8.x.
  105. config BR2_TOOLCHAIN_HAS_GCC_BUG_63261
  106. bool
  107. default y if BR2_microblaze
  108. depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8
  109. # Prior to gcc 7.x, exception_ptr, nested_exception and future from
  110. # libstdc++ would only be provided on architectures that support
  111. # always lock-free atomic ints. See
  112. # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735. This issue has
  113. # been removed in GCC 7.x, where exception propagation is now
  114. # supported without lock-free atomic int.
  115. config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
  116. bool
  117. default y if !BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS && \
  118. !BR2_TOOLCHAIN_GCC_AT_LEAST_7
  119. # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485. This bug still
  120. # exists in gcc 9.x
  121. config BR2_TOOLCHAIN_HAS_GCC_BUG_68485
  122. bool
  123. default y if BR2_microblaze
  124. # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180. This bug no
  125. # longer exists in gcc 8.x.
  126. config BR2_TOOLCHAIN_HAS_GCC_BUG_85180
  127. bool
  128. default y if BR2_microblaze
  129. depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8
  130. # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85862
  131. # An infinite loop exists in the find_base_term() logic of 6.x
  132. # on microblaze. http://autobuild.buildroot.net/results/158e8ebb39713e1b436a5cc1a1916f46c30694df/
  133. config BR2_TOOLCHAIN_HAS_GCC_BUG_85862
  134. bool
  135. default y if BR2_microblaze
  136. depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
  137. # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620
  138. # ICE: in do_output_reload, at reload1.c:7978 on microblaze.
  139. # It's still not fixed in gcc 9.x
  140. config BR2_TOOLCHAIN_HAS_GCC_BUG_90620
  141. bool
  142. default y if BR2_microblaze
  143. # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93847
  144. # ICE: compiler error: Segmentation fault on Nios II. This bug
  145. # no longer exists in gcc 9.x.
  146. config BR2_TOOLCHAIN_HAS_GCC_BUG_93847
  147. bool
  148. default y if BR2_nios2 && !BR2_TOOLCHAIN_GCC_AT_LEAST_9
  149. config BR2_TOOLCHAIN_HAS_NATIVE_RPC
  150. bool
  151. config BR2_USE_WCHAR
  152. bool
  153. config BR2_ENABLE_LOCALE
  154. bool
  155. config BR2_INSTALL_LIBSTDCPP
  156. bool
  157. config BR2_TOOLCHAIN_HAS_DLANG
  158. bool
  159. config BR2_TOOLCHAIN_HAS_FORTRAN
  160. bool
  161. config BR2_TOOLCHAIN_HAS_THREADS
  162. bool
  163. config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
  164. bool
  165. config BR2_TOOLCHAIN_HAS_THREADS_NPTL
  166. bool
  167. config BR2_TOOLCHAIN_HAS_SSP
  168. bool
  169. config BR2_TOOLCHAIN_HAS_SSP_STRONG
  170. bool
  171. default y if BR2_TOOLCHAIN_HAS_SSP && BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
  172. config BR2_TOOLCHAIN_HAS_UCONTEXT
  173. bool
  174. config BR2_TOOLCHAIN_HAS_OPENMP
  175. bool
  176. config BR2_TOOLCHAIN_SUPPORTS_PIE
  177. bool
  178. config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
  179. bool "Copy gconv libraries"
  180. depends on BR2_TOOLCHAIN_USES_GLIBC
  181. help
  182. The gconv libraries are used to convert between different
  183. character sets (charsets).
  184. Say 'y' if you need to store and/or display different
  185. charsets.
  186. config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
  187. string "Gconv libraries to copy"
  188. depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
  189. help
  190. Set to the list of gconv libraries to copy.
  191. Leave empty to copy all gconv libraries.
  192. Specify only the basename of the libraries, leave
  193. out the .so extension. Eg.:
  194. IBM850 ISO8859-15 UNICODE
  195. Note: the full set of gconv libs are ~8MiB (on ARM).
  196. config BR2_TOOLCHAIN_EXTRA_LIBS
  197. string "Extra toolchain libraries to be copied to target"
  198. default BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS if BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS != "" # legacy
  199. depends on !BR2_STATIC_LIBS
  200. help
  201. If your toolchain provides extra libraries that need to be
  202. copied to the target filesystem, enter them here, separated
  203. by spaces. The library should not include a suffix or any
  204. type of pre/post wildcard.
  205. Examples where this can be useful is for adding debug
  206. libraries to the target like the GCC libsanitizer.
  207. e.g. "libasan liblsan libtsan libubsan"
  208. # This boolean is true if the toolchain provides a built-in full
  209. # featured gettext implementation (glibc), and false if only a stub
  210. # gettext implementation is provided (uclibc, musl)
  211. config BR2_TOOLCHAIN_HAS_FULL_GETTEXT
  212. bool
  213. config 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. config BR2_TARGET_OPTIMIZATION
  220. string "Target Optimizations"
  221. default ""
  222. help
  223. Optimizations to use when building for the target host.
  224. NOTE: gcc optimization level is defined in build options.
  225. config BR2_TARGET_LDFLAGS
  226. string "Target linker options"
  227. help
  228. Extra options to pass to the linker when building for the
  229. target.
  230. Note that options with a '$' sign (eg.
  231. -Wl,-rpath='$ORIGIN/../lib') are not supported.
  232. config BR2_ECLIPSE_REGISTER
  233. bool "Register toolchain within Eclipse Buildroot plug-in"
  234. help
  235. This options tells Buildroot to generate the necessary
  236. configuration files to make your toolchain appear within
  237. Eclipse, through the Eclipse Buildroot plugin.
  238. # Options for packages to depend on, if they require at least a
  239. # specific version of the kernel headers.
  240. # Toolchains should choose the adequate option (ie. the highest
  241. # version, not all of them).
  242. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
  243. bool
  244. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
  245. bool
  246. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
  247. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
  248. bool
  249. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
  250. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
  251. bool
  252. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
  253. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
  254. bool
  255. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
  256. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
  257. bool
  258. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
  259. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
  260. bool
  261. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
  262. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
  263. bool
  264. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
  265. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
  266. bool
  267. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
  268. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
  269. bool
  270. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
  271. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
  272. bool
  273. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
  274. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
  275. bool
  276. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
  277. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
  278. bool
  279. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
  280. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
  281. bool
  282. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
  283. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
  284. bool
  285. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
  286. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
  287. bool
  288. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
  289. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
  290. bool
  291. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
  292. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
  293. bool
  294. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
  295. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
  296. bool
  297. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
  298. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
  299. bool
  300. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
  301. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
  302. bool
  303. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
  304. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
  305. bool
  306. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
  307. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
  308. bool
  309. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
  310. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
  311. bool
  312. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
  313. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
  314. bool
  315. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
  316. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
  317. bool
  318. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
  319. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
  320. bool
  321. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
  322. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
  323. bool
  324. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
  325. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
  326. bool
  327. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
  328. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
  329. bool
  330. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
  331. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
  332. bool
  333. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
  334. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
  335. bool
  336. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
  337. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
  338. bool
  339. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
  340. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
  341. bool
  342. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
  343. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
  344. bool
  345. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
  346. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
  347. bool
  348. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
  349. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
  350. bool
  351. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
  352. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17
  353. bool
  354. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
  355. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18
  356. bool
  357. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17
  358. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19
  359. bool
  360. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18
  361. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20
  362. bool
  363. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19
  364. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0
  365. bool
  366. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20
  367. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
  368. bool
  369. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0
  370. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2
  371. bool
  372. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
  373. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3
  374. bool
  375. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2
  376. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4
  377. bool
  378. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3
  379. select BR2_TOOLCHAIN_HEADERS_LATEST
  380. # This should be selected by the latest version, above, to indicate that
  381. # Buildroot does not know of more recent headers than the ones selected.
  382. # This allows using toolchains with headers more recent than Buildroot
  383. # knows about, while still enforcing strict check for older headers.
  384. config BR2_TOOLCHAIN_HEADERS_LATEST
  385. bool
  386. # This order guarantees that the highest version is set, as kconfig
  387. # stops affecting a value on the first matching default.
  388. config BR2_TOOLCHAIN_HEADERS_AT_LEAST
  389. string
  390. default "5.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4
  391. default "5.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3
  392. default "5.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2
  393. default "5.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
  394. default "5.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0
  395. default "4.20" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20
  396. default "4.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19
  397. default "4.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18
  398. default "4.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17
  399. default "4.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
  400. default "4.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
  401. default "4.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
  402. default "4.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
  403. default "4.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
  404. default "4.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
  405. default "4.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
  406. default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
  407. default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
  408. default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
  409. default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
  410. default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
  411. default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
  412. default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
  413. default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
  414. default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
  415. default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
  416. default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
  417. default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
  418. default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
  419. default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
  420. default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
  421. default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
  422. default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
  423. default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
  424. default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
  425. default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
  426. default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
  427. default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
  428. default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
  429. default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
  430. default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
  431. default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
  432. default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
  433. default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
  434. default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
  435. default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
  436. default "2.6"
  437. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
  438. bool
  439. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
  440. bool
  441. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
  442. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
  443. bool
  444. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
  445. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
  446. bool
  447. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
  448. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
  449. bool
  450. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
  451. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
  452. bool
  453. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
  454. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
  455. bool
  456. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
  457. config BR2_TOOLCHAIN_GCC_AT_LEAST_5
  458. bool
  459. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
  460. config BR2_TOOLCHAIN_GCC_AT_LEAST_6
  461. bool
  462. select BR2_TOOLCHAIN_GCC_AT_LEAST_5
  463. config BR2_TOOLCHAIN_GCC_AT_LEAST_7
  464. bool
  465. select BR2_TOOLCHAIN_GCC_AT_LEAST_6
  466. config BR2_TOOLCHAIN_GCC_AT_LEAST_8
  467. bool
  468. select BR2_TOOLCHAIN_GCC_AT_LEAST_7
  469. config BR2_TOOLCHAIN_GCC_AT_LEAST_9
  470. bool
  471. select BR2_TOOLCHAIN_GCC_AT_LEAST_8
  472. # This order guarantees that the highest version is set, as kconfig
  473. # stops affecting a value on the first matching default.
  474. config BR2_TOOLCHAIN_GCC_AT_LEAST
  475. string
  476. default "9" if BR2_TOOLCHAIN_GCC_AT_LEAST_9
  477. default "8" if BR2_TOOLCHAIN_GCC_AT_LEAST_8
  478. default "7" if BR2_TOOLCHAIN_GCC_AT_LEAST_7
  479. default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
  480. default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
  481. default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
  482. default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
  483. default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
  484. default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
  485. default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
  486. default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
  487. default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
  488. config BR2_TOOLCHAIN_HAS_MNAN_OPTION
  489. bool
  490. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
  491. config BR2_TOOLCHAIN_HAS_SYNC_1
  492. bool
  493. default y
  494. depends on !BR2_m68k_cf
  495. depends on !BR2_microblaze
  496. depends on !BR2_sparc
  497. depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
  498. config BR2_TOOLCHAIN_HAS_SYNC_2
  499. bool
  500. default y if BR2_TOOLCHAIN_HAS_SYNC_1
  501. config BR2_TOOLCHAIN_HAS_SYNC_4
  502. bool
  503. default y
  504. depends on !BR2_m68k_cf
  505. depends on !BR2_sparc
  506. depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
  507. # The availability of __sync for 8-byte types on ARM is somewhat
  508. # complicated:
  509. #
  510. # - It appeared in gcc starting with gcc 4.7.
  511. #
  512. # - On ARMv7, there is no problem, it can be directly implemented in
  513. # userspace.
  514. #
  515. # - On < ARMv7, it requires help from the kernel. Unfortunately, the
  516. # libgcc code implementing 8-byte __sync with the help from the
  517. # kernel calls __write() when a failure occurs, which is a function
  518. # internal to glibc, not available in uClibc and musl. This means
  519. # that the 8-byte __sync operations are not available on < ARMv7
  520. # with uClibc and musl. This problem was fixed as part of gcc
  521. # PR68059, which was backported to the gcc 5 branch, but isn't yet
  522. # part of any gcc 5.x release.
  523. #
  524. config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
  525. bool
  526. default y
  527. depends on BR2_arm || BR2_armeb
  528. depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
  529. depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
  530. # 8-byte intrinsics available on most x86 CPUs, except a few old ones
  531. config BR2_TOOLCHAIN_X86_HAS_SYNC_8
  532. bool
  533. default y
  534. depends on BR2_i386
  535. depends on !BR2_x86_i486
  536. depends on !BR2_x86_c3
  537. depends on !BR2_x86_winchip_c6
  538. depends on !BR2_x86_winchip2
  539. # 8-byte intrinsics available:
  540. # - On all 64 bits architecture
  541. # - On a certain combinations of ARM platforms
  542. # - On certain x86 32 bits CPUs
  543. config BR2_TOOLCHAIN_HAS_SYNC_8
  544. bool
  545. default y if BR2_ARCH_IS_64
  546. default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
  547. default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
  548. # libatomic is available since gcc 4.8, when thread support is
  549. # enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
  550. # part of the tuple, and is therefore not build on uclinux targets,
  551. # which is why BR2_BINFMT_FLAT configurations are excluded.
  552. config BR2_TOOLCHAIN_HAS_LIBATOMIC
  553. bool
  554. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
  555. !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64 && \
  556. BR2_TOOLCHAIN_HAS_THREADS && \
  557. !BR2_BINFMT_FLAT
  558. # __atomic intrinsics are available:
  559. # - with gcc 4.8, either through built-ins or libatomic, on all
  560. # architectures. Since we don't want to separate the cases where
  561. # libatomic is needed vs. not needed, we simplify thing and only
  562. # support situations where libatomic is available, even if on some
  563. # architectures libatomic is not strictly needed as all __atomic
  564. # intrinsics might be built-in. The only case where libatomic is
  565. # missing entirely is when the toolchain does not have support for
  566. # threads. However, a package that does not need threads but still
  567. # uses atomics is quite a corner case, which does not warrant the
  568. # added complexity.
  569. # - with gcc 4.7, libatomic did not exist, so only built-ins are
  570. # available. This means that __atomic can only be used in a subset
  571. # of the architectures
  572. config BR2_TOOLCHAIN_HAS_ATOMIC
  573. bool
  574. default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
  575. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
  576. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
  577. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
  578. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
  579. # - libquadmath is not needed/available on all architectures (but gcc
  580. # correctly handles this already).
  581. # - At least, libquadmath is available on:
  582. # - i*86
  583. # - x86_64
  584. # - When available, libquadmath requires wchar support.
  585. config BR2_TOOLCHAIN_HAS_LIBQUADMATH
  586. bool
  587. default y if BR2_i386 || BR2_x86_64
  588. endmenu