summaryrefslogtreecommitdiff
path: root/user/rust/0002-Don-t-pass-CFLAGS-to-the-C-compiler.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/rust/0002-Don-t-pass-CFLAGS-to-the-C-compiler.patch')
-rw-r--r--user/rust/0002-Don-t-pass-CFLAGS-to-the-C-compiler.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/user/rust/0002-Don-t-pass-CFLAGS-to-the-C-compiler.patch b/user/rust/0002-Don-t-pass-CFLAGS-to-the-C-compiler.patch
new file mode 100644
index 000000000..a3efabf93
--- /dev/null
+++ b/user/rust/0002-Don-t-pass-CFLAGS-to-the-C-compiler.patch
@@ -0,0 +1,36 @@
+From b77da61648c4787be551de6f654148c3686c7a3e Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Wed, 10 Jan 2018 13:36:41 -0600
+Subject: [PATCH 02/28] Don't pass CFLAGS to the C++ compiler
+
+---
+ src/bootstrap/builder.rs | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
+index dc0b0aaf0b..257d369750 100644
+--- a/src/bootstrap/builder.rs
++++ b/src/bootstrap/builder.rs
+@@ -966,7 +966,7 @@ impl<'a> Builder<'a> {
+ let cflags = self.cflags(target).join(" ");
+ cargo
+ .env(format!("CFLAGS_{}", target), cflags.clone())
+- .env("CFLAGS", cflags.clone());
++ .env("CFLAGS", cflags);
+
+ if let Some(ar) = self.ar(target) {
+ let ranlib = format!("{} s", ar.display());
+@@ -981,9 +981,7 @@ impl<'a> Builder<'a> {
+ let cxx = ccacheify(&cxx);
+ cargo
+ .env(format!("CXX_{}", target), &cxx)
+- .env("CXX", &cxx)
+- .env(format!("CXXFLAGS_{}", target), cflags.clone())
+- .env("CXXFLAGS", cflags);
++ .env("CXX", &cxx);
+ }
+ }
+
+--
+2.18.0
+