toolchain-common.in 12 KB

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