Config.in 8.6 KB

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