2
1

toolchain-common.in 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412
  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. # This order guarantees that the highest version is set, as kconfig
  171. # stops affecting a value on the first matching default.
  172. config BR2_TOOLCHAIN_HEADERS_AT_LEAST
  173. string
  174. default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
  175. default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
  176. default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
  177. default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
  178. default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
  179. default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
  180. default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
  181. default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
  182. default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
  183. default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
  184. default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
  185. default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
  186. default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
  187. default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
  188. default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
  189. default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
  190. default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
  191. default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
  192. default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
  193. default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
  194. default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
  195. default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
  196. default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
  197. default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
  198. default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
  199. default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
  200. default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
  201. default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
  202. default "2.6"
  203. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
  204. bool
  205. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
  206. bool
  207. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
  208. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
  209. bool
  210. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
  211. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
  212. bool
  213. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
  214. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
  215. bool
  216. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
  217. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
  218. bool
  219. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
  220. config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
  221. bool
  222. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
  223. config BR2_TOOLCHAIN_GCC_AT_LEAST_5
  224. bool
  225. select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
  226. config BR2_TOOLCHAIN_GCC_AT_LEAST_6
  227. bool
  228. select BR2_TOOLCHAIN_GCC_AT_LEAST_5
  229. # This order guarantees that the highest version is set, as kconfig
  230. # stops affecting a value on the first matching default.
  231. config BR2_TOOLCHAIN_GCC_AT_LEAST
  232. string
  233. default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
  234. default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
  235. default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
  236. default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
  237. default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
  238. default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
  239. default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
  240. default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
  241. default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
  242. config BR2_TOOLCHAIN_HAS_SYNC_1
  243. bool
  244. default y
  245. depends on !BR2_bfin
  246. depends on !BR2_m68k_cf
  247. depends on !BR2_microblaze
  248. depends on !BR2_sparc
  249. depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
  250. config BR2_TOOLCHAIN_HAS_SYNC_2
  251. bool
  252. default y if BR2_TOOLCHAIN_HAS_SYNC_1
  253. config BR2_TOOLCHAIN_HAS_SYNC_4
  254. bool
  255. default y
  256. depends on !BR2_m68k_cf
  257. depends on !BR2_sparc
  258. depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
  259. # The availability of __sync for 8-byte types on ARM is somewhat
  260. # complicated:
  261. #
  262. # - It appeared in gcc starting with gcc 4.7.
  263. #
  264. # - On ARMv7, there is no problem, it can be directly implemented in
  265. # userspace.
  266. #
  267. # - On < ARMv7, it requires help from the kernel. Unfortunately, the
  268. # libgcc code implementing 8-byte __sync with the help from the
  269. # kernel calls __write() when a failure occurs, which is a function
  270. # internal to glibc, not available in uClibc and musl. This means
  271. # that the 8-byte __sync operations are not available on < ARMv7
  272. # with uClibc and musl. This problem was fixed as part of gcc
  273. # PR68059, which was backported to the gcc 5 branch, but isn't yet
  274. # part of any gcc 5.x release.
  275. #
  276. config BR2_TOOLCHAIN_ARM_HAS_SYNC_8
  277. bool
  278. default y
  279. depends on BR2_arm || BR2_armeb
  280. depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
  281. depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A
  282. # 8-byte intrinsics available on most x86 CPUs, except a few old ones
  283. config BR2_TOOLCHAIN_X86_HAS_SYNC_8
  284. bool
  285. default y
  286. depends on BR2_i386
  287. depends on !BR2_x86_i486
  288. depends on !BR2_x86_c3
  289. depends on !BR2_x86_winchip_c6
  290. depends on !BR2_x86_winchip2
  291. # 8-byte intrinsics available:
  292. # - On all 64 bits architecture
  293. # - On a certain combinations of ARM platforms
  294. # - On certain x86 32 bits CPUs
  295. config BR2_TOOLCHAIN_HAS_SYNC_8
  296. bool
  297. default y if BR2_ARCH_IS_64
  298. default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8
  299. default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8
  300. # libatomic is available since gcc 4.8, when thread support is
  301. # enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS
  302. # part of the tuple, and is therefore not build on uclinux targets,
  303. # which is why BR2_BINFMT_FLAT configurations are excluded.
  304. config BR2_TOOLCHAIN_HAS_LIBATOMIC
  305. bool
  306. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
  307. BR2_TOOLCHAIN_HAS_THREADS && \
  308. !BR2_BINFMT_FLAT
  309. # __atomic intrinsics are available:
  310. # - with gcc 4.8, either through built-ins or libatomic, on all
  311. # architectures. Since we don't want to separate the cases where
  312. # libatomic is needed vs. not needed, we simplify thing and only
  313. # support situations where libatomic is available, even if on some
  314. # architectures libatomic is not strictly needed as all __atomic
  315. # intrinsics might be built-in. The only case where libatomic is
  316. # missing entirely is when the toolchain does not have support for
  317. # threads. However, a package that does not need threads but still
  318. # uses atomics is quite a corner case, which does not warrant the
  319. # added complexity.
  320. # - with gcc 4.7, libatomic did not exist, so only built-ins are
  321. # available. This means that __atomic can only be used in a subset
  322. # of the architectures
  323. config BR2_TOOLCHAIN_HAS_ATOMIC
  324. bool
  325. default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
  326. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
  327. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
  328. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
  329. default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64
  330. # - libquadmath is not needed/available on all architectures (but gcc
  331. # correctly handles this already).
  332. # - At least, libquadmath is available on:
  333. # - i*86
  334. # - x86_64
  335. # - When available, libquadmath requires wchar support.
  336. config BR2_TOOLCHAIN_HAS_LIBQUADMATH
  337. bool
  338. default y if BR2_i386 || BR2_x86_64