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