toolchain-common.in 14 KB

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