From a707a61caed22687b0a2ea9a4eea855109eafb26 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 24 Feb 2016 14:31:18 -0800 Subject: [PATCH] rustbuild: Fix compiler-rt build on gnueabihf Needs a different target to get built and also we apparently need to appease the C++ compiler somehow. --- src/bootstrap/build/native.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/bootstrap/build/native.rs b/src/bootstrap/build/native.rs index 6ad5f404123..a9d84b60fbf 100644 --- a/src/bootstrap/build/native.rs +++ b/src/bootstrap/build/native.rs @@ -115,6 +115,11 @@ pub fn compiler_rt(build: &Build, target: &str) { let mode = if build.config.rust_optimize {"Release"} else {"Debug"}; let (dir, build_target, libname) = if target.contains("linux") { let os = if target.contains("android") {"-android"} else {""}; + let arch = if arch.starts_with("arm") && target.contains("eabihf") { + "armhf" + } else { + arch + }; let target = format!("clang_rt.builtins-{}{}", arch, os); ("linux".to_string(), target.clone(), target) } else if target.contains("darwin") { @@ -151,7 +156,10 @@ pub fn compiler_rt(build: &Build, target: &str) { .define("COMPILER_RT_DEFAULT_TARGET_TRIPLE", target) .define("COMPILER_RT_BUILD_SANITIZERS", "OFF") .define("COMPILER_RT_BUILD_EMUTLS", "OFF") + // inform about c/c++ compilers, the c++ compiler isn't actually used but + // it's needed to get the initial configure to work on all platforms. .define("CMAKE_C_COMPILER", build.cc(target)) + .define("CMAKE_CXX_COMPILER", build.cc(target)) .build_target(&build_target); cfg.build(); } -- 2.44.0