Config.in 6.8 KB

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