Config.in 18 KB

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