2
0

Config.in 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  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, LEDE 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, LEDE 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_UCLIBC
  99. bool "uClibc"
  100. select USE_UCLIBC
  101. depends on !(aarch64 || aarch64_be)
  102. config EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
  103. bool "musl"
  104. select USE_MUSL
  105. endchoice
  106. config TOOLCHAIN_LIBC
  107. string
  108. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  109. default "glibc" if EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC
  110. default "uclibc" if EXTERNAL_TOOLCHAIN_LIBC_USE_UCLIBC
  111. default "musl" if EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
  112. config TOOLCHAIN_BIN_PATH
  113. string
  114. prompt "Toolchain program path" if DEVEL
  115. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  116. default "./usr/bin ./bin"
  117. help
  118. Specify additional directories searched for toolchain binaries
  119. (override PATH). Use ./DIR for directories relative to the root above.
  120. config TOOLCHAIN_INC_PATH
  121. string
  122. prompt "Toolchain include path" if DEVEL
  123. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  124. default "./usr/include ./include"
  125. help
  126. Specify additional directories searched for header files (override
  127. CPPFLAGS). Use ./DIR for directories relative to the root above.
  128. config TOOLCHAIN_LIB_PATH
  129. string
  130. prompt "Toolchain library path" if DEVEL
  131. depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  132. default "./usr/lib ./lib"
  133. help
  134. Specify additional directories searched for libraries (override LDFLAGS).
  135. Use ./DIR for directories relative to the root above.
  136. config NEED_TOOLCHAIN
  137. bool
  138. depends on DEVEL
  139. default y if !EXTERNAL_TOOLCHAIN
  140. menuconfig TOOLCHAINOPTS
  141. bool "Toolchain Options" if DEVEL
  142. depends on NEED_TOOLCHAIN
  143. menuconfig EXTRA_TARGET_ARCH
  144. bool
  145. prompt "Enable an extra toolchain target architecture" if TOOLCHAINOPTS
  146. depends on !sparc
  147. default y if powerpc64
  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. default "powerpc64" if powerpc64
  156. prompt "Extra architecture name" if EXTRA_TARGET_ARCH
  157. help
  158. Specify the cpu name (eg powerpc64 or x86_64) of the
  159. additional target architecture.
  160. config EXTRA_TARGET_ARCH_OPTS
  161. string
  162. default "-m64" if powerpc64
  163. prompt "Extra architecture compiler options" if EXTRA_TARGET_ARCH
  164. help
  165. If you're specifying an addition target architecture,
  166. you'll probably need to also provide options to make
  167. the compiler use this alternate arch.
  168. For example, if you're building a compiler that can build
  169. both powerpc and powerpc64 binaries, you'll need to
  170. specify -m64 here.
  171. choice
  172. prompt "MIPS64 user-land ABI" if TOOLCHAINOPTS && (mips64 || mips64el)
  173. default MIPS64_ABI_N64
  174. help
  175. MIPS64 supports 3 different user-land ABIs: o32 (legacy),
  176. n32 and n64.
  177. config MIPS64_ABI_N64
  178. bool "n64"
  179. config MIPS64_ABI_N32
  180. depends on !LIBC_USE_MUSL
  181. bool "n32"
  182. config MIPS64_ABI_O32
  183. bool "o32"
  184. endchoice
  185. comment "Binary tools"
  186. depends on TOOLCHAINOPTS
  187. source "toolchain/binutils/Config.in"
  188. comment "Compiler"
  189. depends on TOOLCHAINOPTS
  190. source "toolchain/gcc/Config.in"
  191. config YASM
  192. bool
  193. depends on ( i386 || x86_64 )
  194. prompt "Build yasm" if TOOLCHAINOPTS
  195. default y
  196. help
  197. Enable if you want to build yasm
  198. comment "C Library"
  199. depends on TOOLCHAINOPTS
  200. choice
  201. prompt "C Library implementation" if TOOLCHAINOPTS
  202. default LIBC_USE_UCLIBC if arc
  203. default LIBC_USE_MUSL
  204. help
  205. Select the C library implementation.
  206. config LIBC_USE_GLIBC
  207. bool "Use glibc"
  208. select USE_GLIBC
  209. depends on !arc
  210. config LIBC_USE_UCLIBC
  211. select USE_UCLIBC
  212. bool "Use uClibc"
  213. depends on !(aarch64 || aarch64_be)
  214. depends on BROKEN || !(arm || armeb || i386 || x86_64 || mips || mipsel || mips64 || mips64el || powerpc)
  215. config LIBC_USE_MUSL
  216. select USE_MUSL
  217. bool "Use musl"
  218. depends on !(arc)
  219. endchoice
  220. source "toolchain/glibc/Config.in"
  221. source "toolchain/uClibc/Config.in"
  222. comment "Debuggers"
  223. depends on TOOLCHAINOPTS
  224. config GDB
  225. bool
  226. depends on !(aarch64 || aarch64_be)
  227. prompt "Build gdb" if TOOLCHAINOPTS
  228. default y if !EXTERNAL_TOOLCHAIN
  229. help
  230. Enable if you want to build the gdb.
  231. config INSIGHT
  232. bool
  233. prompt "Build insight-gdb" if TOOLCHAINOPTS
  234. select GDB
  235. default n
  236. help
  237. Enable if you want to build insight-gdb.
  238. config USE_GLIBC
  239. bool
  240. config USE_UCLIBC
  241. default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (arc)
  242. bool
  243. config USE_MUSL
  244. default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc)
  245. bool
  246. config USE_EXTERNAL_LIBC
  247. bool
  248. default y if EXTERNAL_TOOLCHAIN || NATIVE_TOOLCHAIN
  249. source "toolchain/binutils/Config.version"
  250. source "toolchain/gcc/Config.version"
  251. source "toolchain/glibc/Config.version"
  252. source "toolchain/uClibc/Config.version"
  253. source "toolchain/musl/Config.version"
  254. config LIBC
  255. string
  256. default "glibc" if USE_GLIBC
  257. default "uClibc" if USE_UCLIBC
  258. default "musl" if USE_MUSL
  259. config LIBC_VERSION
  260. string
  261. default GLIBC_VERSION if USE_GLIBC
  262. default UCLIBC_VERSION if USE_UCLIBC
  263. default MUSL_VERSION if USE_MUSL
  264. config TARGET_SUFFIX
  265. string
  266. default "gnueabi" if USE_GLIBC && (arm || armeb)
  267. default "gnu" if USE_GLIBC && !(arm || armeb)
  268. default "uclibcgnueabi" if USE_UCLIBC && (arm || armeb)
  269. default "uclibc" if USE_UCLIBC && !(arm || armeb)
  270. default "muslgnueabi" if USE_MUSL && (arm || armeb)
  271. default "musl" if USE_MUSL && !(arm || armeb)
  272. config MIPS64_ABI
  273. depends on mips64 || mips64el
  274. string
  275. default "64" if MIPS64_ABI_N64
  276. default "n32" if MIPS64_ABI_N32
  277. default "32" if MIPS64_ABI_O32
  278. default "64"