diff options
4 files changed, 114 insertions, 0 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0001-rewrite-cargo-host-linker-in-python3.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0001-rewrite-cargo-host-linker-in-python3.patch new file mode 100644 index 0000000000..7b938179c3 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0001-rewrite-cargo-host-linker-in-python3.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From 9eceb43dd676afe2f675bd65ab369ba4d14f6537 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 | build/cargo-host-linker | 24 +++++++--- | ||
23 | 1 file changed, 21 insertions(+), 3 deletions(-) | ||
24 | |||
25 | diff --git a/build/cargo-host-linker b/build/cargo-host-linker | ||
26 | index cbd0472bf7..ccd8bffec1 100755 | ||
27 | --- a/build/cargo-host-linker | ||
28 | +++ b/build/cargo-host-linker | ||
29 | @@ -1,3 +1,21 @@ | ||
30 | -#!/bin/sh | ||
31 | -# See comment in cargo-linker. | ||
32 | -eval ${MOZ_CARGO_WRAP_HOST_LD} ${MOZ_CARGO_WRAP_HOST_LDFLAGS} '"$@"' | ||
33 | +#!/usr/bin/env python3 | ||
34 | + | ||
35 | +import os,sys | ||
36 | + | ||
37 | +if os.environ['MOZ_CARGO_WRAP_HOST_LD'].strip(): | ||
38 | + binary=os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0] | ||
39 | +else: | ||
40 | + sys.exit(0) | ||
41 | + | ||
42 | +if os.environ['MOZ_CARGO_WRAP_HOST_LDFLAGS'].strip(): | ||
43 | + if os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:]: | ||
44 | + 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:] | ||
45 | + else: | ||
46 | + args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + [os.environ['MOZ_CARGO_WRAP_HOST_LDFLAGS']] + sys.argv[1:] | ||
47 | +else: | ||
48 | + if os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:]: | ||
49 | + args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:] + sys.argv[1:] | ||
50 | + else: | ||
51 | + args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + sys.argv[1:] | ||
52 | + | ||
53 | +os.execvp(binary, args) | ||
54 | -- | ||
55 | 2.33.1 | ||
56 | |||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78_78.15.0.bb b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78_78.15.0.bb index c8fe8bbfab..aaf35f17a6 100644 --- a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78_78.15.0.bb +++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78_78.15.0.bb | |||
@@ -18,6 +18,7 @@ SRC_URI = " \ | |||
18 | file://0011-replace-include-by-code-to-fix-arm-build.patch \ | 18 | file://0011-replace-include-by-code-to-fix-arm-build.patch \ |
19 | file://0012-Add-SharedArrayRawBufferRefs-to-public-API.patch \ | 19 | file://0012-Add-SharedArrayRawBufferRefs-to-public-API.patch \ |
20 | file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \ | 20 | file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \ |
21 | file://0001-rewrite-cargo-host-linker-in-python3.patch \ | ||
21 | " | 22 | " |
22 | 23 | ||
23 | SRC_URI[sha256sum] = "a4438d84d95171a6d4fea9c9f02c2edbf0475a9c614d968ebe2eedc25a672151" | 24 | SRC_URI[sha256sum] = "a4438d84d95171a6d4fea9c9f02c2edbf0475a9c614d968ebe2eedc25a672151" |
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-91/0001-rewrite-cargo-host-linker-in-python3.patch b/meta-oe/recipes-extended/mozjs/mozjs-91/0001-rewrite-cargo-host-linker-in-python3.patch new file mode 100644 index 0000000000..7b938179c3 --- /dev/null +++ b/meta-oe/recipes-extended/mozjs/mozjs-91/0001-rewrite-cargo-host-linker-in-python3.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From 9eceb43dd676afe2f675bd65ab369ba4d14f6537 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 | build/cargo-host-linker | 24 +++++++--- | ||
23 | 1 file changed, 21 insertions(+), 3 deletions(-) | ||
24 | |||
25 | diff --git a/build/cargo-host-linker b/build/cargo-host-linker | ||
26 | index cbd0472bf7..ccd8bffec1 100755 | ||
27 | --- a/build/cargo-host-linker | ||
28 | +++ b/build/cargo-host-linker | ||
29 | @@ -1,3 +1,21 @@ | ||
30 | -#!/bin/sh | ||
31 | -# See comment in cargo-linker. | ||
32 | -eval ${MOZ_CARGO_WRAP_HOST_LD} ${MOZ_CARGO_WRAP_HOST_LDFLAGS} '"$@"' | ||
33 | +#!/usr/bin/env python3 | ||
34 | + | ||
35 | +import os,sys | ||
36 | + | ||
37 | +if os.environ['MOZ_CARGO_WRAP_HOST_LD'].strip(): | ||
38 | + binary=os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0] | ||
39 | +else: | ||
40 | + sys.exit(0) | ||
41 | + | ||
42 | +if os.environ['MOZ_CARGO_WRAP_HOST_LDFLAGS'].strip(): | ||
43 | + if os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:]: | ||
44 | + 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:] | ||
45 | + else: | ||
46 | + args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + [os.environ['MOZ_CARGO_WRAP_HOST_LDFLAGS']] + sys.argv[1:] | ||
47 | +else: | ||
48 | + if os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:]: | ||
49 | + args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:] + sys.argv[1:] | ||
50 | + else: | ||
51 | + args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + sys.argv[1:] | ||
52 | + | ||
53 | +os.execvp(binary, args) | ||
54 | -- | ||
55 | 2.33.1 | ||
56 | |||
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-91_91.2.0.bb b/meta-oe/recipes-extended/mozjs/mozjs-91_91.2.0.bb index 9150e18810..c04e8fe9d7 100644 --- a/meta-oe/recipes-extended/mozjs/mozjs-91_91.2.0.bb +++ b/meta-oe/recipes-extended/mozjs/mozjs-91_91.2.0.bb | |||
@@ -14,6 +14,7 @@ SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/fire | |||
14 | file://0005-nojit-32bit-arch-fix.patch \ | 14 | file://0005-nojit-32bit-arch-fix.patch \ |
15 | file://0006-Fix-build-on-powerpc.patch \ | 15 | file://0006-Fix-build-on-powerpc.patch \ |
16 | file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \ | 16 | file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \ |
17 | file://0001-rewrite-cargo-host-linker-in-python3.patch \ | ||
17 | " | 18 | " |
18 | SRC_URI[sha256sum] = "3ef3cfd321d0c2c80ee1b41b8baf7a1ea4daf93c29e1377274933440ff5e42c3" | 19 | SRC_URI[sha256sum] = "3ef3cfd321d0c2c80ee1b41b8baf7a1ea4daf93c29e1377274933440ff5e42c3" |
19 | 20 | ||