toolchain-common.in 13 KB

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