blob: e63b053565cfe42dbef9596e45ddcbc97af54a2c [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001From 33ff25e2b126dd4135006139641d8b7f6e4da200 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Fri, 1 Oct 2021 13:02:17 +0200
4Subject: [PATCH] rust.configure: do not try to find a suitable upstream target
5
6OE is using custom targets and so this is bound to fail.
7
8Upstream-Status: Inapppropriate [oe-core specific]
9Signed-off-by: Alexander Kanavin <alex@linutronix.de>
10
11---
12 build/moz.configure/rust.configure | 34 ++----------------------------
13 1 file changed, 2 insertions(+), 32 deletions(-)
14
15diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure
16index e64dc5d5ec..edf21baca6 100644
17--- a/build/moz.configure/rust.configure
18+++ b/build/moz.configure/rust.configure
19@@ -471,33 +471,7 @@ def assert_rust_compile(host_or_target, rustc_target, rustc):
20 def rust_host_triple(
21 rustc, host, compiler_info, rustc_host, rust_supported_targets, arm_target
22 ):
23- rustc_target = detect_rustc_target(
24- host, compiler_info, arm_target, rust_supported_targets
25- )
26- if rustc_target != rustc_host:
27- if host.alias == rustc_target:
28- configure_host = host.alias
29- else:
30- configure_host = "{}/{}".format(host.alias, rustc_target)
31- die(
32- dedent(
33- """\
34- The rust compiler host ({rustc}) is not suitable for the configure host ({configure}).
35-
36- You can solve this by:
37- * Set your configure host to match the rust compiler host by editing your
38- mozconfig and adding "ac_add_options --host={rustc}".
39- * Or, install the rust toolchain for {configure}, if supported, by running
40- "rustup default stable-{rustc_target}"
41- """.format(
42- rustc=rustc_host,
43- configure=configure_host,
44- rustc_target=rustc_target,
45- )
46- )
47- )
48- assert_rust_compile(host, rustc_target, rustc)
49- return rustc_target
50+ return rustc_host
51
52
53 @depends(
54@@ -507,11 +481,7 @@ def rust_host_triple(
55 def rust_target_triple(
56 rustc, target, compiler_info, rust_supported_targets, arm_target
57 ):
58- rustc_target = detect_rustc_target(
59- target, compiler_info, arm_target, rust_supported_targets
60- )
61- assert_rust_compile(target, rustc_target, rustc)
62- return rustc_target
63+ return target.alias
64
65
66 set_config("RUST_TARGET", rust_target_triple)