about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorm4b <m4b.github.io@gmail.com>2016-08-01 23:42:15 -0700
committerm4b <m4b.github.io@gmail.com>2016-08-01 23:42:15 -0700
commit884b969f2ac14f95b00a287eeb98c474cc330732 (patch)
treea9c7ae8e18c1125efb3115148b87c1f1feb6ba45 /src
parent1ece9ca968ab121082481b860e00c470182f0bae (diff)
downloadrust-884b969f2ac14f95b00a287eeb98c474cc330732.tar.gz
rust-884b969f2ac14f95b00a287eeb98c474cc330732.zip
Add -mrelax-relocations=no hacks to fix musl build
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/lib.rs6
1 files changed, 6 insertions, 0 deletions
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
     }