From 0667f1c49525c7c75ec6e7ed1da7884dde84f70a Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 8 Feb 2017 16:55:57 -0800 Subject: 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. --- src/bootstrap/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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 } -- cgit 1.4.1-3-g733a5