about summary refs log tree commit diff
path: root/src/bootstrap/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-08-03 02:23:29 -0700
committerGitHub <noreply@github.com>2016-08-03 02:23:29 -0700
commit9cf189701e0a8caacbf106e5bfebfa302570bb81 (patch)
tree292ba53aa9c88d2f356f9336e9a178cdcc3f3f00 /src/bootstrap/lib.rs
parentea07d52676a68aff3e85599469523a25eeb1afbf (diff)
parent5383cd7163a4334095d6d956508bd0f8911ac6c7 (diff)
downloadrust-9cf189701e0a8caacbf106e5bfebfa302570bb81.tar.gz
rust-9cf189701e0a8caacbf106e5bfebfa302570bb81.zip
Auto merge of #35178 - m4b:fix-relx-musl, r=alexcrichton
Add -mrelax-relocations=no hacks to fix musl build

* this is just a start, dunno if it will work, but I'll just push it out to get feedback (my rust is still building :cry:)
* I don't know much about rustbuild, so i just added that flag in there. it's a total hack, don't judge me
* I suspect the places in the musl .mk files are sufficient (but we may also need it present when building std), I'm not sure, needs more testing.
Diffstat (limited to 'src/bootstrap/lib.rs')
-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..acb7e0fadd9 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
     }