Config.in 17 KB

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