2024-05-21 16:55:51 +00:00
|
|
|
From ac6a3711917ff3f2b64662cbf4681c22a09da403 Mon Sep 17 00:00:00 2001
|
2022-05-28 15:20:07 +00:00
|
|
|
From: Alexander Kanavin <alex@linutronix.de>
|
|
|
|
Date: Fri, 1 Oct 2021 13:02:17 +0200
|
|
|
|
Subject: [PATCH] rust.configure: do not try to find a suitable upstream target
|
|
|
|
|
|
|
|
OE is using custom targets and so this is bound to fail.
|
|
|
|
|
2023-09-29 16:46:16 +00:00
|
|
|
Upstream-Status: Inappropriate [oe-core specific]
|
2022-05-28 15:20:07 +00:00
|
|
|
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
|
2022-11-15 17:25:32 +00:00
|
|
|
|
2022-05-28 15:20:07 +00:00
|
|
|
---
|
|
|
|
build/moz.configure/rust.configure | 34 ++----------------------------
|
|
|
|
1 file changed, 2 insertions(+), 32 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure
|
2023-09-29 16:46:16 +00:00
|
|
|
index 7a2fd1ae70..e11f13b253 100644
|
2022-05-28 15:20:07 +00:00
|
|
|
--- a/build/moz.configure/rust.configure
|
|
|
|
+++ b/build/moz.configure/rust.configure
|
2023-09-29 16:46:16 +00:00
|
|
|
@@ -486,33 +486,7 @@ def assert_rust_compile(host_or_target, rustc_target, rustc):
|
2022-05-28 15:20:07 +00:00
|
|
|
def rust_host_triple(
|
|
|
|
rustc, host, compiler_info, rustc_host, rust_supported_targets, arm_target
|
|
|
|
):
|
|
|
|
- rustc_target = detect_rustc_target(
|
|
|
|
- host, compiler_info, arm_target, rust_supported_targets
|
|
|
|
- )
|
|
|
|
- if rustc_target != rustc_host:
|
|
|
|
- if host.alias == rustc_target:
|
|
|
|
- configure_host = host.alias
|
|
|
|
- else:
|
|
|
|
- configure_host = "{}/{}".format(host.alias, rustc_target)
|
|
|
|
- die(
|
|
|
|
- dedent(
|
|
|
|
- """\
|
|
|
|
- The rust compiler host ({rustc}) is not suitable for the configure host ({configure}).
|
|
|
|
-
|
|
|
|
- You can solve this by:
|
|
|
|
- * Set your configure host to match the rust compiler host by editing your
|
|
|
|
- mozconfig and adding "ac_add_options --host={rustc}".
|
|
|
|
- * Or, install the rust toolchain for {configure}, if supported, by running
|
|
|
|
- "rustup default stable-{rustc_target}"
|
|
|
|
- """.format(
|
|
|
|
- rustc=rustc_host,
|
|
|
|
- configure=configure_host,
|
|
|
|
- rustc_target=rustc_target,
|
|
|
|
- )
|
|
|
|
- )
|
|
|
|
- )
|
|
|
|
- assert_rust_compile(host, rustc_target, rustc)
|
|
|
|
- return rustc_target
|
|
|
|
+ return rustc_host
|
|
|
|
|
|
|
|
|
|
|
|
@depends(
|
2023-09-29 16:46:16 +00:00
|
|
|
@@ -522,11 +496,7 @@ def rust_host_triple(
|
2022-05-28 15:20:07 +00:00
|
|
|
def rust_target_triple(
|
|
|
|
rustc, target, compiler_info, rust_supported_targets, arm_target
|
|
|
|
):
|
|
|
|
- rustc_target = detect_rustc_target(
|
|
|
|
- target, compiler_info, arm_target, rust_supported_targets
|
|
|
|
- )
|
|
|
|
- assert_rust_compile(target, rustc_target, rustc)
|
|
|
|
- return rustc_target
|
|
|
|
+ return target.alias
|
|
|
|
|
|
|
|
|
|
|
|
set_config("RUST_TARGET", rust_target_triple)
|