Skip to content

Commit

Permalink
Rollup merge of rust-lang#102112 - cuviper:powerpc64-full-relro, r=eholk
Browse files Browse the repository at this point in the history
Allow full relro on powerpc64-unknown-linux-gnu

This was previously limited to partial relro, citing issues on RHEL6,
but that's no longer a supported platform since rust-lang#95026. We have long
been enabling full relro in RHEL7's own Rust builds for ppc64, without
trouble, so it should be fine to drop this workaround.
  • Loading branch information
matthiaskrgr authored Sep 23, 2022
2 parents 3148b3d + 5d80833 commit 8e3b9bc
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
use crate::abi::Endian;
use crate::spec::{LinkerFlavor, RelroLevel, Target, TargetOptions};
use crate::spec::{LinkerFlavor, Target, TargetOptions};

pub fn target() -> Target {
let mut base = super::linux_gnu_base::opts();
base.cpu = "ppc64".into();
base.add_pre_link_args(LinkerFlavor::Gcc, &["-m64"]);
base.max_atomic_width = Some(64);

// ld.so in at least RHEL6 on ppc64 has a bug related to BIND_NOW, so only enable partial RELRO
// for now. https://github.com/rust-lang/rust/pull/43170#issuecomment-315411474
base.relro_level = RelroLevel::Partial;

Target {
llvm_target: "powerpc64-unknown-linux-gnu".into(),
pointer_width: 64,
Expand Down

0 comments on commit 8e3b9bc

Please sign in to comment.