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://sourceware.org/bugzilla/show_bug.cgi?id=19615
  8. # Affect toolchains built with binutils 2.26 (fixed in binutils 2.26.1).
  9. config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19615
  10. bool
  11. # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
  12. # exception_ptr, nested_exception, and future from libstdc++ are not
  13. # available for architectures not supporting always lock-free atomic
  14. # ints before GCC 7
  15. config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
  16. bool
  17. default y if BR2_nios2
  18. default y if BR2_ARM_CPU_ARMV4
  19. default y if BR2_ARM_CPU_ARMV5
  20. default y if BR2_sparc_v8
  21. # https://sourceware.org/bugzilla/show_bug.cgi?id=19405
  22. config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405
  23. bool
  24. config BR2_TOOLCHAIN_HAS_NATIVE_RPC
  25. bool
  26. config BR2_USE_WCHAR
  27. bool
  28. config BR2_ENABLE_LOCALE
  29. bool
  30. config BR2_INSTALL_LIBSTDCPP
  31. bool
  32. config BR2_TOOLCHAIN_HAS_FORTRAN
  33. bool
  34. config BR2_TOOLCHAIN_HAS_THREADS
  35. bool
  36. config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
  37. bool
  38. config BR2_TOOLCHAIN_HAS_THREADS_NPTL
  39. bool
  40. config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
  41. bool
  42. config BR2_TOOLCHAIN_HAS_SSP
  43. bool
  44. config BR2_TOOLCHAIN_SUPPORTS_PIE
  45. bool
  46. config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
  47. bool "Copy gconv libraries"
  48. depends on BR2_TOOLCHAIN_USES_GLIBC
  49. help
  50. The gconv libraries are used to convert between different
  51. character sets (charsets).
  52. Say 'y' if you need to store and/or display different charsets.
  53. config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
  54. string "Gconv libraries to copy"
  55. depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
  56. help
  57. Set to the list of gconv libraries to copy.
  58. Leave empty to copy all gconv libraries.
  59. Specify only the basename of the libraries, leave
  60. out the .so extension. Eg.:
  61. IBM850 ISO8859-15 UNICODE
  62. Note: the full set of gconv libs are ~8MiB (on ARM).
  63. # glibc and eglibc directly include gettext, so a separatly compiled
  64. # gettext isn't needed and shouldn't be built to avoid conflicts. Some
  65. # packages always need gettext, other packages only need gettext when
  66. # locale support is enabled. See the documentation for how packages
  67. # should rely on the following two options.
  68. config BR2_NEEDS_GETTEXT
  69. bool
  70. default y if BR2_TOOLCHAIN_USES_UCLIBC
  71. config BR2_NEEDS_GETTEXT_IF_LOCALE
  72. bool
  73. default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE)
  74. config BR2_USE_MMU
  75. bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
  76. default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY
  77. help
  78. If your target has a MMU, you should say Y here. If you
  79. are unsure, just say Y.
  80. config BR2_TARGET_OPTIMIZATION
  81. string "Target Optimizations"
  82. default ""
  83. help
  84. Optimizations to use when building for the target host.
  85. NOTE: gcc optimization level is defined in build options.
  86. config BR2_TARGET_LDFLAGS
  87. string "Target linker options"
  88. help
  89. Extra options to pass to the linker when building for the target.
  90. Note that options with a '$' sign (eg. -Wl,-rpath='$ORIGIN/../lib')
  91. are not supported.
  92. config BR2_ECLIPSE_REGISTER
  93. bool "Register toolchain within Eclipse Buildroot plug-in"
  94. help
  95. This options tells Buildroot to generate the necessary
  96. configuration files to make your toolchain appear within
  97. Eclipse, through the Eclipse Buildroot plugin.
  98. # Options for packages to depend on, if they require at least a
  99. # specific version of the kernel headers.
  100. # Toolchains should choose the adequate option (ie. the highest
  101. # version, not all of them).
  102. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
  103. bool
  104. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
  105. bool
  106. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
  107. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
  108. bool
  109. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
  110. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
  111. bool
  112. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
  113. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
  114. bool
  115. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
  116. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
  117. bool
  118. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
  119. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
  120. bool
  121. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
  122. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
  123. bool
  124. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
  125. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
  126. bool
  127. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
  128. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
  129. bool
  130. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
  131. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
  132. bool
  133. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
  134. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
  135. bool
  136. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
  137. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
  138. bool
  139. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
  140. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
  141. bool
  142. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
  143. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
  144. bool
  145. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
  146. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
  147. bool
  148. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
  149. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
  150. bool
  151. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
  152. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
  153. bool
  154. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
  155. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
  156. bool
  157. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
  158. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
  159. bool
  160. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
  161. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
  162. bool
  163. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
  164. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
  165. bool
  166. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
  167. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
  168. bool
  169. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
  170. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
  171. bool
  172. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
  173. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
  174. bool
  175. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
  176. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
  177. bool
  178. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
  179. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
  180. bool
  181. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
  182. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
  183. bool
  184. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
  185. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
  186. bool
  187. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
  188. config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
  189. bool
  190. select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
  191. # This order guarantees that the highest version is set, as kconfig
  192. # stops affecting a value on the first matching default.
  193. config BR2_TOOLCHAIN_HEADERS_AT_LEAST
  194. string
  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