Skip to content

Commit

Permalink
Add powerpc-unknown-openbsd target
Browse files Browse the repository at this point in the history
Add powerpc-unknown-openbsd target

* Fix missing abi::endian crate
* Missing platform-support.md
  • Loading branch information
Yn0ga committed Mar 4, 2021
1 parent cbca568 commit ccca767
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ supported_targets! {
("i686-unknown-openbsd", i686_unknown_openbsd),
("sparc64-unknown-openbsd", sparc64_unknown_openbsd),
("x86_64-unknown-openbsd", x86_64_unknown_openbsd),
("powerpc-unknown-openbsd", powerpc_unknown_openbsd),

("aarch64-unknown-netbsd", aarch64_unknown_netbsd),
("armv6-unknown-netbsd-eabihf", armv6_unknown_netbsd_eabihf),
Expand Down
16 changes: 16 additions & 0 deletions compiler/rustc_target/src/spec/powerpc_unknown_openbsd.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
use crate::abi::Endian;
use crate::spec::Target;

pub fn target() -> Target {
let mut base = super::openbsd_base::opts();
base.endian = Endian::Big;
base.max_atomic_width = Some(32);

Target {
llvm_target: "powerpc-unknown-openbsd".to_string(),
pointer_width: 32,
data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(),
arch: "powerpc".to_string(),
options: base,
}
}
1 change: 1 addition & 0 deletions src/doc/rustc/src/platform-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ target | std | host | notes
`powerpc-unknown-linux-gnuspe` | ✓ | | PowerPC SPE Linux
`powerpc-unknown-linux-musl` | ? | |
`powerpc-unknown-netbsd` | ✓ | ✓ |
`powerpc-unknown-openbsd` | ? | |
`powerpc-wrs-vxworks` | ? | |
`powerpc-wrs-vxworks-spe` | ? | |
`powerpc64-unknown-freebsd` | ✓ | ✓ | PPC64 FreeBSD (ELFv1 and ELFv2)
Expand Down

0 comments on commit ccca767

Please sign in to comment.