toolchain-common.in 14 KB

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