From d195826983305a25c3f31ae5094be1e4740aa4b4 Mon Sep 17 00:00:00 2001 From: Andreas Müller Date: Sun, 2 Jan 2022 00:00:36 +0100 Subject: mozjs-78: renumber patches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller Signed-off-by: Khem Raj --- ...0001-rewrite-cargo-host-linker-in-python3.patch | 56 ---------------------- ...ure-fix-one-occasionally-reproduced-confi.patch | 50 ------------------- ...ure-fix-one-occasionally-reproduced-confi.patch | 50 +++++++++++++++++++ ...0014-rewrite-cargo-host-linker-in-python3.patch | 56 ++++++++++++++++++++++ .../recipes-extended/mozjs/mozjs-78_78.15.0.bb | 4 +- 5 files changed, 108 insertions(+), 108 deletions(-) delete mode 100644 meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0001-rewrite-cargo-host-linker-in-python3.patch delete mode 100644 meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0001-util.configure-fix-one-occasionally-reproduced-confi.patch create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0013-util.configure-fix-one-occasionally-reproduced-confi.patch create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0014-rewrite-cargo-host-linker-in-python3.patch 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 deleted file mode 100644 index 7b938179c3..0000000000 --- a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0001-rewrite-cargo-host-linker-in-python3.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 9eceb43dd676afe2f675bd65ab369ba4d14f6537 Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Thu, 18 Nov 2021 07:16:39 +0000 -Subject: [PATCH] Rewrite cargo-host-linker in python3 - -Mozjs compile failed with this failure: -/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) - -Root Cause: -cargo-host-linker has /bin/sh as it's interpreter, but cargo run the cmd -with LD_LIBRARY_PATH set to recipe-sysroot-native. The host /bin/sh links -libtinfo.so.5 under recipe-sysroot-native, which needs higher libc. But -host libc is older libc. So the incompatible problem occurred. - -Solution: -rewrite cargo-host-linker in python3 - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Changqing Li ---- - build/cargo-host-linker | 24 +++++++--- - 1 file changed, 21 insertions(+), 3 deletions(-) - -diff --git a/build/cargo-host-linker b/build/cargo-host-linker -index cbd0472bf7..ccd8bffec1 100755 ---- a/build/cargo-host-linker -+++ b/build/cargo-host-linker -@@ -1,3 +1,21 @@ --#!/bin/sh --# See comment in cargo-linker. --eval ${MOZ_CARGO_WRAP_HOST_LD} ${MOZ_CARGO_WRAP_HOST_LDFLAGS} '"$@"' -+#!/usr/bin/env python3 -+ -+import os,sys -+ -+if os.environ['MOZ_CARGO_WRAP_HOST_LD'].strip(): -+ binary=os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0] -+else: -+ sys.exit(0) -+ -+if os.environ['MOZ_CARGO_WRAP_HOST_LDFLAGS'].strip(): -+ if os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:]: -+ 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:] -+ else: -+ args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + [os.environ['MOZ_CARGO_WRAP_HOST_LDFLAGS']] + sys.argv[1:] -+else: -+ if os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:]: -+ args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:] + sys.argv[1:] -+ else: -+ args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + sys.argv[1:] -+ -+os.execvp(binary, args) --- -2.33.1 - diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0001-util.configure-fix-one-occasionally-reproduced-confi.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0001-util.configure-fix-one-occasionally-reproduced-confi.patch deleted file mode 100644 index e943cf1ba1..0000000000 --- a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0001-util.configure-fix-one-occasionally-reproduced-confi.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 430fd956b91c6208f166753578234c2f5db6352f Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Thu, 11 Nov 2021 21:17:38 +0800 -Subject: [PATCH] util.configure: fix one occasionally reproduced configure - failure - -error: -| checking whether the C++ compiler supports -Wno-range-loop-analysis... -| DEBUG: Creating /tmp/conftest.jr1qrcw3.cpp with content: -| DEBUG: | int -| DEBUG: | main(void) -| DEBUG: | { -| DEBUG: | -| DEBUG: | ; -| DEBUG: | return 0; -| DEBUG: | } -| DEBUG: Executing: aarch64-wrs-linux-g++ -mcpu=cortex-a53 -march=armv8-a+crc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/mozjs/91.1.0-r0/recipe-sysroot /tmp/conftest.jr1qrcw3.cpp -Werror -Wrange-loop-analysis -c -| DEBUG: The command returned non-zero exit status 1. -| DEBUG: Its error output was: -... -| File "/mozjs/91.1.0-r0/firefox-91.1.0/build/moz.configure/util.configure", line 239, in try_invoke_compiler -| os.remove(path) -| FileNotFoundError: [Errno 2] No such file or directory: '/tmp/conftest.jr1qrcw3.cpp' - -It should be another process that deleted this file by using -"rm -rf conftest*" inappropriately - -Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1740667] - -Signed-off-by: Changqing Li ---- - build/moz.configure/util.configure | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build/moz.configure/util.configure b/build/moz.configure/util.configure -index 7ee1a498ad..511e257ad9 100644 ---- a/build/moz.configure/util.configure -+++ b/build/moz.configure/util.configure -@@ -217,7 +217,7 @@ def try_invoke_compiler(compiler, language, source, flags=None, onerror=None): - 'C++': '.cpp', - }[language] - -- fd, path = mkstemp(prefix='conftest.', suffix=suffix, text=True) -+ fd, path = mkstemp(prefix='try_invoke_compiler_conftest.', suffix=suffix, text=True) - try: - source = source.encode('ascii', 'replace') - --- -2.17.1 - diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0013-util.configure-fix-one-occasionally-reproduced-confi.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0013-util.configure-fix-one-occasionally-reproduced-confi.patch new file mode 100644 index 0000000000..e943cf1ba1 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0013-util.configure-fix-one-occasionally-reproduced-confi.patch @@ -0,0 +1,50 @@ +From 430fd956b91c6208f166753578234c2f5db6352f Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Thu, 11 Nov 2021 21:17:38 +0800 +Subject: [PATCH] util.configure: fix one occasionally reproduced configure + failure + +error: +| checking whether the C++ compiler supports -Wno-range-loop-analysis... +| DEBUG: Creating /tmp/conftest.jr1qrcw3.cpp with content: +| DEBUG: | int +| DEBUG: | main(void) +| DEBUG: | { +| DEBUG: | +| DEBUG: | ; +| DEBUG: | return 0; +| DEBUG: | } +| DEBUG: Executing: aarch64-wrs-linux-g++ -mcpu=cortex-a53 -march=armv8-a+crc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/mozjs/91.1.0-r0/recipe-sysroot /tmp/conftest.jr1qrcw3.cpp -Werror -Wrange-loop-analysis -c +| DEBUG: The command returned non-zero exit status 1. +| DEBUG: Its error output was: +... +| File "/mozjs/91.1.0-r0/firefox-91.1.0/build/moz.configure/util.configure", line 239, in try_invoke_compiler +| os.remove(path) +| FileNotFoundError: [Errno 2] No such file or directory: '/tmp/conftest.jr1qrcw3.cpp' + +It should be another process that deleted this file by using +"rm -rf conftest*" inappropriately + +Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1740667] + +Signed-off-by: Changqing Li +--- + build/moz.configure/util.configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build/moz.configure/util.configure b/build/moz.configure/util.configure +index 7ee1a498ad..511e257ad9 100644 +--- a/build/moz.configure/util.configure ++++ b/build/moz.configure/util.configure +@@ -217,7 +217,7 @@ def try_invoke_compiler(compiler, language, source, flags=None, onerror=None): + 'C++': '.cpp', + }[language] + +- fd, path = mkstemp(prefix='conftest.', suffix=suffix, text=True) ++ fd, path = mkstemp(prefix='try_invoke_compiler_conftest.', suffix=suffix, text=True) + try: + source = source.encode('ascii', 'replace') + +-- +2.17.1 + diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0014-rewrite-cargo-host-linker-in-python3.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0014-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/0014-rewrite-cargo-host-linker-in-python3.patch @@ -0,0 +1,56 @@ +From 9eceb43dd676afe2f675bd65ab369ba4d14f6537 Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Thu, 18 Nov 2021 07:16:39 +0000 +Subject: [PATCH] Rewrite cargo-host-linker in python3 + +Mozjs compile failed with this failure: +/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) + +Root Cause: +cargo-host-linker has /bin/sh as it's interpreter, but cargo run the cmd +with LD_LIBRARY_PATH set to recipe-sysroot-native. The host /bin/sh links +libtinfo.so.5 under recipe-sysroot-native, which needs higher libc. But +host libc is older libc. So the incompatible problem occurred. + +Solution: +rewrite cargo-host-linker in python3 + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Changqing Li +--- + build/cargo-host-linker | 24 +++++++--- + 1 file changed, 21 insertions(+), 3 deletions(-) + +diff --git a/build/cargo-host-linker b/build/cargo-host-linker +index cbd0472bf7..ccd8bffec1 100755 +--- a/build/cargo-host-linker ++++ b/build/cargo-host-linker +@@ -1,3 +1,21 @@ +-#!/bin/sh +-# See comment in cargo-linker. +-eval ${MOZ_CARGO_WRAP_HOST_LD} ${MOZ_CARGO_WRAP_HOST_LDFLAGS} '"$@"' ++#!/usr/bin/env python3 ++ ++import os,sys ++ ++if os.environ['MOZ_CARGO_WRAP_HOST_LD'].strip(): ++ binary=os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0] ++else: ++ sys.exit(0) ++ ++if os.environ['MOZ_CARGO_WRAP_HOST_LDFLAGS'].strip(): ++ if os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:]: ++ 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:] ++ else: ++ args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + [os.environ['MOZ_CARGO_WRAP_HOST_LDFLAGS']] + sys.argv[1:] ++else: ++ if os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:]: ++ args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[1:] + sys.argv[1:] ++ else: ++ args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + sys.argv[1:] ++ ++os.execvp(binary, args) +-- +2.33.1 + 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 f0ab20ec8a..3700d88c24 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 @@ -17,8 +17,8 @@ SRC_URI = " \ file://0010-riscv-Set-march-correctly.patch \ file://0011-replace-include-by-code-to-fix-arm-build.patch \ file://0012-Add-SharedArrayRawBufferRefs-to-public-API.patch \ - file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \ - file://0001-rewrite-cargo-host-linker-in-python3.patch \ + file://0013-util.configure-fix-one-occasionally-reproduced-confi.patch \ + file://0014-rewrite-cargo-host-linker-in-python3.patch \ " SRC_URI[sha256sum] = "a4438d84d95171a6d4fea9c9f02c2edbf0475a9c614d968ebe2eedc25a672151" -- cgit 1.2.3-korg