File tree 4 files changed +57
-0
lines changed
compiler/rustc_target/src/spec
4 files changed +57
-0
lines changed Original file line number Diff line number Diff line change
1
+ /// A target tuple for OpenWrt MIPS64 targets
2
+ ///
3
+ use crate :: abi:: Endian ;
4
+ use crate :: spec:: { Target , TargetOptions } ;
5
+
6
+ pub fn target ( ) -> Target {
7
+ let mut base = super :: linux_musl_base:: opts ( ) ;
8
+ base. cpu = "mips64r2" . to_string ( ) ;
9
+ base. features = "+mips64r2" . to_string ( ) ;
10
+ base. max_atomic_width = Some ( 64 ) ;
11
+ base. crt_static_default = false ;
12
+
13
+ Target {
14
+ // LLVM doesn't recognize "muslabi64" yet.
15
+ llvm_target : "mips64-unknown-linux-musl" . to_string ( ) ,
16
+ pointer_width : 64 ,
17
+ data_layout : "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128" . to_string ( ) ,
18
+ arch : "mips64" . to_string ( ) ,
19
+ options : TargetOptions {
20
+ abi : "abi64" . to_string ( ) ,
21
+ endian : Endian :: Big ,
22
+ mcount : "_mcount" . to_string ( ) ,
23
+ ..base
24
+ } ,
25
+ }
26
+ }
Original file line number Diff line number Diff line change @@ -1016,6 +1016,8 @@ supported_targets! {
1016
1016
( "armv7-unknown-linux-uclibceabihf" , armv7_unknown_linux_uclibceabihf) ,
1017
1017
1018
1018
( "x86_64-unknown-none" , x86_64_unknown_none) ,
1019
+
1020
+ ( "mips64-openwrt-linux-musl" , mips64_openwrt_linux_musl) ,
1019
1021
}
1020
1022
1021
1023
/// Warnings encountered when parsing the target `json`.
Original file line number Diff line number Diff line change @@ -244,6 +244,7 @@ target | std | host | notes
244
244
` i686-wrs-vxworks ` | ? | |
245
245
` m68k-unknown-linux-gnu ` | ? | | Motorola 680x0 Linux
246
246
` mips-unknown-linux-uclibc ` | ✓ | | MIPS Linux with uClibc
247
+ ` mips64-openwrt-linux-musl ` | ? | | MIPS64 for OpenWrt Linux MUSL
247
248
` mipsel-sony-psp ` | * | | MIPS (LE) Sony PlayStation Portable (PSP)
248
249
` mipsel-unknown-linux-uclibc ` | ✓ | | MIPS (LE) Linux with uClibc
249
250
` mipsel-unknown-none ` | * | | Bare MIPS (LE) softfloat
Original file line number Diff line number Diff line change
1
+ # ` mips64-openwrt-linux-musl `
2
+ ** Tier: 3**
3
+
4
+ ## Target maintainers
5
+ - Donald Hoskins ` grommish@gmail.com ` , https://github.com/Itus-Shield
6
+
7
+ ## Requirements
8
+ This target is cross-compiled. There is no support for ` std ` . There is no
9
+ default allocator, but it's possible to use ` alloc ` by supplying an allocator.
10
+
11
+ By default, Rust code generated for this target uses ` -msoft-float ` and is
12
+ dynamically linked.
13
+
14
+ This target generated binaries in the ELF format.
15
+
16
+ ## Building the target
17
+ This target is built exclusively within the ` OpenWrt ` build system via
18
+ the ` rust-lang ` HOST package
19
+
20
+ ## Building Rust programs
21
+ Rust does not yet ship pre-compiled artifacts for this target. To compile for
22
+ this target, you will either need to build Rust with the target enabled (see
23
+ "Building the target" above).
24
+
25
+ ## Testing
26
+ As ` mips64-openwrt-linux-musl ` supports a variety of different environments and does
27
+ not support ` std ` , this target does not support running the Rust testsuite at this
28
+ time.
You can’t perform that action at this time.
0 commit comments