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