]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
Rollup merge of #97739 - a2aaron:let_underscore, r=estebank
[rust.git] / compiler / rustc_target / src / spec / powerpc64_unknown_linux_gnu.rs
1 use crate::abi::Endian;
2 use crate::spec::{LinkerFlavor, RelroLevel, Target, TargetOptions};
3
4 pub fn target() -> Target {
5     let mut base = super::linux_gnu_base::opts();
6     base.cpu = "ppc64".into();
7     base.add_pre_link_args(LinkerFlavor::Gcc, &["-m64"]);
8     base.max_atomic_width = Some(64);
9
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
14     Target {
15         llvm_target: "powerpc64-unknown-linux-gnu".into(),
16         pointer_width: 64,
17         data_layout: "E-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),
18         arch: "powerpc64".into(),
19         options: TargetOptions { endian: Endian::Big, mcount: "_mcount".into(), ..base },
20     }
21 }