Config.in 22 KB

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