From 884b969f2ac14f95b00a287eeb98c474cc330732 Mon Sep 17 00:00:00 2001 From: m4b Date: Mon, 1 Aug 2016 23:42:15 -0700 Subject: Add -mrelax-relocations=no hacks to fix musl build --- src/bootstrap/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/bootstrap') diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 25356b86221..ac444e5fcc2 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -855,6 +855,12 @@ impl Build { base.push("-stdlib=libc++".into()); base.push("-mmacosx-version-min=10.7".into()); } + // This is a hack, because newer binutils broke things + // on some vms/distros (i.e., linking against unknown relocs disabled by the following flag) + // See: https://github.com/rust-lang/rust/issues/34978 + if target == "x86_64-unknown-linux-musl" { + base.push("-Wa,-mrelax-relocations=no".into()); + } return base } -- cgit 1.4.1-3-g733a5