toolchain-common.in 12 KB

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