From 7b652d341e9a476658af8a9186972ce73ec38c3c Mon Sep 17 00:00:00 2001 From: Niels Sascha Reedijk Date: Sat, 19 Sep 2020 09:17:53 +0100 Subject: [PATCH] Haiku: explicitly set CMAKE_SYSTEM_NAME when cross-compiling This resolves issues where the cross-build of LLVM fails because it tries to link to the host's system libraries instead of the target's system libraries. --- src/bootstrap/native.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index 6bba00ee85e14..37d6fab070b8e 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -378,6 +378,8 @@ fn configure_cmake( cfg.define("CMAKE_SYSTEM_NAME", "FreeBSD"); } else if target.contains("windows") { cfg.define("CMAKE_SYSTEM_NAME", "Windows"); + } else if target.contains("haiku") { + cfg.define("CMAKE_SYSTEM_NAME", "Haiku"); } // When cross-compiling we should also set CMAKE_SYSTEM_VERSION, but in // that case like CMake we cannot easily determine system version either.