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