Config.in 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  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. choice BPF_TOOLCHAIN
  34. prompt "BPF toolchain" if DEVEL
  35. default BPF_TOOLCHAIN_BUILD_LLVM if BUILDBOT
  36. default BPF_TOOLCHAIN_NONE
  37. config BPF_TOOLCHAIN_NONE
  38. bool "None"
  39. config BPF_TOOLCHAIN_HOST
  40. select USE_LLVM_HOST
  41. bool "Use host LLVM toolchain"
  42. config BPF_TOOLCHAIN_BUILD_LLVM
  43. select USE_LLVM_BUILD
  44. bool "Build LLVM toolchain for eBPF"
  45. help
  46. If enabled, a LLVM toolchain for building eBPF binaries will be built.
  47. If this is not enabled, eBPF packages can only be built if the host
  48. has a suitable toolchain
  49. endchoice
  50. config BPF_TOOLCHAIN_HOST_PATH
  51. string
  52. depends on BPF_TOOLCHAIN_HOST
  53. prompt "Host LLVM toolchain path (prefix)" if DEVEL
  54. default "/usr/local/opt/llvm" if HOST_OS_MACOS
  55. default ""
  56. menuconfig EXTERNAL_TOOLCHAIN
  57. bool
  58. prompt "Use external toolchain" if DEVEL
  59. help
  60. If enabled, the buildroot will compile using an existing toolchain instead of
  61. compiling one.
  62. config NATIVE_TOOLCHAIN
  63. bool
  64. prompt "Use host's toolchain" if DEVEL
  65. depends on EXTERNAL_TOOLCHAIN
  66. select NO_STRIP
  67. help
  68. If enabled, the buildroot will compile using the native toolchain for your
  69. host instead of compiling one.
  70. config TARGET_NAME
  71. string
  72. prompt "Target name" if DEVEL
  73. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  74. default "aarch64-unknown-linux-gnu" if aarch64
  75. default "aarch64_be-unknown-linux-gnu" if aarch64_be
  76. default "arm-unknown-linux-gnu" if arm
  77. default "armeb-unknown-linux-gnu" if armeb
  78. default "i486-unknown-linux-gnu" if i386
  79. default "mips-unknown-linux-gnu" if mips
  80. default "mipsel-unknown-linux-gnu" if mipsel
  81. default "powerpc-unknown-linux-gnu" if powerpc
  82. default "x86_64-unknown-linux-gnu" if x86_64
  83. config TOOLCHAIN_PREFIX
  84. string
  85. prompt "Toolchain prefix" if DEVEL
  86. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  87. default "aarch64-unknown-linux-gnu" if aarch64
  88. default "aarch64_be-unknown-linux-gnu" if aarch64_be
  89. default "arm-unknown-linux-gnu-" if arm
  90. default "armeb-unknown-linux-gnu-" if armeb
  91. default "i486-unknown-linux-gnu-" if i386
  92. default "mips-unknown-linux-gnu-" if mips
  93. default "mipsel-unknown-linux-gnu-" if mipsel
  94. default "powerpc-unknown-linux-gnu-" if powerpc
  95. default "x86_64-unknown-linux-gnu-" if x86_64
  96. config TOOLCHAIN_ROOT
  97. string
  98. prompt "Toolchain root" if DEVEL
  99. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  100. default "/opt/cross/aarch64-unknown-linux-gnu" if aarch64
  101. default "/opt/cross/aarch64_be-unknown-linux-gnu" if aarch64_be
  102. default "/opt/cross/arm-unknown-linux-gnu" if arm
  103. default "/opt/cross/armeb-unknown-linux-gnu" if armeb
  104. default "/opt/cross/i486-unknown-linux-gnu" if i386
  105. default "/opt/cross/mips-unknown-linux-gnu" if mips
  106. default "/opt/cross/mipsel-unknown-linux-gnu" if mipsel
  107. default "/opt/cross/powerpc-unknown-linux-gnu" if powerpc
  108. default "/opt/cross/x86_64-unknown-linux-gnu" if x86_64
  109. choice TOOLCHAIN_LIBC_TYPE
  110. prompt "Toolchain libc" if DEVEL
  111. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  112. default EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
  113. help
  114. Specify the libc type used by the external toolchain. The given value
  115. is passed as -m flag to all gcc and g++ invocations. This is mainly
  116. intended for multilib toolchains which support glibc and uclibc at
  117. the same time. If no value is specified, no -m flag is passed.
  118. config EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC
  119. bool "glibc"
  120. select USE_GLIBC
  121. config EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
  122. bool "musl"
  123. select USE_MUSL
  124. endchoice
  125. config TOOLCHAIN_LIBC
  126. string
  127. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  128. default "glibc" if EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC
  129. default "musl" if EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
  130. config TOOLCHAIN_BIN_PATH
  131. string
  132. prompt "Toolchain program path" if DEVEL
  133. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  134. default "./usr/bin ./bin"
  135. help
  136. Specify additional directories searched for toolchain binaries
  137. (override PATH). Use ./DIR for directories relative to the root above.
  138. config TOOLCHAIN_INC_PATH
  139. string
  140. prompt "Toolchain include path" if DEVEL
  141. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  142. default "./usr/include ./include"
  143. help
  144. Specify additional directories searched for header files (override
  145. CPPFLAGS). Use ./DIR for directories relative to the root above.
  146. config TOOLCHAIN_LIB_PATH
  147. string
  148. prompt "Toolchain library path" if DEVEL
  149. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  150. default "./usr/lib ./lib"
  151. help
  152. Specify additional directories searched for libraries (override LDFLAGS).
  153. Use ./DIR for directories relative to the root above.
  154. config NEED_TOOLCHAIN
  155. bool
  156. depends on DEVEL
  157. default y if !EXTERNAL_TOOLCHAIN
  158. menuconfig TOOLCHAINOPTS
  159. bool "Toolchain Options" if DEVEL
  160. depends on NEED_TOOLCHAIN
  161. menuconfig EXTRA_TARGET_ARCH
  162. bool
  163. prompt "Enable an extra toolchain target architecture" if TOOLCHAINOPTS
  164. depends on !sparc
  165. default n
  166. help
  167. Some builds may require a 'biarch' toolchain. This option
  168. allows you to specify an additional target arch.
  169. Most people will answer N here.
  170. config EXTRA_TARGET_ARCH_NAME
  171. string
  172. prompt "Extra architecture name" if EXTRA_TARGET_ARCH
  173. help
  174. Specify the cpu name (eg powerpc64 or x86_64) of the
  175. additional target architecture.
  176. config EXTRA_TARGET_ARCH_OPTS
  177. string
  178. prompt "Extra architecture compiler options" if EXTRA_TARGET_ARCH
  179. help
  180. If you're specifying an addition target architecture,
  181. you'll probably need to also provide options to make
  182. the compiler use this alternate arch.
  183. For example, if you're building a compiler that can build
  184. both powerpc and powerpc64 binaries, you'll need to
  185. specify -m64 here.
  186. choice
  187. prompt "MIPS64 user-land ABI" if TOOLCHAINOPTS && (mips64 || mips64el)
  188. default MIPS64_ABI_N64
  189. help
  190. MIPS64 supports 3 different user-land ABIs: o32 (legacy),
  191. n32 and n64.
  192. config MIPS64_ABI_N64
  193. bool "n64"
  194. config MIPS64_ABI_N32
  195. depends on !LIBC_USE_MUSL
  196. bool "n32"
  197. config MIPS64_ABI_O32
  198. bool "o32"
  199. endchoice
  200. comment "Binary tools"
  201. depends on TOOLCHAINOPTS
  202. source "toolchain/binutils/Config.in"
  203. comment "Compiler"
  204. depends on TOOLCHAINOPTS
  205. source "toolchain/gcc/Config.in"
  206. config NASM
  207. bool
  208. depends on ( i386 || x86_64 )
  209. prompt "Build nasm" if TOOLCHAINOPTS
  210. default y
  211. help
  212. Enable if you want to build nasm
  213. comment "C Library"
  214. depends on TOOLCHAINOPTS
  215. choice
  216. prompt "C Library implementation" if TOOLCHAINOPTS
  217. default LIBC_USE_GLIBC if arc
  218. default LIBC_USE_MUSL
  219. help
  220. Select the C library implementation.
  221. config LIBC_USE_GLIBC
  222. bool "Use glibc"
  223. select USE_GLIBC
  224. config LIBC_USE_MUSL
  225. select USE_MUSL
  226. bool "Use musl"
  227. depends on !arc
  228. endchoice
  229. source "toolchain/musl/Config.in"
  230. comment "Debuggers"
  231. depends on TOOLCHAINOPTS
  232. config GDB
  233. bool
  234. prompt "Build gdb" if TOOLCHAINOPTS
  235. default y if !EXTERNAL_TOOLCHAIN
  236. help
  237. Enable if you want to build the gdb.
  238. config GDB_PYTHON
  239. bool
  240. depends on GDB
  241. prompt "Build gdb with python binding"
  242. help
  243. Enable the python bindings for GDB to allow using python in the gdb shell.
  244. config HAS_BPF_TOOLCHAIN
  245. bool
  246. config USE_LLVM_HOST
  247. select HAS_BPF_TOOLCHAIN
  248. bool
  249. config USE_LLVM_BUILD
  250. default y if !DEVEL && BUILDBOT
  251. select HAS_BPF_TOOLCHAIN
  252. bool
  253. config USE_GLIBC
  254. default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (arc)
  255. bool
  256. config USE_MUSL
  257. default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc)
  258. bool
  259. config SSP_SUPPORT
  260. default y if !PKG_CC_STACKPROTECTOR_NONE
  261. bool
  262. config USE_EXTERNAL_LIBC
  263. bool
  264. default y if EXTERNAL_TOOLCHAIN || NATIVE_TOOLCHAIN
  265. source "toolchain/binutils/Config.version"
  266. source "toolchain/gcc/Config.version"
  267. config LIBC
  268. string
  269. default "glibc" if USE_GLIBC
  270. default "musl" if USE_MUSL
  271. config TARGET_SUFFIX
  272. string
  273. default "gnueabi" if USE_GLIBC && (arm || armeb)
  274. default "gnu" if USE_GLIBC && !(arm || armeb)
  275. default "muslgnueabi" if USE_MUSL && (arm || armeb)
  276. default "musl" if USE_MUSL && !(arm || armeb)
  277. config MIPS64_ABI
  278. depends on mips64 || mips64el
  279. string
  280. default "64" if MIPS64_ABI_N64
  281. default "n32" if MIPS64_ABI_N32
  282. default "32" if MIPS64_ABI_O32
  283. default "64"