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