summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0001-rust.configure-Skip-all-target-manipulations.patch
blob: 453174e514a83a4e1996c0f2fb932148b9b424c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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