toolchain-common.in 12 KB

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