]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / compiler / rustc_target / src / spec / powerpc64_unknown_linux_gnu.rs
CommitLineData
5869c6ff 1use crate::abi::Endian;
29967ef6 2use crate::spec::{LinkerFlavor, RelroLevel, Target, TargetOptions};
9cc50fc6 3
29967ef6
XL
4pub fn target() -> Target {
5 let mut base = super::linux_gnu_base::opts();
9cc50fc6 6 base.cpu = "ppc64".to_string();
cdc7bbd5 7 base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m64".to_string());
c30ab7b3
SL
8 base.max_atomic_width = Some(64);
9
3b2f2976
XL
10 // ld.so in at least RHEL6 on ppc64 has a bug related to BIND_NOW, so only enable partial RELRO
11 // for now. https://github.com/rust-lang/rust/pull/43170#issuecomment-315411474
12 base.relro_level = RelroLevel::Partial;
13
29967ef6 14 Target {
9cc50fc6 15 llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
29967ef6 16 pointer_width: 64,
94222f64 17 data_layout: "E-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512".to_string(),
9cc50fc6 18 arch: "powerpc64".to_string(),
5869c6ff 19 options: TargetOptions { endian: Endian::Big, mcount: "_mcount".to_string(), ..base },
29967ef6 20 }
9cc50fc6 21}