Config.in 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  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 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 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 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 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 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 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 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 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 DEVEL
  84. default y if !EXTERNAL_TOOLCHAIN
  85. menuconfig TOOLCHAINOPTS
  86. bool "Toolchain Options" if DEVEL
  87. depends NEED_TOOLCHAIN
  88. menuconfig EXTRA_TARGET_ARCH
  89. bool
  90. prompt "Enable an extra toolchain target architecture" if TOOLCHAINOPTS
  91. depends !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. comment "Binary tools"
  117. depends TOOLCHAINOPTS
  118. source "toolchain/binutils/Config.in"
  119. comment "Compiler"
  120. depends TOOLCHAINOPTS
  121. source "toolchain/gcc/Config.in"
  122. comment "C Library"
  123. depends TOOLCHAINOPTS
  124. choice
  125. prompt "C Library implementation" if TOOLCHAINOPTS
  126. default USE_UCLIBC
  127. help
  128. Select the C library implementation.
  129. config USE_EGLIBC
  130. bool "Use eglibc"
  131. depends !avr32
  132. config USE_UCLIBC
  133. bool "Use uClibc"
  134. config USE_MUSL
  135. bool "Use musl"
  136. endchoice
  137. source "toolchain/eglibc/Config.in"
  138. source "toolchain/uClibc/Config.in"
  139. source "toolchain/musl/Config.in"
  140. comment "Debuggers"
  141. depends TOOLCHAINOPTS
  142. config GDB
  143. bool
  144. depends !avr32
  145. prompt "Build gdb" if TOOLCHAINOPTS
  146. default y
  147. help
  148. Enable if you want to build the gdb
  149. config INSIGHT
  150. bool
  151. prompt "Build insight-gdb" if TOOLCHAINOPTS
  152. select GDB
  153. default n
  154. help
  155. Enable if you want to build insight-gdb
  156. config USE_UCLIBC
  157. bool
  158. default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
  159. config USE_EXTERNAL_LIBC
  160. bool
  161. default y if EXTERNAL_TOOLCHAIN || NATIVE_TOOLCHAIN
  162. source "toolchain/gcc/Config.version"
  163. source "toolchain/eglibc/Config.version"
  164. source "toolchain/uClibc/Config.version"
  165. source "toolchain/musl/Config.version"
  166. config LIBC
  167. string
  168. default "eglibc" if USE_EGLIBC
  169. default "uClibc" if USE_UCLIBC
  170. default "musl" if USE_MUSL
  171. config LIBC_VERSION
  172. string
  173. default EGLIBC_VERSION if USE_EGLIBC
  174. default UCLIBC_VERSION if USE_UCLIBC
  175. default MUSL_VERSION if USE_MUSL
  176. config TARGET_SUFFIX
  177. string
  178. default "gnueabi" if USE_EGLIBC && (arm || armeb)
  179. default "gnu" if USE_EGLIBC && !(arm || armeb)
  180. default "uclibcgnueabi" if USE_UCLIBC && (arm || armeb)
  181. default "uclibc" if USE_UCLIBC && !(arm || armeb)
  182. default "muslgnueabi" if USE_MUSL && (arm || armeb)
  183. default "musl" if USE_MUSL && !(arm || armeb)