Config.in 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  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 EXTERNAL_GCC_VERSION
  131. string
  132. prompt "External Toolchain GCC Version" if DEVEL
  133. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  134. help
  135. Manually specify the GCC version used by the selected
  136. external toolchain.
  137. config TOOLCHAIN_LIBC
  138. string
  139. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  140. default "glibc" if EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC
  141. default "musl" if EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
  142. config TOOLCHAIN_BIN_PATH
  143. string
  144. prompt "Toolchain program path" if DEVEL
  145. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  146. default "./usr/bin ./bin"
  147. help
  148. Specify additional directories searched for toolchain binaries
  149. (override PATH). Use ./DIR for directories relative to the root above.
  150. config TOOLCHAIN_INC_PATH
  151. string
  152. prompt "Toolchain include path" if DEVEL
  153. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  154. default "./usr/include ./include/fortify ./include" if EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
  155. default "./usr/include ./include"
  156. help
  157. Specify additional directories searched for header files (override
  158. CPPFLAGS). Use ./DIR for directories relative to the root above.
  159. config TOOLCHAIN_LIB_PATH
  160. string
  161. prompt "Toolchain library path" if DEVEL
  162. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  163. default "./usr/lib ./lib"
  164. help
  165. Specify additional directories searched for libraries (override LDFLAGS).
  166. Use ./DIR for directories relative to the root above.
  167. config NEED_TOOLCHAIN
  168. bool
  169. depends on DEVEL
  170. default y if !EXTERNAL_TOOLCHAIN
  171. menuconfig TOOLCHAINOPTS
  172. bool "Toolchain Options" if DEVEL
  173. depends on NEED_TOOLCHAIN
  174. menuconfig EXTRA_TARGET_ARCH
  175. bool
  176. prompt "Enable an extra toolchain target architecture" if TOOLCHAINOPTS
  177. depends on !sparc
  178. help
  179. Some builds may require a 'biarch' toolchain. This option
  180. allows you to specify an additional target arch.
  181. Most people will answer N here.
  182. config EXTRA_TARGET_ARCH_NAME
  183. string
  184. prompt "Extra architecture name" if EXTRA_TARGET_ARCH
  185. help
  186. Specify the cpu name (eg powerpc64 or x86_64) of the
  187. additional target architecture.
  188. config EXTRA_TARGET_ARCH_OPTS
  189. string
  190. prompt "Extra architecture compiler options" if EXTRA_TARGET_ARCH
  191. help
  192. If you're specifying an addition target architecture,
  193. you'll probably need to also provide options to make
  194. the compiler use this alternate arch.
  195. For example, if you're building a compiler that can build
  196. both powerpc and powerpc64 binaries, you'll need to
  197. specify -m64 here.
  198. choice
  199. prompt "MIPS64 user-land ABI" if TOOLCHAINOPTS && (mips64 || mips64el)
  200. default MIPS64_ABI_N64
  201. help
  202. MIPS64 supports 3 different user-land ABIs: o32 (legacy),
  203. n32 and n64.
  204. config MIPS64_ABI_N64
  205. bool "n64"
  206. config MIPS64_ABI_N32
  207. depends on !LIBC_USE_MUSL
  208. bool "n32"
  209. config MIPS64_ABI_O32
  210. bool "o32"
  211. endchoice
  212. comment "Binary tools"
  213. depends on TOOLCHAINOPTS
  214. source "toolchain/binutils/Config.in"
  215. config DWARVES
  216. bool
  217. prompt "Build pahole" if TOOLCHAINOPTS
  218. depends on !HOST_OS_MACOS
  219. help
  220. Enable if you want to build pahole and the dwarves tools.
  221. comment "Compiler"
  222. depends on TOOLCHAINOPTS
  223. source "toolchain/gcc/Config.in"
  224. config NASM
  225. bool
  226. depends on ( i386 || x86_64 )
  227. prompt "Build nasm" if TOOLCHAINOPTS
  228. default y
  229. help
  230. Enable if you want to build nasm
  231. comment "C Library"
  232. depends on TOOLCHAINOPTS
  233. choice
  234. prompt "C Library implementation" if TOOLCHAINOPTS
  235. default LIBC_USE_GLIBC if arc
  236. default LIBC_USE_MUSL
  237. help
  238. Select the C library implementation.
  239. config LIBC_USE_GLIBC
  240. bool "Use glibc"
  241. select USE_GLIBC
  242. config LIBC_USE_MUSL
  243. select USE_MUSL
  244. bool "Use musl"
  245. depends on !arc
  246. endchoice
  247. source "toolchain/musl/Config.in"
  248. comment "Debuggers"
  249. depends on TOOLCHAINOPTS
  250. config GDB
  251. bool
  252. prompt "Build gdb" if TOOLCHAINOPTS
  253. default y if !EXTERNAL_TOOLCHAIN
  254. help
  255. Enable if you want to build the gdb.
  256. config GDB_PYTHON
  257. bool
  258. depends on GDB
  259. prompt "Build gdb with python binding"
  260. help
  261. Enable the python bindings for GDB to allow using python in the gdb shell.
  262. config HAS_BPF_TOOLCHAIN
  263. bool
  264. config HAS_PREBUILT_LLVM_TOOLCHAIN
  265. def_bool $(shell, [ -f llvm-bpf/.llvm-version ] && echo y || echo n)
  266. config USE_LLVM_HOST
  267. select HAS_BPF_TOOLCHAIN
  268. bool
  269. config USE_LLVM_PREBUILT
  270. select HAS_BPF_TOOLCHAIN
  271. default y if !DEVEL && !BUILDBOT && HAS_PREBUILT_LLVM_TOOLCHAIN
  272. bool
  273. config USE_LLVM_BUILD
  274. default y if !DEVEL && BUILDBOT
  275. select HAS_BPF_TOOLCHAIN
  276. bool
  277. config USE_GLIBC
  278. default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (arc)
  279. bool
  280. config USE_MUSL
  281. default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc)
  282. bool
  283. config SSP_SUPPORT
  284. default y if !PKG_CC_STACKPROTECTOR_NONE
  285. bool
  286. config USE_EXTERNAL_LIBC
  287. bool
  288. default y if EXTERNAL_TOOLCHAIN || NATIVE_TOOLCHAIN
  289. source "toolchain/binutils/Config.version"
  290. source "toolchain/gcc/Config.version"
  291. config LIBC
  292. string
  293. default "glibc" if USE_GLIBC
  294. default "musl" if USE_MUSL
  295. config TARGET_SUFFIX
  296. string
  297. default "gnueabi" if USE_GLIBC && (arm || armeb)
  298. default "gnu" if USE_GLIBC && !(arm || armeb)
  299. default "muslgnueabi" if USE_MUSL && (arm || armeb)
  300. default "musl" if USE_MUSL && !(arm || armeb)
  301. config MIPS64_ABI
  302. depends on mips64 || mips64el
  303. string
  304. default "64" if MIPS64_ABI_N64
  305. default "n32" if MIPS64_ABI_N32
  306. default "32" if MIPS64_ABI_O32
  307. default "64"