summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2023-12-22 16:11:05 +0100
committerKhem Raj <raj.khem@gmail.com>2023-12-27 00:15:53 -0800
commit599dfcfd665677aff3e4e0f2d6a9ee09ea84e62e (patch)
treed87221f2fb4ffe5a13fbe7ab3bef7f0e7a8fcf67 /meta-oe/recipes-extended
parentb28b7135d7b875facad949d4304f771b675cf6d8 (diff)
downloadmeta-openembedded-599dfcfd665677aff3e4e0f2d6a9ee09ea84e62e.tar.gz
mozjs-102: remove the recipe
mozjs-102 was retained for the purpose of supporting polkit; with the backport of mozjs-115 patch for polkit there are no further consumers, and it's not compatible with python 3.12. I didn't look into what specifically breaks with 3.12, as getting mozjs-115 to work with it was tricky enough, so I'd rather drop mozjs-102, than attempt to make it work. mozjs-115 is esr (long term support) release like mozjs-102, but it is also newer and therefore will remain in support longer. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended')
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-102/0001-Cargo.toml-do-not-abort-on-panic.patch32
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-102/0001-add-arm-to-list-of-mozinline.patch25
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-102/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch29
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-102/0001-rewrite-cargo-host-linker-in-python3.patch54
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-102/0001-util.configure-fix-one-occasionally-reproduced-confi.patch48
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-102/0002-moz.configure-do-not-look-for-llvm-objdump.patch44
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-102/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch66
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-102/0004-use-asm-sgidefs.h.patch38
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-102/fix-musl-build.patch29
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-102/musl-disable-stackwalk.patch18
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-102/riscv32.patch60
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-102_102.15.1.bb82
12 files changed, 0 insertions, 525 deletions
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-102/0001-Cargo.toml-do-not-abort-on-panic.patch b/meta-oe/recipes-extended/mozjs/mozjs-102/0001-Cargo.toml-do-not-abort-on-panic.patch
deleted file mode 100644
index 0dd936197..000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-102/0001-Cargo.toml-do-not-abort-on-panic.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From bb46a8a729cc4d66ad36db40c17e36a5111f19c3 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Fri, 1 Oct 2021 13:00:24 +0200
4Subject: [PATCH] Cargo.toml: do not abort on panic
5
6OE's rust is configured to unwind, and this setting clashes with it/
7
8Upstream-Status: Inappropriate [oe-core specific]
9Signed-off-by: Alexander Kanavin <alex@linutronix.de>
10
11---
12 Cargo.toml | 2 --
13 1 file changed, 2 deletions(-)
14
15diff --git a/Cargo.toml b/Cargo.toml
16index f576534bf3..5ecc17c319 100644
17--- a/Cargo.toml
18+++ b/Cargo.toml
19@@ -56,13 +56,11 @@ opt-level = 1
20 rpath = false
21 lto = false
22 debug-assertions = true
23-panic = "abort"
24
25 [profile.release]
26 opt-level = 2
27 rpath = false
28 debug-assertions = false
29-panic = "abort"
30
31 # Optimize build dependencies, because bindgen and proc macros / style
32 # compilation take more to run than to build otherwise.
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-102/0001-add-arm-to-list-of-mozinline.patch b/meta-oe/recipes-extended/mozjs/mozjs-102/0001-add-arm-to-list-of-mozinline.patch
deleted file mode 100644
index 02f5e5c7e..000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-102/0001-add-arm-to-list-of-mozinline.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1Backport patch from firefox bugzilla to fix compile error for qemuarm with
2some armv7ve tunes such as 'armv7vethf' and 'armv7vet-vfpv3d16':
3
4| /path/to/build/tmp/work/armv7vet2hf-vfp-poky-linux-gnueabi/mozjs-102/102.5.0-r0/build/js/src/jit/AtomicOperationsGenerated.h:240:17:
5 error: 'asm' operand has impossible constraints
6| 240 | asm volatile (
7| | ^~~
8
9Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1761665]
10
11Signed-off-by: Kai Kang <kai.kang@windriver.com>
12
13diff --git a/js/src/jit/GenerateAtomicOperations.py b/js/src/jit/GenerateAtomicOperations.py
14index d8a38a0..65f91ab 100644
15--- a/js/src/jit/GenerateAtomicOperations.py
16+++ b/js/src/jit/GenerateAtomicOperations.py
17@@ -856,7 +856,7 @@ def generate_atomics_header(c_out):
18
19 # Work around a GCC issue on 32-bit x86 by adding MOZ_NEVER_INLINE.
20 # See bug 1756347.
21- if is_gcc and cpu_arch == "x86":
22+ if is_gcc and cpu_arch in ("x86", "arm"):
23 contents = contents.replace("INLINE_ATTR", "MOZ_NEVER_INLINE inline")
24 else:
25 contents = contents.replace("INLINE_ATTR", "inline")
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-102/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch b/meta-oe/recipes-extended/mozjs/mozjs-102/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch
deleted file mode 100644
index fe905fe4d..000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-102/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From c860dcbe63b0e393c95bfb0131238f91aaac11d3 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Thu, 7 Oct 2021 12:44:18 +0200
4Subject: [PATCH] build: do not use autoconf's config.sub to 'canonicalize'
5 names
6
7The outcome is that processed names no longer match our custom rust
8target definitions, and the build fails.
9
10Upstream-Status: Inappropriate [oe-core specific]
11Signed-off-by: Alexander Kanavin <alex@linutronix.de>
12
13---
14 build/moz.configure/init.configure | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
18index 81f500a0b7..0b7a2ff60f 100644
19--- a/build/moz.configure/init.configure
20+++ b/build/moz.configure/init.configure
21@@ -585,7 +585,7 @@ def help_host_target(help, host, target):
22
23 def config_sub(shell, triplet):
24 config_sub = os.path.join(os.path.dirname(__file__), "..", "autoconf", "config.sub")
25- return check_cmd_output(shell, config_sub, triplet).strip()
26+ return triplet
27
28
29 @depends("--host", shell)
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-102/0001-rewrite-cargo-host-linker-in-python3.patch b/meta-oe/recipes-extended/mozjs/mozjs-102/0001-rewrite-cargo-host-linker-in-python3.patch
deleted file mode 100644
index 73bcffe94..000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-102/0001-rewrite-cargo-host-linker-in-python3.patch
+++ /dev/null
@@ -1,54 +0,0 @@
1From 8e318c4e7e732327dabf51027860de45b6fb731e Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Thu, 18 Nov 2021 07:16:39 +0000
4Subject: [PATCH] Rewrite cargo-host-linker in python3
5
6Mozjs 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
9Root Cause:
10cargo-host-linker has /bin/sh as it's interpreter, but cargo run the cmd
11with LD_LIBRARY_PATH set to recipe-sysroot-native. The host /bin/sh links
12libtinfo.so.5 under recipe-sysroot-native, which needs higher libc. But
13host libc is older libc. So the incompatible problem occurred.
14
15Solution:
16rewrite cargo-host-linker in python3
17
18Upstream-Status: Inappropriate [oe specific]
19
20Signed-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
26diff --git a/build/cargo-host-linker b/build/cargo-host-linker
27index 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)
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-102/0001-util.configure-fix-one-occasionally-reproduced-confi.patch b/meta-oe/recipes-extended/mozjs/mozjs-102/0001-util.configure-fix-one-occasionally-reproduced-confi.patch
deleted file mode 100644
index d732fdaf6..000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-102/0001-util.configure-fix-one-occasionally-reproduced-confi.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1From 2a6f66f39b4e623428b6d282bd4cb72dde67c1a6 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Thu, 11 Nov 2021 16:05:54 +0800
4Subject: [PATCH] util.configure: fix one occasionally reproduced configure
5 failure
6
7error:
8| checking whether the C++ compiler supports -Wno-range-loop-analysis...
9| DEBUG: Creating /tmp/conftest.jr1qrcw3.cpp with content:
10| DEBUG: | int
11| DEBUG: | main(void)
12| DEBUG: | {
13| DEBUG: |
14| DEBUG: | ;
15| DEBUG: | return 0;
16| DEBUG: | }
17| 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
18| DEBUG: The command returned non-zero exit status 1.
19| DEBUG: Its error output was:
20...
21| File "/mozjs/91.1.0-r0/firefox-91.1.0/build/moz.configure/util.configure", line 239, in try_invoke_compiler
22| os.remove(path)
23| FileNotFoundError: [Errno 2] No such file or directory: '/tmp/conftest.jr1qrcw3.cpp'
24
25It should be another process that deleted this file by using
26"rm -rf conftest*" inappropriately
27
28Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1740667]
29
30Signed-off-by: Changqing Li <changqing.li@windriver.com>
31
32---
33 build/moz.configure/util.configure | 2 +-
34 1 file changed, 1 insertion(+), 1 deletion(-)
35
36diff --git a/build/moz.configure/util.configure b/build/moz.configure/util.configure
37index 80c3a34522..0ac0c6b611 100644
38--- a/build/moz.configure/util.configure
39+++ b/build/moz.configure/util.configure
40@@ -216,7 +216,7 @@ def try_invoke_compiler(compiler, language, source, flags=None, onerror=None):
41 "C++": ".cpp",
42 }[language]
43
44- fd, path = mkstemp(prefix="conftest.", suffix=suffix, text=True)
45+ fd, path = mkstemp(prefix="try_invoke_compiler_conftest.", suffix=suffix, text=True)
46 try:
47 source = source.encode("ascii", "replace")
48
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-102/0002-moz.configure-do-not-look-for-llvm-objdump.patch b/meta-oe/recipes-extended/mozjs/mozjs-102/0002-moz.configure-do-not-look-for-llvm-objdump.patch
deleted file mode 100644
index b3d3c1ffa..000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-102/0002-moz.configure-do-not-look-for-llvm-objdump.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From 0133ddb86eb6e0741e02b0032c41468db6438530 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Fri, 1 Oct 2021 13:01:10 +0200
4Subject: [PATCH] moz.configure: do not look for llvm-objdump
5
6This avoid dragging in a dependency that isn't even needed
7for js builds.
8
9Upstream-Status: Inappropriate [oe-core specific]
10Signed-off-by: Alexander Kanavin <alex@linutronix.de>
11---
12 moz.configure | 18 +++++++++---------
13 1 file changed, 9 insertions(+), 9 deletions(-)
14
15diff --git a/moz.configure b/moz.configure
16index fc66b520d0..15de9a2ee0 100755
17--- a/moz.configure
18+++ b/moz.configure
19@@ -785,15 +785,15 @@
20 return llvm_tool
21
22
23-llvm_objdump = check_prog(
24- "LLVM_OBJDUMP",
25- llvm_tool("llvm-objdump"),
26- what="llvm-objdump",
27- when="--enable-compile-environment",
28- paths=clang_search_path,
29-)
30-
31-add_old_configure_assignment("LLVM_OBJDUMP", llvm_objdump)
32+#llvm_objdump = check_prog(
33+# "LLVM_OBJDUMP",
34+# llvm_tool("llvm-objdump"),
35+# what="llvm-objdump",
36+# when="--enable-compile-environment",
37+# paths=clang_search_path,
38+#)
39+#
40+#add_old_configure_assignment("LLVM_OBJDUMP", llvm_objdump)
41
42
43 @depends(llvm_tool("llvm-readelf"), toolchain_prefix)
44
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-102/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch b/meta-oe/recipes-extended/mozjs/mozjs-102/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch
deleted file mode 100644
index 202f12612..000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-102/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch
+++ /dev/null
@@ -1,66 +0,0 @@
1From 33ff25e2b126dd4135006139641d8b7f6e4da200 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Fri, 1 Oct 2021 13:02:17 +0200
4Subject: [PATCH] rust.configure: do not try to find a suitable upstream target
5
6OE is using custom targets and so this is bound to fail.
7
8Upstream-Status: Inappropriate [oe-core specific]
9Signed-off-by: Alexander Kanavin <alex@linutronix.de>
10
11---
12 build/moz.configure/rust.configure | 34 ++----------------------------
13 1 file changed, 2 insertions(+), 32 deletions(-)
14
15diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure
16index e64dc5d5ec..edf21baca6 100644
17--- a/build/moz.configure/rust.configure
18+++ b/build/moz.configure/rust.configure
19@@ -471,33 +471,7 @@ def assert_rust_compile(host_or_target, rustc_target, rustc):
20 def rust_host_triple(
21 rustc, host, compiler_info, rustc_host, rust_supported_targets, arm_target
22 ):
23- rustc_target = detect_rustc_target(
24- host, compiler_info, arm_target, rust_supported_targets
25- )
26- if rustc_target != rustc_host:
27- if host.alias == rustc_target:
28- configure_host = host.alias
29- else:
30- configure_host = "{}/{}".format(host.alias, rustc_target)
31- die(
32- dedent(
33- """\
34- The rust compiler host ({rustc}) is not suitable for the configure host ({configure}).
35-
36- You can solve this by:
37- * Set your configure host to match the rust compiler host by editing your
38- mozconfig and adding "ac_add_options --host={rustc}".
39- * Or, install the rust toolchain for {configure}, if supported, by running
40- "rustup default stable-{rustc_target}"
41- """.format(
42- rustc=rustc_host,
43- configure=configure_host,
44- rustc_target=rustc_target,
45- )
46- )
47- )
48- assert_rust_compile(host, rustc_target, rustc)
49- return rustc_target
50+ return rustc_host
51
52
53 @depends(
54@@ -507,11 +481,7 @@ def rust_host_triple(
55 def rust_target_triple(
56 rustc, target, compiler_info, rust_supported_targets, arm_target
57 ):
58- rustc_target = detect_rustc_target(
59- target, compiler_info, arm_target, rust_supported_targets
60- )
61- assert_rust_compile(target, rustc_target, rustc)
62- return rustc_target
63+ return target.alias
64
65
66 set_config("RUST_TARGET", rust_target_triple)
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-102/0004-use-asm-sgidefs.h.patch b/meta-oe/recipes-extended/mozjs/mozjs-102/0004-use-asm-sgidefs.h.patch
deleted file mode 100644
index ff28654b5..000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-102/0004-use-asm-sgidefs.h.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1From 0ec73937b01869a701ed9b60a6a84469e035ded4 Mon Sep 17 00:00:00 2001
2From: Andre McCurdy <amccurdy@gmail.com>
3Date: Sat, 30 Apr 2016 15:29:06 -0700
4Subject: [PATCH] use <asm/sgidefs.h>
5
6Build fix for MIPS with musl libc
7
8The MIPS specific header <sgidefs.h> is provided by glibc and uclibc
9but not by musl. Regardless of the libc, the kernel headers provide
10<asm/sgidefs.h> which provides the same definitions, so use that
11instead.
12
13Upstream-Status: Pending
14
15[Vincent:
16Taken from: https://sourceware.org/bugzilla/show_bug.cgi?id=21070]
17
18Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
21
22---
23 mfbt/RandomNum.cpp | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
25
26diff --git a/mfbt/RandomNum.cpp b/mfbt/RandomNum.cpp
27index 23381db0cd..7f127c0715 100644
28--- a/mfbt/RandomNum.cpp
29+++ b/mfbt/RandomNum.cpp
30@@ -52,7 +52,7 @@ extern "C" BOOLEAN NTAPI RtlGenRandom(PVOID RandomBuffer,
31 # elif defined(__s390__)
32 # define GETRANDOM_NR 349
33 # elif defined(__mips__)
34-# include <sgidefs.h>
35+# include <asm/sgidefs.h>
36 # if _MIPS_SIM == _MIPS_SIM_ABI32
37 # define GETRANDOM_NR 4353
38 # elif _MIPS_SIM == _MIPS_SIM_ABI64
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-102/fix-musl-build.patch b/meta-oe/recipes-extended/mozjs/mozjs-102/fix-musl-build.patch
deleted file mode 100644
index 6905282eb..000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-102/fix-musl-build.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 1110483c6c06adf2d03ed9154a8957defc175c80 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 20 Oct 2021 16:21:14 -0700
4Subject: [PATCH] mozjs: Fix musl miscompiles with HAVE_THREAD_TLS_KEYWORD
5
6Upstream: No
7Reason: mozjs60 miscompiles on musl if built with HAVE_THREAD_TLS_KEYWORD:
8https://github.com/void-linux/void-packages/issues/2598
9
10---
11Upstream-Status: Pending
12
13 js/src/old-configure.in | 3 +++
14 1 file changed, 3 insertions(+)
15
16diff --git a/js/src/old-configure.in b/js/src/old-configure.in
17index 8dfd75c63d..c82e580428 100644
18--- a/js/src/old-configure.in
19+++ b/js/src/old-configure.in
20@@ -839,6 +839,9 @@ if test "$ac_cv_thread_keyword" = yes; then
21 *-android*|*-linuxandroid*)
22 :
23 ;;
24+ *-musl*)
25+ :
26+ ;;
27 *)
28 AC_DEFINE(HAVE_THREAD_TLS_KEYWORD)
29 ;;
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-102/musl-disable-stackwalk.patch b/meta-oe/recipes-extended/mozjs/mozjs-102/musl-disable-stackwalk.patch
deleted file mode 100644
index a3ba469a4..000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-102/musl-disable-stackwalk.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1Musl does not have stack unwinder like glibc therefore
2we can not assume that its always available on musl, we
3do need to check for target environment as well which
4could be musl or glibc.
5
6Upstream-Status: Pending
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8--- a/mozglue/misc/StackWalk.cpp
9+++ b/mozglue/misc/StackWalk.cpp
10@@ -44,7 +44,7 @@ using namespace mozilla;
11 # define MOZ_STACKWALK_SUPPORTS_MACOSX 0
12 #endif
13
14-#if (defined(linux) && \
15+#if (defined(linux) && defined(__GLIBC__) && \
16 ((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \
17 defined(HAVE__UNWIND_BACKTRACE)))
18 # define MOZ_STACKWALK_SUPPORTS_LINUX 1
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-102/riscv32.patch b/meta-oe/recipes-extended/mozjs/mozjs-102/riscv32.patch
deleted file mode 100644
index a6a0a9ede..000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-102/riscv32.patch
+++ /dev/null
@@ -1,60 +0,0 @@
1From 81385fe53ffde5e1636e9ace0736d914da8dbc0f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 24 Oct 2021 22:32:50 -0700
4Subject: [PATCH] Add RISCV32 support
5
6Upstream-Status: Pending
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8
9---
10 build/moz.configure/init.configure | 3 +++
11 python/mozbuild/mozbuild/configure/constants.py | 2 ++
12 .../mozbuild/test/configure/test_toolchain_configure.py | 1 +
13 3 files changed, 6 insertions(+)
14
15diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
16index 0b7a2ff60f..54f8325b44 100644
17--- a/build/moz.configure/init.configure
18+++ b/build/moz.configure/init.configure
19@@ -524,6 +524,9 @@ def split_triplet(triplet, allow_msvc=False, allow_wasi=False):
20 elif cpu.startswith("aarch64"):
21 canonical_cpu = "aarch64"
22 endianness = "little"
23+ elif cpu in ("riscv32", "riscv32gc"):
24+ canonical_cpu = "riscv32"
25+ endianness = "little"
26 elif cpu in ("riscv64", "riscv64gc"):
27 canonical_cpu = "riscv64"
28 endianness = "little"
29diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py
30index c71460cb20..15bef93e19 100644
31--- a/python/mozbuild/mozbuild/configure/constants.py
32+++ b/python/mozbuild/mozbuild/configure/constants.py
33@@ -53,6 +53,7 @@ CPU_bitness = {
34 "mips64": 64,
35 "ppc": 32,
36 "ppc64": 64,
37+ 'riscv32': 32,
38 "riscv64": 64,
39 "s390": 32,
40 "s390x": 64,
41@@ -95,6 +96,7 @@ CPU_preprocessor_checks = OrderedDict(
42 ("m68k", "__m68k__"),
43 ("mips64", "__mips64"),
44 ("mips32", "__mips__"),
45+ ("riscv32", "__riscv && __riscv_xlen == 32"),
46 ("riscv64", "__riscv && __riscv_xlen == 64"),
47 ("loongarch64", "__loongarch64"),
48 ("sh4", "__sh__"),
49diff --git a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
50index 059cde0139..4f9986eb31 100644
51--- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
52+++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
53@@ -1192,6 +1192,7 @@ class LinuxCrossCompileToolchainTest(BaseToolchainTest):
54 "m68k-unknown-linux-gnu": big_endian + {"__m68k__": 1},
55 "mips64-unknown-linux-gnuabi64": big_endian + {"__mips64": 1, "__mips__": 1},
56 "mips-unknown-linux-gnu": big_endian + {"__mips__": 1},
57+ "riscv32-unknown-linux-gnu": little_endian + {"__riscv": 1, "__riscv_xlen": 32},
58 "riscv64-unknown-linux-gnu": little_endian + {"__riscv": 1, "__riscv_xlen": 64},
59 "sh4-unknown-linux-gnu": little_endian + {"__sh__": 1},
60 }
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-102_102.15.1.bb b/meta-oe/recipes-extended/mozjs/mozjs-102_102.15.1.bb
deleted file mode 100644
index 3a7b51c14..000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-102_102.15.1.bb
+++ /dev/null
@@ -1,82 +0,0 @@
1SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++"
2HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
3LICENSE = "MPL-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf"
5
6SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz \
7 file://0001-Cargo.toml-do-not-abort-on-panic.patch \
8 file://0002-moz.configure-do-not-look-for-llvm-objdump.patch \
9 file://0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch \
10 file://0004-use-asm-sgidefs.h.patch \
11 file://fix-musl-build.patch \
12 file://0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch \
13 file://riscv32.patch \
14 file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \
15 file://0001-rewrite-cargo-host-linker-in-python3.patch \
16 file://musl-disable-stackwalk.patch \
17 file://0001-add-arm-to-list-of-mozinline.patch \
18 "
19SRC_URI[sha256sum] = "09194fb765953bc6979a35aa8834118c453b9d6060bf1ec4e134551bad740113"
20
21S = "${WORKDIR}/firefox-${PV}"
22
23inherit pkgconfig perlnative python3native rust
24
25DEPENDS += "zlib cargo-native python3 icu"
26DEPENDS:remove:mipsarch = "icu"
27DEPENDS:remove:powerpc:toolchain-clang = "icu"
28
29B = "${WORKDIR}/build"
30
31export PYTHONPATH = "${S}/build:${S}/third_party/python/PyYAML/lib3:${S}/testing/mozbase/mozfile:${S}/python/mozboot:${S}/third_party/python/distro:${S}/testing/mozbase/mozinfo:${S}/config:${S}/testing/mozbase/manifestparser:${S}/third_party/python/pytoml:${S}/testing/mozbase/mozprocess:${S}/third_party/python/six:${S}/python/mozbuild:${S}/python/mozbuild/mozbuild:${S}/python/mach:${S}/third_party/python/jsmin:${S}/python/mozversioncontrol"
32
33export HOST_CC = "${BUILD_CC}"
34export HOST_CXX = "${BUILD_CXX}"
35export HOST_CFLAGS = "${BUILD_CFLAGS}"
36export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}"
37export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"
38
39export AS = "${CC}"
40
41export RUSTFLAGS
42
43JIT ?= ""
44JIT:mipsarch = "--disable-jit"
45ICU ?= "--with-system-icu"
46ICU:mipsarch = ""
47ICU:powerpc:toolchain-clang = ""
48
49do_configure() {
50 cd ${B}
51 python3 ${S}/configure.py \
52 --enable-project=js \
53 --target=${RUST_HOST_SYS} \
54 --host=${BUILD_SYS} \
55 --prefix=${prefix} \
56 --libdir=${libdir} \
57 --disable-jemalloc \
58 --disable-strip \
59 ${JIT} \
60 ${ICU}
61}
62
63do_install() {
64 oe_runmake 'DESTDIR=${D}' install
65}
66
67inherit multilib_script multilib_header
68
69MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}"
70MULTILIB_SCRIPTS += "${PN}-dev:${bindir}/js${MAJ_VER}-config"
71
72do_install:append() {
73 oe_multilib_header mozjs-${MAJ_VER}/js-config.h
74 sed -e 's@${STAGING_DIR_HOST}@@g' \
75 -i ${D}${bindir}/js${MAJ_VER}-config
76 rm -f ${D}${libdir}/libjs_static.ajs
77 # remove the build path
78 sed -i -e 's@${WORKDIR}@@g' `find ${B} -name Unified_c*.c*`
79}
80
81PACKAGES =+ "lib${BPN}"
82FILES:lib${BPN} += "${libdir}/lib*"