toolchain-common.in 14 KB

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