File tree Expand file tree Collapse file tree 5 files changed +56
-0
lines changed
compiler/rustc_target/src/spec Expand file tree Collapse file tree 5 files changed +56
-0
lines changed Original file line number Diff line number Diff line change @@ -834,6 +834,7 @@ supported_targets! {
834834 ( "powerpc-unknown-linux-gnu" , powerpc_unknown_linux_gnu) ,
835835 ( "powerpc-unknown-linux-gnuspe" , powerpc_unknown_linux_gnuspe) ,
836836 ( "powerpc-unknown-linux-musl" , powerpc_unknown_linux_musl) ,
837+ ( "powerpc-unknown-linux-muslspe" , powerpc_unknown_linux_muslspe) ,
837838 ( "powerpc64-unknown-linux-gnu" , powerpc64_unknown_linux_gnu) ,
838839 ( "powerpc64-unknown-linux-musl" , powerpc64_unknown_linux_musl) ,
839840 ( "powerpc64le-unknown-linux-gnu" , powerpc64le_unknown_linux_gnu) ,
Original file line number Diff line number Diff line change 1+ use crate :: abi:: Endian ;
2+ use crate :: spec:: { LinkerFlavor , Target , TargetOptions } ;
3+
4+ pub fn target ( ) -> Target {
5+ let mut base = super :: linux_musl_base:: opts ( ) ;
6+ base. add_pre_link_args ( LinkerFlavor :: Gcc , & [ "-mspe" ] ) ;
7+ base. max_atomic_width = Some ( 32 ) ;
8+
9+ Target {
10+ llvm_target : "powerpc-unknown-linux-muslspe" . into ( ) ,
11+ pointer_width : 32 ,
12+ data_layout : "E-m:e-p:32:32-i64:64-n32" . into ( ) ,
13+ arch : "powerpc" . into ( ) ,
14+ options : TargetOptions {
15+ abi : "spe" . into ( ) ,
16+ endian : Endian :: Big ,
17+ mcount : "_mcount" . into ( ) ,
18+ ..base
19+ } ,
20+ }
21+ }
Original file line number Diff line number Diff line change 2727 - [ m68k-unknown-linux-gnu] ( platform-support/m68k-unknown-linux-gnu.md )
2828 - [ mips64-openwrt-linux-musl] ( platform-support/mips64-openwrt-linux-musl.md )
2929 - [ nvptx64-nvidia-cuda] ( platform-support/nvptx64-nvidia-cuda.md )
30+ - [ powerpc-unknown-linux-muslspe] ( platform-support/powerpc-unknown-linux-muslspe.md )
3031 - [ riscv32imac-unknown-xous-elf] ( platform-support/riscv32imac-unknown-xous-elf.md )
3132 - [ * -pc-windows-gnullvm] ( platform-support/pc-windows-gnullvm.md )
3233 - [ * -unknown-openbsd] ( platform-support/openbsd.md )
Original file line number Diff line number Diff line change @@ -266,6 +266,7 @@ target | std | host | notes
266266` msp430-none-elf ` | * | | 16-bit MSP430 microcontrollers
267267` powerpc-unknown-linux-gnuspe ` | ✓ | | PowerPC SPE Linux
268268` powerpc-unknown-linux-musl ` | ? | |
269+ [ ` powerpc-unknown-linux-muslspe ` ] ( platform-support/powerpc-unknown-linux-muslspe.md ) | ? | | PowerPC SPE Linux
269270` powerpc-unknown-netbsd ` | ✓ | ✓ |
270271` powerpc-unknown-openbsd ` | ? | |
271272` powerpc-wrs-vxworks-spe ` | ? | |
Original file line number Diff line number Diff line change 1+ # powerpc-unknown-linux-muslspe
2+
3+ ** Tier: 3**
4+
5+ This target is very similar to already existing ones like ` powerpc_unknown_linux_musl ` and ` powerpc_unknown_linux_gnuspe ` .
6+ This one has PowerPC SPE support for musl. Unfortunately, the last supported gcc version with PowerPC SPE is 8.4.0.
7+
8+ ## Target maintainers
9+
10+ - [ @BKPepe ] ( https://github.com/BKPepe )
11+
12+ ## Requirements
13+
14+ This target is cross-compiled. There is no support for ` std ` . There is no
15+ default allocator, but it's possible to use ` alloc ` by supplying an allocator.
16+
17+ This target generated binaries in the ELF format.
18+
19+ ## Building the target
20+
21+ This target was tested and used within the ` OpenWrt ` build system for CZ.NIC Turris 1.x routers using Freescale P2020.
22+
23+ ## Building Rust programs
24+
25+ Rust does not yet ship pre-compiled artifacts for this target. To compile for
26+ this target, you will either need to build Rust with the target enabled (see
27+ "Building the target" above), or build your own copy of ` core ` by using
28+ ` build-std ` or similar.
29+
30+ ## Testing
31+
32+ This is a cross-compiled target and there is no support to run rustc test suite.
You can’t perform that action at this time.
0 commit comments