Config.in.host 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. # All host rust packages should depend on this option
  2. # When adding new entries below, update RUST_HOSTS in utils/update-rust
  3. config BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS
  4. bool
  5. default y if BR2_HOSTARCH = "aarch64"
  6. default y if BR2_HOSTARCH = "powerpc"
  7. default y if BR2_HOSTARCH = "powerpc64"
  8. default y if BR2_HOSTARCH = "powerpc64le"
  9. default y if BR2_HOSTARCH = "riscv64"
  10. default y if BR2_HOSTARCH = "s390x"
  11. default y if BR2_HOSTARCH = "x86"
  12. default y if BR2_HOSTARCH = "x86_64"
  13. # The pre-built Rust standard library is only available for a number
  14. # of architectures/C libraries combinations, with different levels of
  15. # support: Tier 1 platforms, Tier 2 platforms with host tools, Tier 2
  16. # platforms, Tier 3 platforms. Below, we support Tier 1, Tier 2 with
  17. # host tools and Tier 2 platforms.
  18. # The below entries match Tier 1 platforms as described at
  19. # https://doc.rust-lang.org/nightly/rustc/platform-support.html.
  20. # When adding new entries below, update RUST_TARGETS in utils/update-rust
  21. config BR2_PACKAGE_HOST_RUSTC_TARGET_TIER1_PLATFORMS
  22. bool
  23. # aarch64-unknown-linux-gnu
  24. default y if BR2_aarch64 && BR2_TOOLCHAIN_USES_GLIBC
  25. # i686-unknown-linux-gnu
  26. default y if (BR2_x86_i686 || BR2_x86_pentiumpro || BR2_X86_CPU_HAS_MMX) && BR2_TOOLCHAIN_USES_GLIBC
  27. # x86_64-unknown-linux-gnu
  28. default y if BR2_x86_64 && BR2_TOOLCHAIN_USES_GLIBC
  29. # The below entries match Tier 2 platforms with host tools as
  30. # described at
  31. # https://doc.rust-lang.org/nightly/rustc/platform-support.html.
  32. # When adding new entries below, update RUST_TARGETS in utils/update-rust
  33. config BR2_PACKAGE_HOST_RUSTC_TARGET_TIER2_HOST_TOOLS_PLATFORMS
  34. bool
  35. # aarch64-unknown-linux-musl
  36. default y if BR2_aarch64 && BR2_TOOLCHAIN_USES_MUSL
  37. # arm-unknown-linux-gnueabi
  38. default y if BR2_ARM_CPU_ARMV6 && BR2_ARM_EABI && BR2_TOOLCHAIN_USES_GLIBC
  39. # arm-unknown-linux-gnueabihf
  40. default y if BR2_ARM_CPU_ARMV6 && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC
  41. # armv7-unknown-linux-gnueabihf
  42. default y if BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC
  43. # armv7-unknown-linux-gnueabihf for armv8 hardware with 32-bit
  44. # userspace
  45. default y if BR2_arm && BR2_ARM_CPU_ARMV8A && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC
  46. # powerpc-unknown-linux-gnu
  47. default y if BR2_powerpc && BR2_TOOLCHAIN_USES_GLIBC
  48. # powerpc64-unknown-linux-gnu
  49. default y if BR2_powerpc64 && BR2_TOOLCHAIN_USES_GLIBC
  50. # powerpc64le-unknown-linux-gnu
  51. default y if BR2_powerpc64le && BR2_TOOLCHAIN_USES_GLIBC
  52. # riscv64gc-unknown-linux-gnu
  53. # "g" stands for imafd, and we also need "c".
  54. default y if BR2_RISCV_64 && BR2_RISCV_ISA_RVI && BR2_RISCV_ISA_RVM && \
  55. BR2_RISCV_ISA_RVA && BR2_RISCV_ISA_RVF && \
  56. BR2_RISCV_ISA_RVD && BR2_RISCV_ISA_RVC && \
  57. BR2_TOOLCHAIN_USES_GLIBC
  58. # s390x-unknown-linux-gnu
  59. default y if BR2_s390x && BR2_TOOLCHAIN_USES_GLIBC
  60. # x86_64-unknown-linux-musl
  61. default y if BR2_x86_64 && BR2_TOOLCHAIN_USES_MUSL
  62. # The below entries match Tier 2 platforms without host tools as
  63. # described at
  64. # https://doc.rust-lang.org/nightly/rustc/platform-support.html.
  65. # When adding new entries below, update RUST_TARGETS in utils/update-rust
  66. config BR2_PACKAGE_HOST_RUSTC_TARGET_TIER2_PLATFORMS
  67. bool
  68. # arm-unknown-linux-musleabi
  69. default y if BR2_ARM_CPU_ARMV6 && BR2_ARM_EABI && BR2_TOOLCHAIN_USES_MUSL
  70. # arm-unknown-linux-musleabihf
  71. default y if BR2_ARM_CPU_ARMV6 && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_MUSL
  72. # armv5te-unknown-linux-gnueabi
  73. default y if BR2_ARM_CPU_ARMV5 && BR2_ARM_EABI && BR2_TOOLCHAIN_USES_GLIBC
  74. # armv5te-unknown-linux-musleabi
  75. default y if BR2_ARM_CPU_ARMV5 && BR2_ARM_EABI && BR2_TOOLCHAIN_USES_MUSL
  76. # armv7-unknown-linux-gnueabi
  77. default y if BR2_ARM_CPU_ARMV7A && BR2_ARM_EABI && BR2_TOOLCHAIN_USES_GLIBC
  78. # armv7-unknown-linux-musleabi
  79. default y if BR2_ARM_CPU_ARMV7A && BR2_ARM_EABI && BR2_TOOLCHAIN_USES_MUSL
  80. # armv7-unknown-linux-musleabihf
  81. default y if BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_MUSL
  82. # armv7-unknown-linux-musleabihf for armv8 hardware with 32-bit
  83. # userspace
  84. default y if BR2_arm && BR2_ARM_CPU_ARMV8A && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_MUSL
  85. # i586-unknown-linux-gnu
  86. default y if BR2_x86_i586 && BR2_TOOLCHAIN_USES_GLIBC
  87. # i586-unknown-linux-musl
  88. default y if BR2_x86_i586 && BR2_TOOLCHAIN_USES_MUSL
  89. # i686-unknown-linux-musl
  90. default y if (BR2_x86_i686 || BR2_x86_pentiumpro || BR2_X86_CPU_HAS_MMX) && BR2_TOOLCHAIN_USES_MUSL
  91. # sparc64-unknown-linux-gnu
  92. default y if BR2_sparc64 && BR2_TOOLCHAIN_USES_GLIBC
  93. # All target rust packages should depend on this option
  94. # Note: With musl based toolchain, we need a C++ cross compiler to
  95. # build host-rust some target libraries (libunwind) from llvm source
  96. # code bundled in rust sources.
  97. config BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
  98. bool
  99. default y if BR2_PACKAGE_HOST_RUSTC_TARGET_TIER1_PLATFORMS
  100. default y if BR2_PACKAGE_HOST_RUSTC_TARGET_TIER2_HOST_TOOLS_PLATFORMS
  101. default y if BR2_PACKAGE_HOST_RUSTC_TARGET_TIER2_PLATFORMS
  102. depends on BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_USES_MUSL
  103. depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS
  104. config BR2_PACKAGE_HOST_RUSTC_ARCH
  105. string
  106. default "armv5te" if BR2_ARM_CPU_ARMV5
  107. default "arm" if BR2_ARM_CPU_ARMV6
  108. default "armv7" if BR2_ARM_CPU_ARMV7A
  109. default "armv7" if BR2_ARM_CPU_ARMV7A || (BR2_arm && BR2_ARM_CPU_ARMV8A)
  110. default "riscv64gc" if BR2_RISCV_64
  111. default BR2_ARCH
  112. config BR2_PACKAGE_HOST_RUSTC_ABI
  113. string
  114. default "eabi" if BR2_ARM_EABI
  115. default "eabihf" if BR2_ARM_EABIHF
  116. default "abi64" if BR2_MIPS_NABI64
  117. config BR2_PACKAGE_HOST_RUSTC
  118. bool "host rustc"
  119. depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS
  120. help
  121. Compiler for the Rust language
  122. http://www.rust-lang.org
  123. if BR2_PACKAGE_HOST_RUSTC
  124. choice
  125. prompt "Rust compiler variant"
  126. default BR2_PACKAGE_HOST_RUST_BIN
  127. help
  128. Select a Rust compiler
  129. config BR2_PACKAGE_HOST_RUST
  130. bool "host rust"
  131. # RUSTC_TARGET_NAME must be set for building host-rust
  132. # otherwise config.toml is broken.
  133. depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
  134. # triggers ICE on trunc_int_for_mode, at explow.c:56
  135. depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 || !BR2_aarch64
  136. # rust uses llvm >= 17 since 1.73.0
  137. select BR2_HOST_CMAKE_AT_LEAST_3_20
  138. help
  139. This package will build the compiler for the host as well as
  140. two flavors of the standard library: one for the host, another
  141. for the target. Both are installed in the host directory.
  142. comment "host-rust needs a toolchain w/ gcc >= 5"
  143. depends on BR2_aarch64
  144. depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_5
  145. config BR2_PACKAGE_HOST_RUST_BIN
  146. bool "host rust (pre-built)"
  147. help
  148. This package will install pre-built versions of the compiler
  149. for the host and the Rust standard library for the target.
  150. endchoice
  151. endif
  152. config BR2_PACKAGE_PROVIDES_HOST_RUSTC
  153. string
  154. default "host-rust" if BR2_PACKAGE_HOST_RUST
  155. # Default to host-rust-bin as long as host arch supports it
  156. default "host-rust-bin" if !BR2_PACKAGE_HOST_RUST
  157. depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS