Skip to content

Commit

Permalink
Auto merge of #83572 - pkubaj:patch-1, r=nagisa
Browse files Browse the repository at this point in the history
Add support for powerpc64le-unknown-freebsd
  • Loading branch information
bors committed Jun 17, 2021
2 parents 4d3ce2e + a2f532d commit e062e5d
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 @@ -769,6 +769,7 @@ supported_targets! {
("armv7-unknown-freebsd", armv7_unknown_freebsd),
("i686-unknown-freebsd", i686_unknown_freebsd),
("powerpc64-unknown-freebsd", powerpc64_unknown_freebsd),
("powerpc64le-unknown-freebsd", powerpc64le_unknown_freebsd),
("x86_64-unknown-freebsd", x86_64_unknown_freebsd),

("x86_64-unknown-dragonfly", x86_64_unknown_dragonfly),
Expand Down
16 changes: 16 additions & 0 deletions compiler/rustc_target/src/spec/powerpc64le_unknown_freebsd.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
use crate::spec::{LinkerFlavor, Target, TargetOptions};

pub fn target() -> Target {
let mut base = super::freebsd_base::opts();
base.cpu = "ppc64le".to_string();
base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m64".to_string());
base.max_atomic_width = Some(64);

Target {
llvm_target: "powerpc64le-unknown-freebsd".to_string(),
pointer_width: 64,
data_layout: "e-m:e-i64:64-n32:64".to_string(),
arch: "powerpc64".to_string(),
options: TargetOptions { mcount: "_mcount".to_string(), ..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 @@ -248,6 +248,7 @@ target | std | host | notes
`powerpc-wrs-vxworks-spe` | ? | |
`powerpc-wrs-vxworks` | ? | |
`powerpc64-unknown-freebsd` | ✓ | ✓ | PPC64 FreeBSD (ELFv1 and ELFv2)
`powerpc64le-unknown-freebsd` | | | PPC64LE FreeBSD
`powerpc64-unknown-linux-musl` | ? | |
`powerpc64-wrs-vxworks` | ? | |
`powerpc64le-unknown-linux-musl` | ? | |
Expand Down

0 comments on commit e062e5d

Please sign in to comment.