Config.in 8.7 KB

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