Skip to content

Commit 761a2b3

Browse files
authored
Rollup merge of #82733 - Yn0ga:master, r=estebank
Add powerpc-unknown-openbsd target
2 parents 74e74e9 + ccca767 commit 761a2b3

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

compiler/rustc_target/src/spec/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,7 @@ supported_targets! {
694694
("i686-unknown-openbsd", i686_unknown_openbsd),
695695
("sparc64-unknown-openbsd", sparc64_unknown_openbsd),
696696
("x86_64-unknown-openbsd", x86_64_unknown_openbsd),
697+
("powerpc-unknown-openbsd", powerpc_unknown_openbsd),
697698

698699
("aarch64-unknown-netbsd", aarch64_unknown_netbsd),
699700
("armv6-unknown-netbsd-eabihf", armv6_unknown_netbsd_eabihf),
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
use crate::abi::Endian;
2+
use crate::spec::Target;
3+
4+
pub fn target() -> Target {
5+
let mut base = super::openbsd_base::opts();
6+
base.endian = Endian::Big;
7+
base.max_atomic_width = Some(32);
8+
9+
Target {
10+
llvm_target: "powerpc-unknown-openbsd".to_string(),
11+
pointer_width: 32,
12+
data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(),
13+
arch: "powerpc".to_string(),
14+
options: base,
15+
}
16+
}

src/doc/rustc/src/platform-support.md

+1
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ target | std | host | notes
198198
`powerpc-unknown-linux-gnuspe` | ✓ | | PowerPC SPE Linux
199199
`powerpc-unknown-linux-musl` | ? | |
200200
`powerpc-unknown-netbsd` | ✓ | ✓ |
201+
`powerpc-unknown-openbsd` | ? | |
201202
`powerpc-wrs-vxworks` | ? | |
202203
`powerpc-wrs-vxworks-spe` | ? | |
203204
`powerpc64-unknown-freebsd` | ✓ | ✓ | PPC64 FreeBSD (ELFv1 and ELFv2)

0 commit comments

Comments
 (0)