Config.in 10 KB

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