mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +00:00
Add support for targeting riscv32im-unknown-none-elf
Update riscv32im-unknown-none-elf to Tier2 support. Downgrade to Tier 3 platform support.
This commit is contained in:
parent
10dccdc7fc
commit
eae68350c8
@ -975,6 +975,7 @@ supported_targets! {
|
||||
("x86_64-unknown-none-hermitkernel", x86_64_unknown_none_hermitkernel),
|
||||
|
||||
("riscv32i-unknown-none-elf", riscv32i_unknown_none_elf),
|
||||
("riscv32im-unknown-none-elf", riscv32im_unknown_none_elf),
|
||||
("riscv32imc-unknown-none-elf", riscv32imc_unknown_none_elf),
|
||||
("riscv32imc-esp-espidf", riscv32imc_esp_espidf),
|
||||
("riscv32imac-unknown-none-elf", riscv32imac_unknown_none_elf),
|
||||
|
26
compiler/rustc_target/src/spec/riscv32im_unknown_none_elf.rs
Normal file
26
compiler/rustc_target/src/spec/riscv32im_unknown_none_elf.rs
Normal file
@ -0,0 +1,26 @@
|
||||
use crate::spec::{LinkerFlavor, LldFlavor, PanicStrategy, RelocModel};
|
||||
use crate::spec::{Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
Target {
|
||||
data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(),
|
||||
llvm_target: "riscv32".to_string(),
|
||||
pointer_width: 32,
|
||||
arch: "riscv32".to_string(),
|
||||
|
||||
options: TargetOptions {
|
||||
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
|
||||
linker: Some("rust-lld".to_string()),
|
||||
cpu: "generic-rv32".to_string(),
|
||||
max_atomic_width: Some(0),
|
||||
atomic_cas: false,
|
||||
features: "+m".to_string(),
|
||||
executables: true,
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
relocation_model: RelocModel::Static,
|
||||
emit_debug_gdb_scripts: false,
|
||||
eh_frame_header: false,
|
||||
..Default::default()
|
||||
},
|
||||
}
|
||||
}
|
@ -271,6 +271,7 @@ target | std | host | notes
|
||||
`powerpc64le-unknown-linux-musl` | ? | |
|
||||
`riscv32gc-unknown-linux-gnu` | | | RISC-V Linux (kernel 5.4, glibc 2.33)
|
||||
`riscv32gc-unknown-linux-musl` | | | RISC-V Linux (kernel 5.4, musl + RISCV32 support patches)
|
||||
`riscv32im-unknown-none-elf` | * | | Bare RISC-V (RV32IM ISA)
|
||||
`riscv32imc-esp-espidf` | ✓ | | RISC-V ESP-IDF
|
||||
`riscv64gc-unknown-freebsd` | | | RISC-V FreeBSD
|
||||
`riscv64gc-unknown-linux-musl` | | | RISC-V Linux (kernel 4.20, musl 1.2.0)
|
||||
|
@ -117,6 +117,7 @@ static TARGETS: &[&str] = &[
|
||||
"powerpc64-unknown-linux-gnu",
|
||||
"powerpc64le-unknown-linux-gnu",
|
||||
"riscv32i-unknown-none-elf",
|
||||
"riscv32im-unknown-none-elf",
|
||||
"riscv32imc-unknown-none-elf",
|
||||
"riscv32imac-unknown-none-elf",
|
||||
"riscv32gc-unknown-linux-gnu",
|
||||
|
Loading…
Reference in New Issue
Block a user