Config.in 17 KB

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