Skip to content

Commit 6e58b1c

Browse files
committed
add mipsel_unknown_none target
1 parent 499ebcf commit 6e58b1c

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Bare MIPS32r2, little endian, softfloat
2+
// can be used for MIPS M4K core (e.g. on PIC32MX devices)
3+
4+
use crate::spec::{LinkerFlavor, LldFlavor, RelocModel};
5+
use crate::spec::{PanicStrategy, Target, TargetOptions};
6+
7+
pub fn target() -> Target {
8+
Target {
9+
llvm_target: "mipsel-unknown-none".to_string(),
10+
target_endian: "little".to_string(),
11+
pointer_width: 32,
12+
target_c_int_width: "32".to_string(),
13+
data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(),
14+
arch: "mips".to_string(),
15+
target_os: "none".to_string(),
16+
target_env: String::new(),
17+
target_vendor: String::new(),
18+
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
19+
20+
options: TargetOptions {
21+
cpu: "mips32r2".to_string(),
22+
features: "+mips32r2,+soft-float,+noabicalls".to_string(),
23+
max_atomic_width: Some(32),
24+
executables: true,
25+
linker: Some("rust-lld".to_owned()),
26+
panic_strategy: PanicStrategy::Abort,
27+
relocation_model: RelocModel::Static,
28+
emit_debug_gdb_scripts: false,
29+
..Default::default()
30+
},
31+
}
32+
}

compiler/rustc_target/src/spec/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,7 @@ supported_targets! {
653653
("powerpc64-wrs-vxworks", powerpc64_wrs_vxworks),
654654

655655
("mipsel-sony-psp", mipsel_sony_psp),
656+
("mipsel-unknown-none", mipsel_unknown_none),
656657
("thumbv4t-none-eabi", thumbv4t_none_eabi),
657658
}
658659

0 commit comments

Comments
 (0)