Config.in 22 KB

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