blob: 453174e514a83a4e1996c0f2fb932148b9b424c3 [file] [log] [blame]
From b75661fbddd00ba9a43680c35b8c08aad8807d6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Sun, 31 Oct 2021 16:49:55 +0100
Subject: [PATCH] rust.configure: Skip all target manipulations
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Mozjs/rust targets are different from OE-rust targets. Use targets reported
as is.
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Andreas MΓΌller <schnitzeltony@gmail.com>
---
build/moz.configure/rust.configure | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure
index e5122d6..9f3cc91 100644
--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
@@ -81,9 +81,6 @@ def unwrap_rustup(prog, name):
return unwrap
-rustc = unwrap_rustup(rustc, 'rustc')
-cargo = unwrap_rustup(cargo, 'cargo')
-
set_config('CARGO', cargo)
set_config('RUSTC', rustc)
@@ -239,6 +236,7 @@ def rust_triple_alias(host_or_target, host_or_target_c_compiler):
@imports(_from='textwrap', _import='dedent')
def rust_target(rustc, host_or_target, compiler_info,
rust_supported_targets, arm_target):
+ return host_or_target.alias
# Rust's --target options are similar to, but not exactly the same
# as, the autoconf-derived targets we use. An example would be that
# Rust uses distinct target triples for targetting the GNU C++ ABI
@@ -401,22 +399,10 @@ def rust_triple_alias(host_or_target, host_or_target_c_compiler):
return rust_target
-
rust_target_triple = rust_triple_alias(target, c_compiler)
rust_host_triple = rust_triple_alias(host, host_c_compiler)
-@depends(host, rust_host_triple, rustc_info.host)
-def validate_rust_host_triple(host, rust_host, rustc_host):
- if rust_host != rustc_host:
- if host.alias == rust_host:
- configure_host = host.alias
- else:
- configure_host = '{}/{}'.format(host.alias, rust_host)
- die("The rust compiler host ({}) is not suitable for the configure host ({})."
- .format(rustc_host, configure_host))
-
-
set_config('RUST_TARGET', rust_target_triple)
set_config('RUST_HOST_TARGET', rust_host_triple)
--
2.31.1