Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1705,6 +1705,8 @@ supported_targets! {
("i686-oe-linux-gnu", i686_oe_linux_gnu),
("riscv64-oe-linux-gnu", riscv64_oe_linux_gnu),
("x86_64-oe-linux-gnu", x86_64_oe_linux_gnu),
("powerpc64-oe-linux-gnu", powerpc64_oe_linux_gnu),
("powerpc64le-oe-linux-gnu", powerpc64le_oe_linux_gnu),

("aarch64-unknown-hyperlight", aarch64_unknown_hyperlight),
("x86_64-unknown-hyperlight", x86_64_unknown_hyperlight),
Expand Down
17 changes: 17 additions & 0 deletions compiler/rustc_target/src/spec/targets/powerpc64_oe_linux_gnu.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use crate::spec::{Target, TargetMetadata};

pub(crate) fn target() -> Target {
let mut base = super::powerpc64_unknown_linux_gnu::target();

base.metadata = TargetMetadata {
description: Some("PowerPC64 Linux (kernel 3.2, glibc 2.17) for yocto".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(true),
};

base.llvm_target = "powerpc64-oe-linux-gnu".into();
base.options.linker = Some("powerpc64-oe-linux-gcc".into());

base
}
19 changes: 19 additions & 0 deletions compiler/rustc_target/src/spec/targets/powerpc64le_oe_linux_gnu.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
use crate::spec::{Target, TargetMetadata};

pub(crate) fn target() -> Target {
let mut base = super::powerpc64le_unknown_linux_gnu::target();

base.metadata = TargetMetadata {
description: Some(
"PowerPC64 (little endian) Linux (kernel 3.10, glibc 2.17) for yocto".into(),
),
tier: Some(3),
host_tools: Some(false),
std: Some(true),
};

base.llvm_target = "powerpc64le-oe-linux-gnu".into();
base.options.linker = Some("powerpc64le-oe-linux-gcc".into());

base
}
2 changes: 2 additions & 0 deletions src/doc/rustc/src/platform-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,13 @@ target | std | host | notes
[`powerpc-wrs-vxworks`](platform-support/vxworks.md) | ✓ | |
[`powerpc-wrs-vxworks-spe`](platform-support/vxworks.md) | ✓ | |
[`powerpc64-ibm-aix`](platform-support/aix.md) | ? | | 64-bit AIX (7.2 and newer)
[`powerpc64-oe-linux-gnu`](platform-support/oe-linux-gnu.md) | ✓ | | PowerPC64 (BE) OpenEmbedded/Yocto Linux (GNU)
[`powerpc64-sony-ps3`](platform-support/powerpc64-sony-ps3.md) | * | | PowerPC64 (BE) Sony PlayStation 3 (PS3)
[`powerpc64-unknown-freebsd`](platform-support/freebsd.md) | ✓ | ✓ | PPC64 FreeBSD (ELFv2)
[`powerpc64-unknown-linux-gnuelfv2`](platform-support/powerpc64-unknown-linux-gnuelfv2.md) | ✓ | ✓ | PPC64 Linux (ELFv2 ABI, kernel 3.2, glibc 2.17)
[`powerpc64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | OpenBSD/powerpc64
[`powerpc64-wrs-vxworks`](platform-support/vxworks.md) | ✓ | |
[`powerpc64le-oe-linux-gnu`](platform-support/oe-linux-gnu.md) | ✓ | | PowerPC64 (LE) OpenEmbedded/Yocto Linux (GNU)
[`powerpc64le-unknown-freebsd`](platform-support/freebsd.md) | ✓ | ✓ | PPC64LE FreeBSD
[`riscv32-wrs-vxworks`](platform-support/vxworks.md) | ✓ | |
[`riscv32e-unknown-none-elf`](platform-support/riscv32e-unknown-none-elf.md) | * | | Bare RISC-V (RV32E ISA)
Expand Down
3 changes: 3 additions & 0 deletions src/doc/rustc/src/platform-support/oe-linux-gnu.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ Target triplets available:
* `i686-oe-linux-gnu`
* `armv7-oe-linux-gnueabihf`
* `riscv64-oe-linux-gnu`
* `powerpc64-oe-linux-gnu`
* `powerpc64le-oe-linux-gnu`

## Target maintainers

[@DeepeshWR](https://github.com/DeepeshWR)
(for powerpc64-oe-linux-gnu and powerpc64le-oe-linux-gnu only) [@jkrishnanjanappa] (https://github.com/jkrishnanjanappa)

## Requirements

Expand Down
6 changes: 6 additions & 0 deletions tests/assembly-llvm/targets/targets-elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@
//@ revisions: msp430_none_elf
//@ [msp430_none_elf] compile-flags: --target msp430-none-elf
//@ [msp430_none_elf] needs-llvm-components: msp430
//@ revisions: powerpc64_oe_linux_gnu
//@ [powerpc64_oe_linux_gnu] compile-flags: --target powerpc64-oe-linux-gnu
//@ [powerpc64_oe_linux_gnu] needs-llvm-components: powerpc
//@ revisions: powerpc64_sony_ps3
//@ [powerpc64_sony_ps3] compile-flags: --target powerpc64-sony-ps3
//@ [powerpc64_sony_ps3] needs-llvm-components: powerpc
Expand All @@ -430,6 +433,9 @@
//@ revisions: powerpc64_wrs_vxworks
//@ [powerpc64_wrs_vxworks] compile-flags: --target powerpc64-wrs-vxworks
//@ [powerpc64_wrs_vxworks] needs-llvm-components: powerpc
//@ revisions: powerpc64le_oe_linux_gnu
//@ [powerpc64le_oe_linux_gnu] compile-flags: --target powerpc64le-oe-linux-gnu
//@ [powerpc64le_oe_linux_gnu] needs-llvm-components: powerpc
//@ revisions: powerpc64le_unknown_freebsd
//@ [powerpc64le_unknown_freebsd] compile-flags: --target powerpc64le-unknown-freebsd
//@ [powerpc64le_unknown_freebsd] needs-llvm-components: powerpc
Expand Down
Loading