Explicitly enable cross-compilation in ./configure

This commit is contained in:
Kornel
2023-05-24 21:49:22 +02:00
committed by Till Höppner
parent 9a877ab7e6
commit 52edfd6010
+5 -1
View File
@@ -196,7 +196,11 @@ fn build(target_os: &str) -> io::Result<()> {
configure.arg(format!("--prefix={}", search().to_string_lossy()));
if env::var("TARGET").unwrap() != env::var("HOST").unwrap() {
let target = env::var("TARGET").unwrap();
let host = env::var("HOST").unwrap();
if target != host {
configure.arg("--enable-cross-compile");
// Rust targets are subtly different than naming scheme for compiler prefixes.
// The cc crate has the messy logic of guessing a working prefix,
// and this is a messy way of reusing that logic.