toolchain-common.in 12 KB

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