about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-02-08 16:55:57 -0800
committerAlex Crichton <alex@alexcrichton.com>2017-02-08 17:00:08 -0800
commit0667f1c49525c7c75ec6e7ed1da7884dde84f70a (patch)
tree1a7aa39b7ff64162776eddce93f2c5c3a6748521
parentd11639bdac67e850235b04dc7ac679d9e378b813 (diff)
downloadrust-0667f1c49525c7c75ec6e7ed1da7884dde84f70a.tar.gz
rust-0667f1c49525c7c75ec6e7ed1da7884dde84f70a.zip
rustbuild: Pass -fPIC on 32-bit non-Windows platforms
This is a smaller and more targeted backport of #39523 which drives to the heart
of the issue, just passing `-fPIC` on 32-bit platforms. More rationale for this
commit can be found in #39523 itself.
-rw-r--r--src/bootstrap/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index cd80c4298dc..71cb2895736 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -812,6 +812,11 @@ impl Build {
             },
             _ => {},
         }
+
+        if !target.contains("windows") && target.contains("i686") {
+            base.push("-fPIC".into());
+        }
+
         return base
     }