Config.in 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  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. # Prior to gcc 7.x, exception_ptr, nested_exception and future from
  99. # libstdc++ would only be provided on architectures that support
  100. # always lock-free atomic ints. See
  101. # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735. This issue has
  102. # been removed in GCC 7.x, where exception propagation is now
  103. # supported without lock-free atomic int.
  104. config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
  105. bool
  106. default y if !BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS && \
  107. !BR2_TOOLCHAIN_GCC_AT_LEAST_7
  108. # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180. This bug no
  109. # longer exists in gcc 8.x.
  110. config BR2_TOOLCHAIN_HAS_GCC_BUG_85180
  111. bool
  112. default y if BR2_microblaze
  113. # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85862
  114. # An infinite loop exists in the find_base_term() logic of 6.x
  115. # on microblaze. http://autobuild.buildroot.net/results/158e8ebb39713e1b436a5cc1a1916f46c30694df/
  116. config BR2_TOOLCHAIN_HAS_GCC_BUG_85862
  117. bool
  118. default y if BR2_microblaze
  119. depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
  120. config BR2_TOOLCHAIN_HAS_NATIVE_RPC
  121. bool
  122. config BR2_USE_WCHAR
  123. bool
  124. config BR2_ENABLE_LOCALE
  125. bool
  126. config BR2_INSTALL_LIBSTDCPP
  127. bool
  128. config BR2_TOOLCHAIN_HAS_FORTRAN
  129. bool
  130. config BR2_TOOLCHAIN_HAS_THREADS
  131. bool
  132. config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
  133. bool
  134. config BR2_TOOLCHAIN_HAS_THREADS_NPTL
  135. bool
  136. config BR2_TOOLCHAIN_HAS_SSP
  137. bool
  138. config BR2_TOOLCHAIN_HAS_UCONTEXT
  139. bool
  140. config BR2_TOOLCHAIN_HAS_OPENMP
  141. bool
  142. config BR2_TOOLCHAIN_SUPPORTS_PIE
  143. bool
  144. config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
  145. bool "Copy gconv libraries"
  146. depends on BR2_TOOLCHAIN_USES_GLIBC
  147. help
  148. The gconv libraries are used to convert between different
  149. character sets (charsets).
  150. Say 'y' if you need to store and/or display different
  151. charsets.
  152. config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
  153. string "Gconv libraries to copy"
  154. depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
  155. help
  156. Set to the list of gconv libraries to copy.
  157. Leave empty to copy all gconv libraries.
  158. Specify only the basename of the libraries, leave
  159. out the .so extension. Eg.:
  160. IBM850 ISO8859-15 UNICODE
  161. Note: the full set of gconv libs are ~8MiB (on ARM).
  162. # This boolean is true if the toolchain provides a built-in full
  163. # featured gettext implementation (glibc), and false if only a stub
  164. # gettext implementation is provided (uclibc, musl)
  165. config BR2_TOOLCHAIN_HAS_FULL_GETTEXT
  166. bool
  167. config BR2_USE_MMU
  168. bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
  169. default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY
  170. help
  171. If your target has a MMU, you should say Y here. If you
  172. are unsure, just say Y.
  173. config BR2_TARGET_OPTIMIZATION
  174. string "Target Optimizations"
  175. default ""
  176. help
  177. Optimizations to use when building for the target host.
  178. NOTE: gcc optimization level is defined in build options.
  179. config BR2_TARGET_LDFLAGS
  180. string "Target linker options"
  181. help
  182. Extra options to pass to the linker when building for the
  183. target.
  184. Note that options with a '$' sign (eg.
  185. -Wl,-rpath='$ORIGIN/../lib') are not supported.
  186. config BR2_ECLIPSE_REGISTER
  187. bool "Register toolchain within Eclipse Buildroot plug-in"
  188. help
  189. This options tells Buildroot to generate the necessary
  190. configuration files to make your toolchain appear within
  191. Eclipse, through the Eclipse Buildroot plugin.
  192. # Options for packages to depend on, if they require at least a
  193. # specific version of the kernel headers.
  194. # Toolchains should choose the adequate option (ie. the highest
  195. # version, not all of them).
  196. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
  197. bool
  198. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
  199. bool
  200. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
  201. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
  202. bool
  203. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
  204. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
  205. bool
  206. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
  207. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
  208. bool
  209. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
  210. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
  211. bool
  212. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
  213. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
  214. bool
  215. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
  216. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
  217. bool
  218. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
  219. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
  220. bool
  221. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
  222. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
  223. bool
  224. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
  225. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
  226. bool
  227. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
  228. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
  229. bool
  230. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
  231. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
  232. bool
  233. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
  234. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
  235. bool
  236. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
  237. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
  238. bool
  239. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
  240. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
  241. bool
  242. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
  243. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
  244. bool
  245. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
  246. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
  247. bool
  248. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
  249. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
  250. bool
  251. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
  252. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
  253. bool
  254. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
  255. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
  256. bool
  257. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
  258. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
  259. bool
  260. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
  261. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
  262. bool
  263. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
  264. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
  265. bool
  266. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
  267. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
  268. bool
  269. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
  270. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
  271. bool
  272. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
  273. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
  274. bool
  275. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
  276. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
  277. bool
  278. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
  279. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
  280. bool
  281. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
  282. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
  283. bool
  284. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
  285. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
  286. bool
  287. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
  288. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
  289. bool
  290. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
  291. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
  292. bool
  293. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
  294. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
  295. bool
  296. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
  297. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
  298. bool
  299. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
  300. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
  301. bool
  302. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
  303. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
  304. bool
  305. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
  306. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17
  307. bool
  308. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
  309. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18
  310. bool
  311. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17
  312. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19
  313. bool
  314. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18
  315. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20
  316. bool
  317. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19
  318. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0
  319. bool
  320. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20
  321. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
  322. bool
  323. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0
  324. # This order guarantees that the highest version is set, as kconfig
  325. # stops affecting a value on the first matching default.
  326. config BR2_TOOLCHAIN_HEADERS_AT_LEAST
  327. string
  328. default "5.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
  329. default "5.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0
  330. default "4.20" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20
  331. default "4.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19
  332. default "4.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18
  333. default "4.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17
  334. default "4.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
  335. default "4.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
  336. default "4.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
  337. default "4.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
  338. default "4.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
  339. default "4.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
  340. default "4.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
  341. default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
  342. default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
  343. default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
  344. default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
  345. default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
  346. default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
  347. default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
  348. default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
  349. default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
  350. default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
  351. default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
  352. default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
  353. default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
  354. default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
  355. default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
  356. default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
  357. default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
  358. default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
  359. default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
  360. default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
  361. default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
  362. default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
  363. default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
  364. default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
  365. default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
  366. default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
  367. default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
  368. default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
  369. default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
  370. default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
  371. default "2.6"
  372. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
  373. bool
  374. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
  375. bool
  376. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
  377. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
  378. bool
  379. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
  380. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
  381. bool
  382. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
  383. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
  384. bool
  385. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
  386. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
  387. bool
  388. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
  389. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
  390. bool
  391. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
  392. config BR2_TOOLCHAIN_GCC_AT_LEAST_5
  393. bool
  394. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
  395. config BR2_TOOLCHAIN_GCC_AT_LEAST_6
  396. bool
  397. select BR2_TOOLCHAIN_GCC_AT_LEAST_5
  398. config BR2_TOOLCHAIN_GCC_AT_LEAST_7
  399. bool
  400. select BR2_TOOLCHAIN_GCC_AT_LEAST_6
  401. config BR2_TOOLCHAIN_GCC_AT_LEAST_8
  402. bool
  403. select BR2_TOOLCHAIN_GCC_AT_LEAST_7
  404. # This order guarantees that the highest version is set, as kconfig
  405. # stops affecting a value on the first matching default.
  406. config BR2_TOOLCHAIN_GCC_AT_LEAST
  407. string
  408. default "8" if BR2_TOOLCHAIN_GCC_AT_LEAST_8
  409. default "7" if BR2_TOOLCHAIN_GCC_AT_LEAST_7
  410. default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
  411. default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
  412. default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
  413. default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
  414. default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
  415. default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
  416. default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
  417. default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
  418. default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
  419. config BR2_TOOLCHAIN_HAS_MNAN_OPTION
  420. bool
  421. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
  422. config BR2_TOOLCHAIN_HAS_SYNC_1
  423. bool
  424. default y
  425. depends on !BR2_m68k_cf
  426. depends on !BR2_microblaze
  427. depends on !BR2_sparc
  428. depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
  429. config BR2_TOOLCHAIN_HAS_SYNC_2
  430. bool
  431. default y if BR2_TOOLCHAIN_HAS_SYNC_1
  432. config BR2_TOOLCHAIN_HAS_SYNC_4
  433. bool
  434. default y
  435. depends on !BR2_m68k_cf
  436. depends on !BR2_sparc
  437. depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
  438. # The availability of __sync for 8-byte types on ARM is somewhat
  439. # complicated:
  440. #
  441. # - It appeared in gcc starting with gcc 4.7.
  442. #
  443. # - On ARMv7, there is no problem, it can be directly implemented in
  444. # userspace.
  445. #
  446. # - On < ARMv7, it requires help from the kernel. Unfortunately, the
  447. # libgcc code implementing 8-byte __sync with the help from the
  448. # kernel calls __write() when a failure occurs, which is a function
  449. # internal to glibc, not available in uClibc and musl. This means
  450. # that the 8-byte __sync operations are not available on < ARMv7
  451. # with uClibc and musl. This problem was fixed as part of gcc
  452. # PR68059, which was backported to the gcc 5 branch, but isn't yet
  453. # part of any gcc 5.x release.
  454. #
  455. config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
  456. bool
  457. default y
  458. depends on BR2_arm || BR2_armeb
  459. depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
  460. depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
  461. # 8-byte intrinsics available on most x86 CPUs, except a few old ones
  462. config BR2_TOOLCHAIN_X86_HAS_SYNC_8
  463. bool
  464. default y
  465. depends on BR2_i386
  466. depends on !BR2_x86_i486
  467. depends on !BR2_x86_c3
  468. depends on !BR2_x86_winchip_c6
  469. depends on !BR2_x86_winchip2
  470. # 8-byte intrinsics available:
  471. # - On all 64 bits architecture
  472. # - On a certain combinations of ARM platforms
  473. # - On certain x86 32 bits CPUs
  474. config BR2_TOOLCHAIN_HAS_SYNC_8
  475. bool
  476. default y if BR2_ARCH_IS_64
  477. default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
  478. default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
  479. # libatomic is available since gcc 4.8, when thread support is
  480. # enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
  481. # part of the tuple, and is therefore not build on uclinux targets,
  482. # which is why BR2_BINFMT_FLAT configurations are excluded.
  483. config BR2_TOOLCHAIN_HAS_LIBATOMIC
  484. bool
  485. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
  486. BR2_TOOLCHAIN_HAS_THREADS && \
  487. !BR2_BINFMT_FLAT
  488. # __atomic intrinsics are available:
  489. # - with gcc 4.8, either through built-ins or libatomic, on all
  490. # architectures. Since we don't want to separate the cases where
  491. # libatomic is needed vs. not needed, we simplify thing and only
  492. # support situations where libatomic is available, even if on some
  493. # architectures libatomic is not strictly needed as all __atomic
  494. # intrinsics might be built-in. The only case where libatomic is
  495. # missing entirely is when the toolchain does not have support for
  496. # threads. However, a package that does not need threads but still
  497. # uses atomics is quite a corner case, which does not warrant the
  498. # added complexity.
  499. # - with gcc 4.7, libatomic did not exist, so only built-ins are
  500. # available. This means that __atomic can only be used in a subset
  501. # of the architectures
  502. config BR2_TOOLCHAIN_HAS_ATOMIC
  503. bool
  504. default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
  505. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
  506. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
  507. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
  508. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
  509. # - libquadmath is not needed/available on all architectures (but gcc
  510. # correctly handles this already).
  511. # - At least, libquadmath is available on:
  512. # - i*86
  513. # - x86_64
  514. # - When available, libquadmath requires wchar support.
  515. config BR2_TOOLCHAIN_HAS_LIBQUADMATH
  516. bool
  517. default y if BR2_i386 || BR2_x86_64
  518. endmenu