Add support for powerpc64le-unknown-freebsd.

This commit is contained in:
Piotr Kubaj 2021-03-27 17:02:06 +01:00
parent aef11409b4
commit 24152ec296
2 changed files with 17 additions and 0 deletions

View File

@ -686,6 +686,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),

View File

@ -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.get_mut(&LinkerFlavor::Gcc).unwrap().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 },
}
}