toolchain-common.in 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  1. # Generic toolchain options
  2. # we want gdb config in the middle of both source and external
  3. # toolchains, but mconf won't let us source the same file twice,
  4. # so put it here instead
  5. source "package/gdb/Config.in.host"
  6. comment "Toolchain Generic Options"
  7. # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
  8. # exception_ptr, nested_exception, and future from libstdc++ are not
  9. # available for architectures not supporting always lock-free atomic
  10. # ints before GCC 7
  11. config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
  12. bool
  13. default y if BR2_nios2
  14. default y if BR2_ARM_CPU_ARMV4
  15. default y if BR2_ARM_CPU_ARMV5
  16. default y if BR2_sparc_v8
  17. # https://sourceware.org/bugzilla/show_bug.cgi?id=19405
  18. config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405
  19. bool
  20. config BR2_TOOLCHAIN_HAS_NATIVE_RPC
  21. bool
  22. config BR2_USE_WCHAR
  23. bool
  24. config BR2_ENABLE_LOCALE
  25. bool
  26. config BR2_INSTALL_LIBSTDCPP
  27. bool
  28. config BR2_TOOLCHAIN_HAS_FORTRAN
  29. bool
  30. config BR2_TOOLCHAIN_HAS_THREADS
  31. bool
  32. config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
  33. bool
  34. config BR2_TOOLCHAIN_HAS_THREADS_NPTL
  35. bool
  36. config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
  37. bool
  38. config BR2_TOOLCHAIN_HAS_SSP
  39. bool
  40. config BR2_TOOLCHAIN_SUPPORTS_PIE
  41. bool
  42. config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
  43. bool "Copy gconv libraries"
  44. depends on BR2_TOOLCHAIN_USES_GLIBC
  45. help
  46. The gconv libraries are used to convert between different
  47. character sets (charsets).
  48. Say 'y' if you need to store and/or display different charsets.
  49. config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
  50. string "Gconv libraries to copy"
  51. depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
  52. help
  53. Set to the list of gconv libraries to copy.
  54. Leave empty to copy all gconv libraries.
  55. Specify only the basename of the libraries, leave
  56. out the .so extension. Eg.:
  57. IBM850 ISO8859-15 UNICODE
  58. Note: the full set of gconv libs are ~8MiB (on ARM).
  59. # glibc and eglibc directly include gettext, so a separatly compiled
  60. # gettext isn't needed and shouldn't be built to avoid conflicts. Some
  61. # packages always need gettext, other packages only need gettext when
  62. # locale support is enabled. See the documentation for how packages
  63. # should rely on the following two options.
  64. config BR2_NEEDS_GETTEXT
  65. bool
  66. default y if BR2_TOOLCHAIN_USES_UCLIBC
  67. config BR2_NEEDS_GETTEXT_IF_LOCALE
  68. bool
  69. default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE)
  70. config BR2_USE_MMU
  71. bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
  72. default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY
  73. help
  74. If your target has a MMU, you should say Y here. If you
  75. are unsure, just say Y.
  76. config BR2_TARGET_OPTIMIZATION
  77. string "Target Optimizations"
  78. default ""
  79. help
  80. Optimizations to use when building for the target host.
  81. NOTE: gcc optimization level is defined in build options.
  82. config BR2_TARGET_LDFLAGS
  83. string "Target linker options"
  84. help
  85. Extra options to pass to the linker when building for the target.
  86. Note that options with a '$' sign (eg. -Wl,-rpath='$ORIGIN/../lib')
  87. are not supported.
  88. config BR2_ECLIPSE_REGISTER
  89. bool "Register toolchain within Eclipse Buildroot plug-in"
  90. help
  91. This options tells Buildroot to generate the necessary
  92. configuration files to make your toolchain appear within
  93. Eclipse, through the Eclipse Buildroot plugin.
  94. # Options for packages to depend on, if they require at least a
  95. # specific version of the kernel headers.
  96. # Toolchains should choose the adequate option (ie. the highest
  97. # version, not all of them).
  98. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
  99. bool
  100. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
  101. bool
  102. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
  103. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
  104. bool
  105. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
  106. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
  107. bool
  108. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
  109. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
  110. bool
  111. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
  112. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
  113. bool
  114. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
  115. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
  116. bool
  117. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
  118. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
  119. bool
  120. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
  121. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
  122. bool
  123. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
  124. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
  125. bool
  126. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
  127. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
  128. bool
  129. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
  130. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
  131. bool
  132. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
  133. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
  134. bool
  135. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
  136. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
  137. bool
  138. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
  139. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
  140. bool
  141. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
  142. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
  143. bool
  144. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
  145. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
  146. bool
  147. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
  148. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
  149. bool
  150. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
  151. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
  152. bool
  153. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
  154. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
  155. bool
  156. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
  157. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
  158. bool
  159. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
  160. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
  161. bool
  162. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
  163. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
  164. bool
  165. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
  166. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
  167. bool
  168. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
  169. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
  170. bool
  171. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
  172. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
  173. bool
  174. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
  175. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
  176. bool
  177. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
  178. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
  179. bool
  180. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
  181. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
  182. bool
  183. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
  184. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
  185. bool
  186. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
  187. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
  188. bool
  189. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
  190. # This order guarantees that the highest version is set, as kconfig
  191. # stops affecting a value on the first matching default.
  192. config BR2_TOOLCHAIN_HEADERS_AT_LEAST
  193. string
  194. default "4.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
  195. default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
  196. default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
  197. default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
  198. default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
  199. default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
  200. default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
  201. default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
  202. default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
  203. default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
  204. default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
  205. default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
  206. default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
  207. default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
  208. default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
  209. default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
  210. default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
  211. default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
  212. default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
  213. default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
  214. default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
  215. default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
  216. default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
  217. default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
  218. default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
  219. default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
  220. default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
  221. default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
  222. default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
  223. default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
  224. default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
  225. default "2.6"
  226. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
  227. bool
  228. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
  229. bool
  230. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
  231. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
  232. bool
  233. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
  234. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
  235. bool
  236. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
  237. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
  238. bool
  239. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
  240. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
  241. bool
  242. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
  243. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
  244. bool
  245. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
  246. config BR2_TOOLCHAIN_GCC_AT_LEAST_5
  247. bool
  248. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
  249. config BR2_TOOLCHAIN_GCC_AT_LEAST_6
  250. bool
  251. select BR2_TOOLCHAIN_GCC_AT_LEAST_5
  252. # This order guarantees that the highest version is set, as kconfig
  253. # stops affecting a value on the first matching default.
  254. config BR2_TOOLCHAIN_GCC_AT_LEAST
  255. string
  256. default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
  257. default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
  258. default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
  259. default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
  260. default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
  261. default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
  262. default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
  263. default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
  264. default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
  265. config BR2_TOOLCHAIN_HAS_SYNC_1
  266. bool
  267. default y
  268. depends on !BR2_bfin
  269. depends on !BR2_m68k_cf
  270. depends on !BR2_microblaze
  271. depends on !BR2_sparc
  272. depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
  273. config BR2_TOOLCHAIN_HAS_SYNC_2
  274. bool
  275. default y if BR2_TOOLCHAIN_HAS_SYNC_1
  276. config BR2_TOOLCHAIN_HAS_SYNC_4
  277. bool
  278. default y
  279. depends on !BR2_m68k_cf
  280. depends on !BR2_sparc
  281. depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
  282. # The availability of __sync for 8-byte types on ARM is somewhat
  283. # complicated:
  284. #
  285. # - It appeared in gcc starting with gcc 4.7.
  286. #
  287. # - On ARMv7, there is no problem, it can be directly implemented in
  288. # userspace.
  289. #
  290. # - On < ARMv7, it requires help from the kernel. Unfortunately, the
  291. # libgcc code implementing 8-byte __sync with the help from the
  292. # kernel calls __write() when a failure occurs, which is a function
  293. # internal to glibc, not available in uClibc and musl. This means
  294. # that the 8-byte __sync operations are not available on < ARMv7
  295. # with uClibc and musl. This problem was fixed as part of gcc
  296. # PR68059, which was backported to the gcc 5 branch, but isn't yet
  297. # part of any gcc 5.x release.
  298. #
  299. config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
  300. bool
  301. default y
  302. depends on BR2_arm || BR2_armeb
  303. depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
  304. depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
  305. # 8-byte intrinsics available on most x86 CPUs, except a few old ones
  306. config BR2_TOOLCHAIN_X86_HAS_SYNC_8
  307. bool
  308. default y
  309. depends on BR2_i386
  310. depends on !BR2_x86_i486
  311. depends on !BR2_x86_c3
  312. depends on !BR2_x86_winchip_c6
  313. depends on !BR2_x86_winchip2
  314. # 8-byte intrinsics available:
  315. # - On all 64 bits architecture
  316. # - On a certain combinations of ARM platforms
  317. # - On certain x86 32 bits CPUs
  318. config BR2_TOOLCHAIN_HAS_SYNC_8
  319. bool
  320. default y if BR2_ARCH_IS_64
  321. default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
  322. default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
  323. # libatomic is available since gcc 4.8, when thread support is
  324. # enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
  325. # part of the tuple, and is therefore not build on uclinux targets,
  326. # which is why BR2_BINFMT_FLAT configurations are excluded.
  327. config BR2_TOOLCHAIN_HAS_LIBATOMIC
  328. bool
  329. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
  330. BR2_TOOLCHAIN_HAS_THREADS && \
  331. !BR2_BINFMT_FLAT
  332. # __atomic intrinsics are available:
  333. # - with gcc 4.8, either through built-ins or libatomic, on all
  334. # architectures. Since we don't want to separate the cases where
  335. # libatomic is needed vs. not needed, we simplify thing and only
  336. # support situations where libatomic is available, even if on some
  337. # architectures libatomic is not strictly needed as all __atomic
  338. # intrinsics might be built-in. The only case where libatomic is
  339. # missing entirely is when the toolchain does not have support for
  340. # threads. However, a package that does not need threads but still
  341. # uses atomics is quite a corner case, which does not warrant the
  342. # added complexity.
  343. # - with gcc 4.7, libatomic did not exist, so only built-ins are
  344. # available. This means that __atomic can only be used in a subset
  345. # of the architectures
  346. config BR2_TOOLCHAIN_HAS_ATOMIC
  347. bool
  348. default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
  349. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
  350. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
  351. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
  352. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
  353. # - libquadmath is not needed/available on all architectures (but gcc
  354. # correctly handles this already).
  355. # - At least, libquadmath is available on:
  356. # - i*86
  357. # - x86_64
  358. # - When available, libquadmath requires wchar support.
  359. config BR2_TOOLCHAIN_HAS_LIBQUADMATH
  360. bool
  361. default y if BR2_i386 || BR2_x86_64