Config.in 8.3 KB

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