Config.in 10 KB

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