From 41800bdd99f7e8ecc7d836faf21e2c31b9a2c63d Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Sun, 25 Sep 2016 02:30:46 -0400 Subject: [PATCH] rust.inc: ensure proper flags are given to rustllvm rustllvm ships some c++ code that we need to ensure is built with the flags we want. Abuse an existing variable to make this happen. This should fix our issues with the libstdc++ cxx11 abi (_GLIBCXX_USE_CXX11_ABI). --- recipes-devtools/rust/rust.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/recipes-devtools/rust/rust.inc b/recipes-devtools/rust/rust.inc index 522b910..e4f3956 100644 --- a/recipes-devtools/rust/rust.inc +++ b/recipes-devtools/rust/rust.inc @@ -359,6 +359,13 @@ def rust_gen_mk_cfg(d, thing): if r: raise Exception o.write("OBJCOPY_{} := {}objcopy\n".format(sys, prefix)) + # Note: this isn't how this variable is supposed to be used, but for + # non-msvc platforms nothing else touches it. + # These are the only extra flags passed to the rustllvm (c++ code) build. + # These are only used for host (even though we emit them for all targets) + # Without this, there are link failures due to GLIBC_CXX11_ABI issues in + # certain setups. + o.write("EXTRA_RUSTLLVM_CXXFLAGS_{} := {}\n".format(sys, cxxflags_for(d, thing))) o.close() i.close()