Config.in 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. # Copyright (C) 2006-2013 OpenWrt.org
  2. #
  3. # This is free software, licensed under the GNU General Public License v2.
  4. # See /LICENSE for more information.
  5. #
  6. menuconfig TARGET_OPTIONS
  7. bool "Target Options" if DEVEL
  8. config TARGET_OPTIMIZATION
  9. string "Target Optimizations" if TARGET_OPTIONS
  10. default DEFAULT_TARGET_OPTIMIZATION
  11. help
  12. Optimizations to use when building for the target host.
  13. config SOFT_FLOAT
  14. bool "Use software floating point by default" if TARGET_OPTIONS
  15. default y if !HAS_FPU
  16. depends on arm || armeb || powerpc || mipsel || mips || mips64el || mips64
  17. help
  18. If your target CPU does not have a Floating Point Unit (FPU) or a
  19. kernel FPU emulator, but you still wish to support floating point
  20. functions, then everything will need to be compiled with soft floating
  21. point support (-msoft-float).
  22. Most people will answer N.
  23. config USE_MIPS16
  24. bool "Build packages with MIPS16 instructions" if TARGET_OPTIONS
  25. depends on HAS_MIPS16
  26. default y
  27. help
  28. If your target CPU does support the MIPS16 instruction set
  29. and you want to use it for packages, enable this option.
  30. MIPS16 produces smaller binaries thus reducing pressure on
  31. caches and TLB.
  32. Most people will answer N.
  33. menuconfig EXTERNAL_TOOLCHAIN
  34. bool
  35. prompt "Use external toolchain" if DEVEL
  36. help
  37. If enabled, the buildroot will compile using an existing toolchain instead of
  38. compiling one.
  39. config NATIVE_TOOLCHAIN
  40. bool
  41. prompt "Use host's toolchain" if DEVEL
  42. depends on EXTERNAL_TOOLCHAIN
  43. select NO_STRIP
  44. help
  45. If enabled, the buildroot will compile using the native toolchain for your
  46. host instead of compiling one.
  47. config TARGET_NAME
  48. string
  49. prompt "Target name" if DEVEL
  50. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  51. default "aarch64-unknown-linux-gnu" if aarch64
  52. default "aarch64_be-unknown-linux-gnu" if aarch64_be
  53. default "arm-unknown-linux-gnu" if arm
  54. default "armeb-unknown-linux-gnu" if armeb
  55. default "i486-unknown-linux-gnu" if i386
  56. default "mips-unknown-linux-gnu" if mips
  57. default "mipsel-unknown-linux-gnu" if mipsel
  58. default "powerpc-unknown-linux-gnu" if powerpc
  59. default "x86_64-unknown-linux-gnu" if x86_64
  60. config TOOLCHAIN_PREFIX
  61. string
  62. prompt "Toolchain prefix" if DEVEL
  63. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  64. default "aarch64-unknown-linux-gnu" if aarch64
  65. default "aarch64_be-unknown-linux-gnu" if aarch64_be
  66. default "arm-unknown-linux-gnu-" if arm
  67. default "armeb-unknown-linux-gnu-" if armeb
  68. default "i486-unknown-linux-gnu-" if i386
  69. default "mips-unknown-linux-gnu-" if mips
  70. default "mipsel-unknown-linux-gnu-" if mipsel
  71. default "powerpc-unknown-linux-gnu-" if powerpc
  72. default "x86_64-unknown-linux-gnu-" if x86_64
  73. config TOOLCHAIN_ROOT
  74. string
  75. prompt "Toolchain root" if DEVEL
  76. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  77. default "/opt/cross/aarch64-unknown-linux-gnu" if aarch64
  78. default "/opt/cross/aarch64_be-unknown-linux-gnu" if aarch64_be
  79. default "/opt/cross/arm-unknown-linux-gnu" if arm
  80. default "/opt/cross/armeb-unknown-linux-gnu" if armeb
  81. default "/opt/cross/i486-unknown-linux-gnu" if i386
  82. default "/opt/cross/mips-unknown-linux-gnu" if mips
  83. default "/opt/cross/mipsel-unknown-linux-gnu" if mipsel
  84. default "/opt/cross/powerpc-unknown-linux-gnu" if powerpc
  85. default "/opt/cross/x86_64-unknown-linux-gnu" if x86_64
  86. choice TOOLCHAIN_LIBC_TYPE
  87. prompt "Toolchain libc" if DEVEL
  88. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  89. default EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
  90. help
  91. Specify the libc type used by the external toolchain. The given value
  92. is passed as -m flag to all gcc and g++ invocations. This is mainly
  93. intended for multilib toolchains which support glibc and uclibc at
  94. the same time. If no value is specified, no -m flag is passed.
  95. config EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC
  96. bool "glibc"
  97. select USE_GLIBC
  98. config EXTERNAL_TOOLCHAIN_LIBC_USE_UCLIBC
  99. bool "uClibc"
  100. select USE_UCLIBC
  101. depends on !(aarch64 || aarch64_be)
  102. config EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
  103. bool "musl"
  104. select USE_MUSL
  105. endchoice
  106. config TOOLCHAIN_LIBC
  107. string
  108. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  109. default "glibc" if EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC
  110. default "uclibc" if EXTERNAL_TOOLCHAIN_LIBC_USE_UCLIBC
  111. default "musl" if EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
  112. config TOOLCHAIN_BIN_PATH
  113. string
  114. prompt "Toolchain program path" if DEVEL
  115. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  116. default "./usr/bin ./bin"
  117. help
  118. Specify additional directories searched for toolchain binaries
  119. (override PATH). Use ./DIR for directories relative to the root above.
  120. config TOOLCHAIN_INC_PATH
  121. string
  122. prompt "Toolchain include path" if DEVEL
  123. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  124. default "./usr/include ./include"
  125. help
  126. Specify additional directories searched for header files (override
  127. CPPFLAGS). Use ./DIR for directories relative to the root above.
  128. config TOOLCHAIN_LIB_PATH
  129. string
  130. prompt "Toolchain library path" if DEVEL
  131. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  132. default "./usr/lib ./lib"
  133. help
  134. Specify additional directories searched for libraries (override LDFLAGS).
  135. Use ./DIR for directories relative to the root above.
  136. config NEED_TOOLCHAIN
  137. bool
  138. depends on DEVEL
  139. default y if !EXTERNAL_TOOLCHAIN
  140. menuconfig TOOLCHAINOPTS
  141. bool "Toolchain Options" if DEVEL
  142. depends on NEED_TOOLCHAIN
  143. menuconfig EXTRA_TARGET_ARCH
  144. bool
  145. prompt "Enable an extra toolchain target architecture" if TOOLCHAINOPTS
  146. depends on !sparc
  147. default n
  148. help
  149. Some builds may require a 'biarch' toolchain. This option
  150. allows you to specify an additional target arch.
  151. Most people will answer N here.
  152. config EXTRA_TARGET_ARCH_NAME
  153. string
  154. prompt "Extra architecture name" if EXTRA_TARGET_ARCH
  155. help
  156. Specify the cpu name (eg powerpc64 or x86_64) of the
  157. additional target architecture.
  158. config EXTRA_TARGET_ARCH_OPTS
  159. string
  160. prompt "Extra architecture compiler options" if EXTRA_TARGET_ARCH
  161. help
  162. If you're specifying an addition target architecture,
  163. you'll probably need to also provide options to make
  164. the compiler use this alternate arch.
  165. For example, if you're building a compiler that can build
  166. both powerpc and powerpc64 binaries, you'll need to
  167. specify -m64 here.
  168. choice
  169. prompt "MIPS64 user-land ABI" if TOOLCHAINOPTS && (mips64 || mips64el)
  170. default MIPS64_ABI_N64
  171. help
  172. MIPS64 supports 3 different user-land ABIs: o32 (legacy),
  173. n32 and n64.
  174. config MIPS64_ABI_N64
  175. bool "n64"
  176. config MIPS64_ABI_N32
  177. depends on !LIBC_USE_MUSL
  178. bool "n32"
  179. config MIPS64_ABI_O32
  180. bool "o32"
  181. endchoice
  182. comment "Binary tools"
  183. depends on TOOLCHAINOPTS
  184. source "toolchain/binutils/Config.in"
  185. comment "Compiler"
  186. depends on TOOLCHAINOPTS
  187. source "toolchain/gcc/Config.in"
  188. config NASM
  189. bool
  190. depends on ( i386 || x86_64 )
  191. prompt "Build nasm" if TOOLCHAINOPTS
  192. default y
  193. help
  194. Enable if you want to build nasm
  195. comment "C Library"
  196. depends on TOOLCHAINOPTS
  197. choice
  198. prompt "C Library implementation" if TOOLCHAINOPTS
  199. default LIBC_USE_UCLIBC if arc
  200. default LIBC_USE_GLIBC if powerpc64
  201. default LIBC_USE_MUSL
  202. help
  203. Select the C library implementation.
  204. config LIBC_USE_GLIBC
  205. bool "Use glibc"
  206. select USE_GLIBC
  207. depends on !arc
  208. config LIBC_USE_UCLIBC
  209. select USE_UCLIBC
  210. bool "Use uClibc"
  211. depends on !(aarch64 || aarch64_be || powerpc64)
  212. depends on BROKEN || !(arm || armeb || i386 || x86_64 || mips || mipsel || mips64 || mips64el || powerpc)
  213. config LIBC_USE_MUSL
  214. select USE_MUSL
  215. bool "Use musl"
  216. depends on !(arc || powerpc64)
  217. endchoice
  218. source "toolchain/uClibc/Config.in"
  219. source "toolchain/musl/Config.in"
  220. comment "Debuggers"
  221. depends on TOOLCHAINOPTS
  222. config GDB
  223. bool
  224. prompt "Build gdb" if TOOLCHAINOPTS
  225. default y if !EXTERNAL_TOOLCHAIN
  226. help
  227. Enable if you want to build the gdb.
  228. config USE_GLIBC
  229. default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (powerpc64)
  230. bool
  231. config USE_UCLIBC
  232. default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (arc)
  233. bool
  234. config USE_MUSL
  235. default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc || powerpc64)
  236. bool
  237. config SSP_SUPPORT
  238. default y if USE_MUSL || GCC_LIBSSP
  239. bool
  240. config USE_EXTERNAL_LIBC
  241. bool
  242. default y if EXTERNAL_TOOLCHAIN || NATIVE_TOOLCHAIN
  243. source "toolchain/binutils/Config.version"
  244. source "toolchain/gcc/Config.version"
  245. config LIBC
  246. string
  247. default "glibc" if USE_GLIBC
  248. default "uClibc" if USE_UCLIBC
  249. default "musl" if USE_MUSL
  250. config TARGET_SUFFIX
  251. string
  252. default "gnueabi" if USE_GLIBC && (arm || armeb)
  253. default "gnu" if USE_GLIBC && !(arm || armeb)
  254. default "uclibcgnueabi" if USE_UCLIBC && (arm || armeb)
  255. default "uclibc" if USE_UCLIBC && !(arm || armeb)
  256. default "muslgnueabi" if USE_MUSL && (arm || armeb)
  257. default "musl" if USE_MUSL && !(arm || armeb)
  258. config MIPS64_ABI
  259. depends on mips64 || mips64el
  260. string
  261. default "64" if MIPS64_ABI_N64
  262. default "n32" if MIPS64_ABI_N32
  263. default "32" if MIPS64_ABI_O32
  264. default "64"