toolchain-common.in 14 KB

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