Config.in 8.2 KB

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