Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1 | From b75661fbddd00ba9a43680c35b8c08aad8807d6b Mon Sep 17 00:00:00 2001 |
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> |
| 3 | Date: Sun, 31 Oct 2021 16:49:55 +0100 |
| 4 | Subject: [PATCH] rust.configure: Skip all target manipulations |
| 5 | MIME-Version: 1.0 |
| 6 | Content-Type: text/plain; charset=UTF-8 |
| 7 | Content-Transfer-Encoding: 8bit |
| 8 | |
| 9 | Mozjs/rust targets are different from OE-rust targets. Use targets reported |
| 10 | as is. |
| 11 | |
| 12 | Upstream-Status: Inappropriate [OE specific] |
| 13 | |
| 14 | Signed-off-by: Andreas MΓΌller <schnitzeltony@gmail.com> |
| 15 | --- |
| 16 | build/moz.configure/rust.configure | 16 +--------------- |
| 17 | 1 file changed, 1 insertion(+), 15 deletions(-) |
| 18 | |
| 19 | diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure |
| 20 | index e5122d6..9f3cc91 100644 |
| 21 | --- a/build/moz.configure/rust.configure |
| 22 | +++ b/build/moz.configure/rust.configure |
| 23 | @@ -81,9 +81,6 @@ def unwrap_rustup(prog, name): |
| 24 | |
| 25 | return unwrap |
| 26 | |
| 27 | -rustc = unwrap_rustup(rustc, 'rustc') |
| 28 | -cargo = unwrap_rustup(cargo, 'cargo') |
| 29 | - |
| 30 | |
| 31 | set_config('CARGO', cargo) |
| 32 | set_config('RUSTC', rustc) |
| 33 | @@ -239,6 +236,7 @@ def rust_triple_alias(host_or_target, host_or_target_c_compiler): |
| 34 | @imports(_from='textwrap', _import='dedent') |
| 35 | def rust_target(rustc, host_or_target, compiler_info, |
| 36 | rust_supported_targets, arm_target): |
| 37 | + return host_or_target.alias |
| 38 | # Rust's --target options are similar to, but not exactly the same |
| 39 | # as, the autoconf-derived targets we use. An example would be that |
| 40 | # Rust uses distinct target triples for targetting the GNU C++ ABI |
| 41 | @@ -401,22 +399,10 @@ def rust_triple_alias(host_or_target, host_or_target_c_compiler): |
| 42 | |
| 43 | return rust_target |
| 44 | |
| 45 | - |
| 46 | rust_target_triple = rust_triple_alias(target, c_compiler) |
| 47 | rust_host_triple = rust_triple_alias(host, host_c_compiler) |
| 48 | |
| 49 | |
| 50 | -@depends(host, rust_host_triple, rustc_info.host) |
| 51 | -def validate_rust_host_triple(host, rust_host, rustc_host): |
| 52 | - if rust_host != rustc_host: |
| 53 | - if host.alias == rust_host: |
| 54 | - configure_host = host.alias |
| 55 | - else: |
| 56 | - configure_host = '{}/{}'.format(host.alias, rust_host) |
| 57 | - die("The rust compiler host ({}) is not suitable for the configure host ({})." |
| 58 | - .format(rustc_host, configure_host)) |
| 59 | - |
| 60 | - |
| 61 | set_config('RUST_TARGET', rust_target_triple) |
| 62 | set_config('RUST_HOST_TARGET', rust_host_triple) |
| 63 | |
| 64 | -- |
| 65 | 2.31.1 |
| 66 | |