toolchain-common.in 14 KB

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