summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Volk <f_l_k@t-online.de>2025-01-18 08:47:12 +0100
committerKhem Raj <raj.khem@gmail.com>2025-01-18 09:17:02 -0800
commit27ab1bbc95b27a72a6a8a750a7fd3e98526e2050 (patch)
tree6b311d7480ea4166c5aee86d4b6001bbb3cad4df
parent7278443967e3310f48baf8a6968102a622b3877f (diff)
downloadmeta-openembedded-27ab1bbc95b27a72a6a8a750a7fd3e98526e2050.tar.gz
mozjs-115: remove recipe
polkit was the only consumer and switched to ducktape Signed-off-by: Markus Volk <f_l_k@t-online.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rwxr-xr-xmeta-oe/conf/include/non-repro-meta-oe.inc1
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/0001-Cargo.toml-do-not-abort-on-panic.patch32
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch27
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/0001-add-arm-to-list-of-mozinline.patch32
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch44
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/0001-rewrite-cargo-host-linker-in-python3.patch54
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/0001-util.configure-fix-one-occasionally-reproduced-confi.patch48
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/0002-moz.configure-do-not-look-for-llvm-objdump.patch44
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch66
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/0004-use-asm-sgidefs.h.patch38
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/1849070.patch36
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/1894423.patch30
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/armv5.patch19
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/fix-musl-build.patch29
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/musl-disable-stackwalk.patch27
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/riscv32.patch60
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115_115.17.0.bb106
17 files changed, 0 insertions, 693 deletions
diff --git a/meta-oe/conf/include/non-repro-meta-oe.inc b/meta-oe/conf/include/non-repro-meta-oe.inc
index 3441cb119a..5575b12c33 100755
--- a/meta-oe/conf/include/non-repro-meta-oe.inc
+++ b/meta-oe/conf/include/non-repro-meta-oe.inc
@@ -67,7 +67,6 @@ KNOWN_NON_REPRO_META_OE = " \
67 minifi-cpp \ 67 minifi-cpp \
68 minifi-cpp-dbg \ 68 minifi-cpp-dbg \
69 minifi-cpp-src \ 69 minifi-cpp-src \
70 mozjs-115-src \
71 mpv \ 70 mpv \
72 mpv-dbg \ 71 mpv-dbg \
73 nana \ 72 nana \
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-115/0001-Cargo.toml-do-not-abort-on-panic.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/0001-Cargo.toml-do-not-abort-on-panic.patch
deleted file mode 100644
index e8dfdea1e9..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-115/0001-Cargo.toml-do-not-abort-on-panic.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From f501f7c02df4f0ff5d5f100d9eeb74cd4d12ea3d 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 a2718b2f35..4e231c30e8 100644
17--- a/Cargo.toml
18+++ b/Cargo.toml
19@@ -59,13 +59,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-115/0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch
deleted file mode 100644
index 8b1fee2cae..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-115/0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From 3b75498f523ce6e41662ec79ff7180def6af8a99 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 23 Nov 2024 13:28:33 -0800
4Subject: [PATCH] Link with icu-uc to fix build with ICU-76
5
6Fixes
7https://bugzilla.mozilla.org/show_bug.cgi?id=1927380
8
9Upstream-Status: Pending
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 js/moz.configure | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/js/moz.configure b/js/moz.configure
16index af11416ec2..2b305bc8dd 100644
17--- a/js/moz.configure
18+++ b/js/moz.configure
19@@ -1104,7 +1104,7 @@ set_define(
20 # ======================================================
21 system_lib_option("--with-system-icu", help="Use system ICU")
22
23-system_icu = pkg_check_modules("MOZ_ICU", "icu-i18n >= 73.1", when="--with-system-icu")
24+system_icu = pkg_check_modules("MOZ_ICU", "icu-i18n >= 73.1 icu-uc", when="--with-system-icu")
25
26
27 @depends("--with-system-icu")
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-115/0001-add-arm-to-list-of-mozinline.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/0001-add-arm-to-list-of-mozinline.patch
deleted file mode 100644
index 83187861c7..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-115/0001-add-arm-to-list-of-mozinline.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From c5cfb8aa591afd5ad3aedc58fe7f410e89013605 Mon Sep 17 00:00:00 2001
2From: Kai Kang <kai.kang@windriver.com>
3Date: Fri, 22 Sep 2023 22:59:59 +0000
4Subject: [PATCH] Backport patch from firefox bugzilla to fix compile error for
5 qemuarm with some armv7ve tunes such as 'armv7vethf' and 'armv7vet-vfpv3d16':
6
7| /path/to/build/tmp/work/armv7vet2hf-vfp-poky-linux-gnueabi/mozjs-102/102.5.0-r0/build/js/src/jit/AtomicOperationsGenerated.h:240:17:
8 error: 'asm' operand has impossible constraints
9| 240 | asm volatile (
10| | ^~~
11
12Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1761665]
13
14Signed-off-by: Kai Kang <kai.kang@windriver.com>
15
16---
17 js/src/jit/GenerateAtomicOperations.py | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/js/src/jit/GenerateAtomicOperations.py b/js/src/jit/GenerateAtomicOperations.py
21index 24b5a191cf..e41948c5af 100644
22--- a/js/src/jit/GenerateAtomicOperations.py
23+++ b/js/src/jit/GenerateAtomicOperations.py
24@@ -860,7 +860,7 @@ def generate_atomics_header(c_out):
25
26 # Work around a GCC issue on 32-bit x86 by adding MOZ_NEVER_INLINE.
27 # See bug 1756347.
28- if is_gcc and cpu_arch == "x86":
29+ if is_gcc and cpu_arch in ("x86", "arm"):
30 contents = contents.replace("INLINE_ATTR", "MOZ_NEVER_INLINE inline")
31 else:
32 contents = contents.replace("INLINE_ATTR", "inline")
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-115/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch
deleted file mode 100644
index 38496ea56c..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-115/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch
+++ /dev/null
@@ -1,44 +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
17--- a/build/moz.configure/init.configure
18+++ b/build/moz.configure/init.configure
19@@ -647,24 +647,7 @@ def help_host_target(help, host, target)
20
21 def config_sub(shell, triplet):
22 config_sub = os.path.join(os.path.dirname(__file__), "..", "autoconf", "config.sub")
23- # Config.sub doesn't like the *-windows-msvc/*-windows-gnu triplets, so
24- # munge those before and after calling config.sub.
25- suffix = None
26- munging = {
27- "-windows-msvc": "-mingw32",
28- "-windows-gnu": "-mingw32",
29- }
30- for check_suffix, replacement in munging.items():
31- if triplet.endswith(check_suffix):
32- suffix = check_suffix
33- triplet = triplet[: -len(suffix)] + replacement
34- break
35- result = check_cmd_output(shell, config_sub, triplet).strip()
36- if suffix:
37- assert result.endswith(replacement)
38- result = result[: -len(replacement)] + suffix
39- return result
40-
41+ return triplet
42
43 @depends("--host", shell)
44 @checking("for host system type", lambda h: h.alias)
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 @@
1From c6a84863454b882695058187cd282987613474ef 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-115/0001-util.configure-fix-one-occasionally-reproduced-confi.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/0001-util.configure-fix-one-occasionally-reproduced-confi.patch
deleted file mode 100644
index 4921a9028c..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-115/0001-util.configure-fix-one-occasionally-reproduced-confi.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1From 0d28cd65efe14022e1d645db71dec74f11ab2ae8 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 f5ff3acd79..44f69deceb 100644
38--- a/build/moz.configure/util.configure
39+++ b/build/moz.configure/util.configure
40@@ -254,7 +254,7 @@ def try_invoke_compiler(
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-115/0002-moz.configure-do-not-look-for-llvm-objdump.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/0002-moz.configure-do-not-look-for-llvm-objdump.patch
deleted file mode 100644
index 4c69155a68..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-115/0002-moz.configure-do-not-look-for-llvm-objdump.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From 49cb509abd309e3b74ef4c872ae773f18dabca19 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---
13 moz.configure | 18 +++++++++---------
14 1 file changed, 9 insertions(+), 9 deletions(-)
15
16diff --git a/moz.configure b/moz.configure
17index 3a9461200d..33b3f49b0c 100755
18--- a/moz.configure
19+++ b/moz.configure
20@@ -723,15 +723,15 @@ check_prog(
21 )
22
23
24-llvm_objdump = check_prog(
25- "LLVM_OBJDUMP",
26- llvm_tool("llvm-objdump"),
27- what="llvm-objdump",
28- when="--enable-compile-environment",
29- paths=clang_search_path,
30-)
31-
32-add_old_configure_assignment("LLVM_OBJDUMP", llvm_objdump)
33+#llvm_objdump = check_prog(
34+# "LLVM_OBJDUMP",
35+# llvm_tool("llvm-objdump"),
36+# what="llvm-objdump",
37+# when="--enable-compile-environment",
38+# paths=clang_search_path,
39+#)
40+#
41+#add_old_configure_assignment("LLVM_OBJDUMP", llvm_objdump)
42
43
44 def validate_readelf(path):
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-115/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch
deleted file mode 100644
index 0f9d062205..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-115/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch
+++ /dev/null
@@ -1,66 +0,0 @@
1From ac6a3711917ff3f2b64662cbf4681c22a09da403 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 7a2fd1ae70..e11f13b253 100644
17--- a/build/moz.configure/rust.configure
18+++ b/build/moz.configure/rust.configure
19@@ -486,33 +486,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@@ -522,11 +496,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-115/0004-use-asm-sgidefs.h.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/0004-use-asm-sgidefs.h.patch
deleted file mode 100644
index 6443d46b2c..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-115/0004-use-asm-sgidefs.h.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1From 607aa4d822b0e074ae1b2fc16d7c140c3e889680 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 96de5d4055..2cfb2e10ee 100644
28--- a/mfbt/RandomNum.cpp
29+++ b/mfbt/RandomNum.cpp
30@@ -53,7 +53,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-115/1849070.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/1849070.patch
deleted file mode 100644
index c19a32690d..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-115/1849070.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1Bug 1849070 - Avoid using char_traits<unsigned char>. r=spidermonkey-reviewers,anba
2
3It is not guaranteed to exist by the standard, and is actively being
4removed from libc++ in LLVM 18.
5
6Differential Revision: https://phabricator.services.mozilla.com/D186421
7
8Upstream-Status: Backport [https://hg.mozilla.org/mozilla-central/rev/68ff4d3f7338248b4d67cf03aade5a73f8d396b2]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
11--- a/js/src/builtin/intl/Locale.cpp
12+++ b/js/src/builtin/intl/Locale.cpp
13@@ -802,8 +802,10 @@ static inline auto FindUnicodeExtensionT
14 UnicodeKey key) {
15 JS::AutoCheckCannotGC nogc;
16 return unicodeExtension->hasLatin1Chars()
17- ? FindUnicodeExtensionType(unicodeExtension->latin1Chars(nogc),
18- unicodeExtension->length(), key)
19+ ? FindUnicodeExtensionType(
20+ reinterpret_cast<const char*>(
21+ unicodeExtension->latin1Chars(nogc)),
22+ unicodeExtension->length(), key)
23 : FindUnicodeExtensionType(unicodeExtension->twoByteChars(nogc),
24 unicodeExtension->length(), key);
25 }
26@@ -920,7 +922,9 @@ static BaseNamePartsResult BaseNameParts
27 static inline auto BaseNameParts(JSLinearString* baseName) {
28 JS::AutoCheckCannotGC nogc;
29 return baseName->hasLatin1Chars()
30- ? BaseNameParts(baseName->latin1Chars(nogc), baseName->length())
31+ ? BaseNameParts(
32+ reinterpret_cast<const char*>(baseName->latin1Chars(nogc)),
33+ baseName->length())
34 : BaseNameParts(baseName->twoByteChars(nogc), baseName->length());
35 }
36
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-115/1894423.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/1894423.patch
deleted file mode 100644
index 93e0f0f4f9..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-115/1894423.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1Bug 1894423 - Remove unused ExclusiveData move constructor. r=spidermonkey-reviewers,jonco
2
3Because the constructor is actually not used, the compiler used to not
4complain about it being broken. Recent changes on clang trunk made it
5catch this problem without the constructor being used.
6
7As Mutex doesn't have a move constructor, it's also not only a matter of
8adding the missing underscore to lock.
9
10As the constructor is never used, just remove it.
11
12Differential Revision: https://phabricator.services.mozilla.com/D209108
13
14Upstream-Status: Backport [https://hg.mozilla.org/mozilla-central/rev/223087fdc29f]
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16
17--- a/js/src/threading/ExclusiveData.h
18+++ b/js/src/threading/ExclusiveData.h
19@@ -109,11 +109,6 @@ class ExclusiveData {
20 explicit ExclusiveData(const MutexId& id, Args&&... args)
21 : lock_(id), value_(std::forward<Args>(args)...) {}
22
23- ExclusiveData(ExclusiveData&& rhs)
24- : lock_(std::move(rhs.lock)), value_(std::move(rhs.value_)) {
25- MOZ_ASSERT(&rhs != this, "self-move disallowed!");
26- }
27-
28 ExclusiveData& operator=(ExclusiveData&& rhs) {
29 this->~ExclusiveData();
30 new (mozilla::KnownNotNull, this) ExclusiveData(std::move(rhs));
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-115/armv5.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/armv5.patch
deleted file mode 100644
index 4c45955bca..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-115/armv5.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1The ISB instruction isn't available in ARMv5 or v6, so
2guard it's use to fix the build on qemuarmv5.
3
4Upstream-Status: Pending
5Signed-off-by: Ross Burton <ross.burton@arm.com>
6
7diff --git a/js/src/jit/arm/Architecture-arm.cpp b/js/src/jit/arm/Architecture-arm.cpp
8--- a/js/src/jit/arm/Architecture-arm.cpp 2024-01-18 17:31:32.078718197 +0000
9+++ b/js/src/jit/arm/Architecture-arm.cpp 2024-01-18 18:00:16.738921445 +0000
10@@ -529,7 +529,9 @@
11 void FlushExecutionContext() {
12 #ifndef JS_SIMULATOR_ARM
13+#if __ARM_ARCH >= 7
14 // Ensure that any instructions already in the pipeline are discarded and
15 // reloaded from the icache.
16 asm volatile("isb\n" : : : "memory");
17+#endif
18 #else
19 // We assume the icache flushing routines on other platforms take care of this
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-115/fix-musl-build.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/fix-musl-build.patch
deleted file mode 100644
index 22f31e05f8..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-115/fix-musl-build.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From e4d8016d0dc56b02e22898d83aad9f80a94d1c3c 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 cabd72a2b6..0f08d91cbf 100644
18--- a/js/src/old-configure.in
19+++ b/js/src/old-configure.in
20@@ -807,6 +807,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-115/musl-disable-stackwalk.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/musl-disable-stackwalk.patch
deleted file mode 100644
index 590cddfe5f..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-115/musl-disable-stackwalk.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From 9aae71c6ee73431d2609be0ef74ffd4b22b36c75 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 22 Sep 2023 22:59:56 +0000
4Subject: [PATCH] Musl does not have stack unwinder like glibc therefore we can
5 not assume that its always available on musl, we do need to check for target
6 environment as well which could be musl or glibc.
7
8Upstream-Status: Pending
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
11---
12 mozglue/misc/StackWalk.cpp | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp
16index 307715b170..a8d3cb40c0 100644
17--- a/mozglue/misc/StackWalk.cpp
18+++ b/mozglue/misc/StackWalk.cpp
19@@ -43,7 +43,7 @@ using namespace mozilla;
20 # define MOZ_STACKWALK_SUPPORTS_MACOSX 0
21 #endif
22
23-#if (defined(linux) && \
24+#if (defined(linux) && defined(__GLIBC__) && \
25 ((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \
26 defined(HAVE__UNWIND_BACKTRACE)))
27 # define MOZ_STACKWALK_SUPPORTS_LINUX 1
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-115/riscv32.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/riscv32.patch
deleted file mode 100644
index 16f95659e2..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-115/riscv32.patch
+++ /dev/null
@@ -1,60 +0,0 @@
1From d6aff068170e56e6773feba42a463dd8c50bc4ff 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 53bbc4203f..2ac40d3d39 100644
17--- a/build/moz.configure/init.configure
18+++ b/build/moz.configure/init.configure
19@@ -584,6 +584,9 @@ def split_triplet(triplet, 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 a36152651d..a6050be5d8 100644
31--- a/python/mozbuild/mozbuild/configure/constants.py
32+++ b/python/mozbuild/mozbuild/configure/constants.py
33@@ -51,6 +51,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@@ -98,6 +99,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 c6af3d99d4..7ef02e1a85 100644
51--- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
52+++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
53@@ -1325,6 +1325,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-115_115.17.0.bb b/meta-oe/recipes-extended/mozjs/mozjs-115_115.17.0.bb
deleted file mode 100644
index ca92f2cced..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-115_115.17.0.bb
+++ /dev/null
@@ -1,106 +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 file://armv5.patch \
19 file://1849070.patch \
20 file://1894423.patch \
21 file://0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch \
22 "
23SRC_URI[sha256sum] = "80f184a102a743ee75401e86dd86af0be5f1e5ebf07c81119d9ca77422d716c3"
24
25UPSTREAM_CHECK_URI = "https://tracker.debian.org/pkg/mozjs115"
26UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
27
28S = "${WORKDIR}/firefox-${PV}"
29
30inherit pkgconfig perlnative python3native rust
31
32DEPENDS += "zlib cargo-native python3 icu"
33DEPENDS:remove:mipsarch = "icu"
34DEPENDS:remove:powerpc:toolchain-clang = "icu"
35
36B = "${WORKDIR}/build"
37
38export PYTHONPATH = "${S}/build:\
39${S}/third_party/python/PyYAML/lib3:\
40${S}/testing/mozbase/mozfile:\
41${S}/python/mozboot:\
42${S}/third_party/python/distro:\
43${S}/testing/mozbase/mozinfo:\
44${S}/config:\
45${S}/testing/mozbase/manifestparser:\
46${S}/third_party/python/pytoml:\
47${S}/testing/mozbase/mozprocess:\
48${S}/third_party/python/six:\
49${S}/python/mozbuild:\
50${S}/python/mozbuild/mozbuild:\
51${S}/python/mach:\
52${S}/third_party/python/jsmin:\
53${S}/python/mozversioncontrol"
54
55export HOST_CC = "${BUILD_CC}"
56export HOST_CXX = "${BUILD_CXX}"
57export HOST_CFLAGS = "${BUILD_CFLAGS}"
58export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}"
59export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"
60
61export AS = "${CC}"
62
63export RUSTFLAGS
64
65JIT ?= ""
66JIT:mipsarch = "--disable-jit"
67ICU ?= "--with-system-icu"
68ICU:mipsarch = ""
69ICU:powerpc:toolchain-clang = ""
70
71LDFLAGS:append:riscv32 = " -latomic"
72
73do_configure() {
74 cd ${B}
75 python3 ${S}/configure.py \
76 --enable-project=js \
77 --target=${RUST_HOST_SYS} \
78 --host=${BUILD_SYS} \
79 --prefix=${prefix} \
80 --libdir=${libdir} \
81 --disable-jemalloc \
82 --disable-strip \
83 ${JIT} \
84 ${ICU}
85}
86do_configure[cleandirs] += "${B}"
87
88do_install() {
89 oe_runmake 'DESTDIR=${D}' install
90}
91
92inherit multilib_script multilib_header
93
94MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}"
95MULTILIB_SCRIPTS += "${PN}-dev:${bindir}/js${MAJ_VER}-config"
96
97do_install:append() {
98 oe_multilib_header mozjs-${MAJ_VER}/js-config.h
99 sed -e 's@${STAGING_DIR_HOST}@@g' \
100 -i ${D}${bindir}/js${MAJ_VER}-config
101 rm -f ${D}${libdir}/libjs_static.ajs
102}
103
104PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
105PACKAGES =+ "lib${BPN}"
106FILES:lib${BPN} += "${libdir}/lib*"