diff options
Diffstat (limited to 'meta-oe/recipes-extended/mozjs/mozjs-115/0001-rewrite-cargo-host-linker-in-python3.patch')
-rw-r--r-- | meta-oe/recipes-extended/mozjs/mozjs-115/0001-rewrite-cargo-host-linker-in-python3.patch | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-115/0001-rewrite-cargo-host-linker-in-python3.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/0001-rewrite-cargo-host-linker-in-python3.patch deleted file mode 100644 index 83f384e6c2..0000000000 --- a/meta-oe/recipes-extended/mozjs/mozjs-115/0001-rewrite-cargo-host-linker-in-python3.patch +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | From c6a84863454b882695058187cd282987613474ef Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Thu, 18 Nov 2021 07:16:39 +0000 | ||
4 | Subject: [PATCH] Rewrite cargo-host-linker in python3 | ||
5 | |||
6 | Mozjs compile failed with this failure: | ||
7 | /bin/sh: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by /build/tmp-glibc/work/corei7-64-wrs-linux/mozjs/91.1.0-r0/recipe-sysroot-native/usr/lib/libtinfo.so.5) | ||
8 | |||
9 | Root Cause: | ||
10 | cargo-host-linker has /bin/sh as it's interpreter, but cargo run the cmd | ||
11 | with LD_LIBRARY_PATH set to recipe-sysroot-native. The host /bin/sh links | ||
12 | libtinfo.so.5 under recipe-sysroot-native, which needs higher libc. But | ||
13 | host libc is older libc. So the incompatible problem occurred. | ||
14 | |||
15 | Solution: | ||
16 | rewrite cargo-host-linker in python3 | ||
17 | |||
18 | Upstream-Status: Inappropriate [oe specific] | ||
19 | |||
20 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
21 | |||
22 | --- | ||
23 | build/cargo-host-linker | 24 +++++++++++++++++++++--- | ||
24 | 1 file changed, 21 insertions(+), 3 deletions(-) | ||
25 | |||
26 | diff --git a/build/cargo-host-linker b/build/cargo-host-linker | ||
27 | index cbd0472bf7..87d43ce9ec 100755 | ||
28 | --- a/build/cargo-host-linker | ||
29 | +++ b/build/cargo-host-linker | ||
30 | @@ -1,3 +1,21 @@ | ||
31 | -#!/bin/sh | ||
32 | -# See comment in cargo-linker. | ||
33 | -eval ${MOZ_CARGO_WRAP_HOST_LD} ${MOZ_CARGO_WRAP_HOST_LDFLAGS} '"$@"' | ||
34 | +#!/usr/bin/env python3 | ||
35 | + | ||
36 | +import os,sys | ||
37 | + | ||
38 | +if os.environ['MOZ_CARGO_WRAP_HOST_LD'].strip(): | ||
39 | + binary=os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0] | ||
40 | +else: | ||
41 | + sys.exit(0) | ||
42 | + | ||
43 | +if os.environ['MOZ_CARGO_WRAP_HOST_LDFLAGS'].strip(): | ||
44 | + if os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:]: | ||
45 | + args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:] + [os.environ['MOZ_CARGO_WRAP_HOST_LDFLAGS']] + sys.argv[1:] | ||
46 | + else: | ||
47 | + args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + [os.environ['MOZ_CARGO_WRAP_HOST_LDFLAGS']] + sys.argv[1:] | ||
48 | +else: | ||
49 | + if os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:]: | ||
50 | + args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:] + sys.argv[1:] | ||
51 | + else: | ||
52 | + args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + sys.argv[1:] | ||
53 | + | ||
54 | +os.execvp(binary, args) | ||