Config.in 10 KB

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