Config.in 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  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, OpenWrt 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, OpenWrt 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. config TOOLCHAIN_LIBC
  87. string
  88. prompt "Toolchain libc" if DEVEL
  89. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  90. default "uclibc"
  91. help
  92. Specify the libc type used by the external toolchain. The given value
  93. is passed as -m flag to all gcc and g++ invocations. This is mainly
  94. intended for multilib toolchains which support glibc and uclibc at
  95. the same time. If no value is specified, no -m flag is passed.
  96. config TOOLCHAIN_BIN_PATH
  97. string
  98. prompt "Toolchain program path" if DEVEL
  99. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  100. default "./usr/bin ./bin"
  101. help
  102. Specify additional directories searched for toolchain binaries
  103. (override PATH). Use ./DIR for directories relative to the root above.
  104. config TOOLCHAIN_INC_PATH
  105. string
  106. prompt "Toolchain include path" if DEVEL
  107. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  108. default "./usr/include ./include"
  109. help
  110. Specify additional directories searched for header files (override
  111. CPPFLAGS). Use ./DIR for directories relative to the root above.
  112. config TOOLCHAIN_LIB_PATH
  113. string
  114. prompt "Toolchain library path" if DEVEL
  115. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  116. default "./usr/lib ./lib"
  117. help
  118. Specify additional directories searched for libraries (override LDFLAGS).
  119. Use ./DIR for directories relative to the root above.
  120. config NEED_TOOLCHAIN
  121. bool
  122. depends on DEVEL
  123. default y if !EXTERNAL_TOOLCHAIN
  124. menuconfig TOOLCHAINOPTS
  125. bool "Toolchain Options" if DEVEL
  126. depends on NEED_TOOLCHAIN
  127. menuconfig EXTRA_TARGET_ARCH
  128. bool
  129. prompt "Enable an extra toolchain target architecture" if TOOLCHAINOPTS
  130. depends on !sparc
  131. default y if powerpc64
  132. default n
  133. help
  134. Some builds may require a 'biarch' toolchain. This option
  135. allows you to specify an additional target arch.
  136. Most people will answer N here.
  137. config EXTRA_TARGET_ARCH_NAME
  138. string
  139. default "powerpc64" if powerpc64
  140. prompt "Extra architecture name" if EXTRA_TARGET_ARCH
  141. help
  142. Specify the cpu name (eg powerpc64 or x86_64) of the
  143. additional target architecture.
  144. config EXTRA_TARGET_ARCH_OPTS
  145. string
  146. default "-m64" if powerpc64
  147. prompt "Extra architecture compiler options" if EXTRA_TARGET_ARCH
  148. help
  149. If you're specifying an addition target architecture,
  150. you'll probably need to also provide options to make
  151. the compiler use this alternate arch.
  152. For example, if you're building a compiler that can build
  153. both powerpc and powerpc64 binaries, you'll need to
  154. specify -m64 here.
  155. choice
  156. prompt "MIPS64 user-land ABI" if TOOLCHAINOPTS && (mips64 || mips64el)
  157. default MIPS64_ABI_N64
  158. help
  159. MIPS64 supports 3 different user-land ABIs: o32 (legacy),
  160. n32 and n64.
  161. config MIPS64_ABI_N64
  162. bool "n64"
  163. config MIPS64_ABI_N32
  164. depends on !LIBC_USE_MUSL
  165. bool "n32"
  166. config MIPS64_ABI_O32
  167. bool "o32"
  168. endchoice
  169. comment "Binary tools"
  170. depends on TOOLCHAINOPTS
  171. source "toolchain/binutils/Config.in"
  172. comment "Compiler"
  173. depends on TOOLCHAINOPTS
  174. source "toolchain/gcc/Config.in"
  175. comment "C Library"
  176. depends on TOOLCHAINOPTS
  177. choice
  178. prompt "C Library implementation" if TOOLCHAINOPTS
  179. default LIBC_USE_UCLIBC if arc
  180. default LIBC_USE_MUSL
  181. help
  182. Select the C library implementation.
  183. config LIBC_USE_GLIBC
  184. bool "Use (e)glibc"
  185. select USE_GLIBC
  186. depends on !arc
  187. config LIBC_USE_UCLIBC
  188. select USE_UCLIBC
  189. bool "Use uClibc"
  190. depends on !(aarch64 || aarch64_be)
  191. depends on BROKEN || !(arm || armeb || i386 || x86_64 || mips || mipsel || mips64 || mips64el || powerpc)
  192. config LIBC_USE_MUSL
  193. select USE_MUSL
  194. bool "Use musl"
  195. depends on !(arc)
  196. endchoice
  197. source "toolchain/glibc/Config.in"
  198. source "toolchain/uClibc/Config.in"
  199. comment "Debuggers"
  200. depends on TOOLCHAINOPTS
  201. config GDB
  202. bool
  203. depends on !(aarch64 || aarch64_be)
  204. prompt "Build gdb" if TOOLCHAINOPTS
  205. default y if !EXTERNAL_TOOLCHAIN
  206. help
  207. Enable if you want to build the gdb.
  208. config INSIGHT
  209. bool
  210. prompt "Build insight-gdb" if TOOLCHAINOPTS
  211. select GDB
  212. default n
  213. help
  214. Enable if you want to build insight-gdb.
  215. config USE_GLIBC
  216. bool
  217. config USE_UCLIBC
  218. default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (arc)
  219. bool
  220. config USE_MUSL
  221. default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc)
  222. bool
  223. config USE_EXTERNAL_LIBC
  224. bool
  225. default y if EXTERNAL_TOOLCHAIN || NATIVE_TOOLCHAIN
  226. source "toolchain/binutils/Config.version"
  227. source "toolchain/gcc/Config.version"
  228. source "toolchain/glibc/Config.version"
  229. source "toolchain/uClibc/Config.version"
  230. source "toolchain/musl/Config.version"
  231. config LIBC
  232. string
  233. default "glibc" if USE_GLIBC
  234. default "uClibc" if USE_UCLIBC
  235. default "musl" if USE_MUSL
  236. config LIBC_VERSION
  237. string
  238. default GLIBC_VERSION if USE_GLIBC
  239. default UCLIBC_VERSION if USE_UCLIBC
  240. default MUSL_VERSION if USE_MUSL
  241. config TARGET_SUFFIX
  242. string
  243. default "gnueabi" if USE_GLIBC && (arm || armeb)
  244. default "gnu" if USE_GLIBC && !(arm || armeb)
  245. default "uclibcgnueabi" if USE_UCLIBC && (arm || armeb)
  246. default "uclibc" if USE_UCLIBC && !(arm || armeb)
  247. default "muslgnueabi" if USE_MUSL && (arm || armeb)
  248. default "musl" if USE_MUSL && !(arm || armeb)
  249. config MIPS64_ABI
  250. depends on mips64 || mips64el
  251. string
  252. default "64" if MIPS64_ABI_N64
  253. default "n32" if MIPS64_ABI_N32
  254. default "32" if MIPS64_ABI_O32
  255. default "64"