Config.in 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  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_EGLIBC if (aarch64 || aarch64_be)
  180. default LIBC_USE_UCLIBC
  181. help
  182. Select the C library implementation.
  183. config LIBC_USE_EGLIBC
  184. bool "Use eglibc"
  185. select USE_EGLIBC
  186. depends on !avr32
  187. config LIBC_USE_UCLIBC
  188. select USE_UCLIBC
  189. bool "Use uClibc"
  190. depends on !(aarch64 || aarch64_be)
  191. config LIBC_USE_MUSL
  192. select USE_MUSL
  193. bool "Use musl"
  194. depends on !(mips64 || mips64el || aarch64 || aarch64_be)
  195. endchoice
  196. source "toolchain/eglibc/Config.in"
  197. source "toolchain/uClibc/Config.in"
  198. source "toolchain/musl/Config.in"
  199. comment "Debuggers"
  200. depends on TOOLCHAINOPTS
  201. config GDB
  202. bool
  203. depends on !(avr32 || 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_EGLIBC
  216. bool
  217. default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (aarch64 || aarch64_be || octeon)
  218. config USE_UCLIBC
  219. bool
  220. default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(aarch64 || aarch64_be || octeon)
  221. config USE_MUSL
  222. bool
  223. config USE_EXTERNAL_LIBC
  224. bool
  225. default y if EXTERNAL_TOOLCHAIN || NATIVE_TOOLCHAIN
  226. source "toolchain/gcc/Config.version"
  227. source "toolchain/eglibc/Config.version"
  228. source "toolchain/uClibc/Config.version"
  229. source "toolchain/musl/Config.version"
  230. config LIBC
  231. string
  232. default "eglibc" if USE_EGLIBC
  233. default "uClibc" if USE_UCLIBC
  234. default "musl" if USE_MUSL
  235. config LIBC_VERSION
  236. string
  237. default EGLIBC_VERSION if USE_EGLIBC
  238. default UCLIBC_VERSION if USE_UCLIBC
  239. default MUSL_VERSION if USE_MUSL
  240. config TARGET_SUFFIX
  241. string
  242. default "gnueabi" if USE_EGLIBC && (arm || armeb)
  243. default "gnu" if USE_EGLIBC && !(arm || armeb)
  244. default "uclibcgnueabi" if USE_UCLIBC && (arm || armeb)
  245. default "uclibc" if USE_UCLIBC && !(arm || armeb)
  246. default "muslgnueabi" if USE_MUSL && (arm || armeb)
  247. default "musl" if USE_MUSL && !(arm || armeb)
  248. config MIPS64_ABI
  249. depends on mips64 || mips64el
  250. string
  251. default "64" if MIPS64_ABI_N64
  252. default "n32" if MIPS64_ABI_N32
  253. default "32" if MIPS64_ABI_O32
  254. default "64"