summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0001-rust.configure-Skip-all-target-manipulations.patch66
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0002-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch33
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0003-Do-not-check-binaries-after-build.patch55
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0004-Cargo.toml-do-not-abort-on-panic.patch33
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0005-Fixup-compatibility-of-mozbuild-with-Python-3.10.patch304
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0006-use-asm-sgidefs.h.patch35
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0007-fix-musl-build.patch15
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0008-riscv.patch52
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0009-riscv-Disable-atomic-operations.patch52
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0010-riscv-Set-march-correctly.patch60
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0011-replace-include-by-code-to-fix-arm-build.patch43
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0012-Add-SharedArrayRawBufferRefs-to-public-API.patch35
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78_78.15.0.bb140
13 files changed, 923 insertions, 0 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0001-rust.configure-Skip-all-target-manipulations.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0001-rust.configure-Skip-all-target-manipulations.patch
new file mode 100644
index 0000000000..453174e514
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0001-rust.configure-Skip-all-target-manipulations.patch
@@ -0,0 +1,66 @@
1From b75661fbddd00ba9a43680c35b8c08aad8807d6b Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Sun, 31 Oct 2021 16:49:55 +0100
4Subject: [PATCH] rust.configure: Skip all target manipulations
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Mozjs/rust targets are different from OE-rust targets. Use targets reported
10as is.
11
12Upstream-Status: Inappropriate [OE specific]
13
14Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
15---
16 build/moz.configure/rust.configure | 16 +---------------
17 1 file changed, 1 insertion(+), 15 deletions(-)
18
19diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure
20index e5122d6..9f3cc91 100644
21--- a/build/moz.configure/rust.configure
22+++ b/build/moz.configure/rust.configure
23@@ -81,9 +81,6 @@ def unwrap_rustup(prog, name):
24
25 return unwrap
26
27-rustc = unwrap_rustup(rustc, 'rustc')
28-cargo = unwrap_rustup(cargo, 'cargo')
29-
30
31 set_config('CARGO', cargo)
32 set_config('RUSTC', rustc)
33@@ -239,6 +236,7 @@ def rust_triple_alias(host_or_target, host_or_target_c_compiler):
34 @imports(_from='textwrap', _import='dedent')
35 def rust_target(rustc, host_or_target, compiler_info,
36 rust_supported_targets, arm_target):
37+ return host_or_target.alias
38 # Rust's --target options are similar to, but not exactly the same
39 # as, the autoconf-derived targets we use. An example would be that
40 # Rust uses distinct target triples for targetting the GNU C++ ABI
41@@ -401,22 +399,10 @@ def rust_triple_alias(host_or_target, host_or_target_c_compiler):
42
43 return rust_target
44
45-
46 rust_target_triple = rust_triple_alias(target, c_compiler)
47 rust_host_triple = rust_triple_alias(host, host_c_compiler)
48
49
50-@depends(host, rust_host_triple, rustc_info.host)
51-def validate_rust_host_triple(host, rust_host, rustc_host):
52- if rust_host != rustc_host:
53- if host.alias == rust_host:
54- configure_host = host.alias
55- else:
56- configure_host = '{}/{}'.format(host.alias, rust_host)
57- die("The rust compiler host ({}) is not suitable for the configure host ({})."
58- .format(rustc_host, configure_host))
59-
60-
61 set_config('RUST_TARGET', rust_target_triple)
62 set_config('RUST_HOST_TARGET', rust_host_triple)
63
64--
652.31.1
66
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0002-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0002-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch
new file mode 100644
index 0000000000..21ad82ede1
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0002-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch
@@ -0,0 +1,33 @@
1From e5b95b3918588e2930c9af7ba304c57e871b2d55 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 [oespecific]
11
12Signed-off-by: Alexander Kanavin <alex@linutronix.de>
13Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
14---
15 build/moz.configure/init.configure | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
19index b887153..0a6a33c 100644
20--- a/build/moz.configure/init.configure
21+++ b/build/moz.configure/init.configure
22@@ -808,7 +808,7 @@ def help_host_target(help, host, target):
23 def config_sub(shell, triplet):
24 config_sub = os.path.join(os.path.dirname(__file__), '..',
25 'autoconf', 'config.sub')
26- return check_cmd_output(shell, config_sub, triplet).strip()
27+ return triplet
28
29
30 @depends('--host', shell)
31--
322.31.1
33
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0003-Do-not-check-binaries-after-build.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0003-Do-not-check-binaries-after-build.patch
new file mode 100644
index 0000000000..a0f37f597b
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0003-Do-not-check-binaries-after-build.patch
@@ -0,0 +1,55 @@
1From 1a47eac590f57c765033c7797b0759dc314f2128 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Mon, 1 Nov 2021 22:52:57 +0100
4Subject: [PATCH] Do not check binaries after build
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9* It buys us a dependency hard to fulfill in different layer setups
10* Mozjs-91 does not perform these checks when setting --enable-project=js. Here
11 for old configuration style --enable-project changes nothing and build wants
12 to check binaries created.
13
14So omit checks by not searching for llvm_objdump and making check_binary.py a
15stub to prevent errors by using unset LLVM_OBJDUMP.
16
17Upstream-Status: Inappropriate [oe specific]
18
19Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
20---
21 moz.configure | 7 -------
22 python/mozbuild/mozbuild/action/check_binary.py | 2 +-
23 2 files changed, 1 insertion(+), 8 deletions(-)
24
25diff --git a/moz.configure b/moz.configure
26index 9b0e784..41e3e4d 100755
27--- a/moz.configure
28+++ b/moz.configure
29@@ -648,13 +648,6 @@ def llvm_objdump(host_c_compiler, c_compiler, bindgen_config_paths):
30 return (llvm_objdump,)
31
32
33-llvm_objdump = check_prog('LLVM_OBJDUMP', llvm_objdump, what='llvm-objdump',
34- when='--enable-compile-environment',
35- paths=toolchain_search_path)
36-
37-add_old_configure_assignment('LLVM_OBJDUMP', llvm_objdump)
38-
39-
40 js_option('--enable-dtrace', help='Build with dtrace support')
41
42 dtrace = check_header('sys/sdt.h', when='--enable-dtrace',
43diff --git a/python/mozbuild/mozbuild/action/check_binary.py b/python/mozbuild/mozbuild/action/check_binary.py
44index 57ccfa6..bd2c167 100644
45--- a/python/mozbuild/mozbuild/action/check_binary.py
46+++ b/python/mozbuild/mozbuild/action/check_binary.py
47@@ -366,4 +366,4 @@ def main(args):
48
49
50 if __name__ == '__main__':
51- sys.exit(main(sys.argv[1:]))
52+ sys.exit(0)
53--
542.31.1
55
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0004-Cargo.toml-do-not-abort-on-panic.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0004-Cargo.toml-do-not-abort-on-panic.patch
new file mode 100644
index 0000000000..665eace665
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0004-Cargo.toml-do-not-abort-on-panic.patch
@@ -0,0 +1,33 @@
1From 9e37248870b2b955293754933c789ca00bca06ef 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 specific]
9
10Signed-off-by: Alexander Kanavin <alex@linutronix.de>
11Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
12---
13 Cargo.toml | 2 --
14 1 file changed, 2 deletions(-)
15
16diff --git a/Cargo.toml b/Cargo.toml
17index 897daad41b..505454263e 100644
18--- a/Cargo.toml
19+++ b/Cargo.toml
20@@ -56,13 +56,11 @@ opt-level = 1
21 rpath = false
22 lto = false
23 debug-assertions = true
24-panic = "abort"
25
26 [profile.release]
27 opt-level = 2
28 rpath = false
29 debug-assertions = false
30-panic = "abort"
31
32 [patch.crates-io]
33 libudev-sys = { path = "dom/webauthn/libudev-sys" }
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0005-Fixup-compatibility-of-mozbuild-with-Python-3.10.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0005-Fixup-compatibility-of-mozbuild-with-Python-3.10.patch
new file mode 100644
index 0000000000..d069d00afa
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0005-Fixup-compatibility-of-mozbuild-with-Python-3.10.patch
@@ -0,0 +1,304 @@
1From a88d0c8e27b48344942187c2611bb121bde9332d Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= <fzatlouk@redhat.com>
3Date: Tue, 13 Jul 2021 11:46:20 +0200
4Subject: [PATCH] Fixup compatibility of mozbuild with Python 3.10
5
6Stolen from [1]
7
8[1] https://src.fedoraproject.org/rpms/mozjs78/raw/rawhide/f/Fixup-compatibility-of-mozbuild-with-Python-3.10.patch
9
10Upstream-Status: Pending
11
12---
13 python/mach/mach/config.py | 4 ++--
14 python/mach/mach/decorators.py | 2 +-
15 python/mozbuild/mozbuild/backend/configenvironment.py | 3 ++-
16 python/mozbuild/mozbuild/makeutil.py | 2 +-
17 python/mozbuild/mozbuild/util.py | 2 +-
18 testing/marionette/client/marionette_driver/wait.py | 2 +-
19 testing/mozbase/manifestparser/manifestparser/filters.py | 3 ++-
20 testing/mozbase/versioninfo.py | 2 +-
21 testing/web-platform/tests/tools/manifest/vcs.py | 2 +-
22 .../web-platform/tests/tools/third_party/h2/h2/settings.py | 2 +-
23 .../tests/tools/third_party/html5lib/html5lib/_trie/_base.py | 2 +-
24 .../tools/third_party/html5lib/html5lib/treebuilders/dom.py | 2 +-
25 .../tests/tools/third_party/hyper/hyper/common/headers.py | 2 +-
26 .../tests/tools/third_party/hyper/hyper/h2/settings.py | 2 +-
27 .../tests/tools/third_party/hyper/hyper/http11/connection.py | 4 ++--
28 .../third_party/hyper/hyper/packages/hyperframe/flags.py | 2 +-
29 .../tests/tools/third_party/hyperframe/hyperframe/flags.py | 2 +-
30 testing/web-platform/tests/tools/wptserve/wptserve/config.py | 3 ++-
31 testing/web-platform/tests/webdriver/tests/support/sync.py | 2 +-
32 19 files changed, 24 insertions(+), 21 deletions(-)
33
34diff --git a/python/mach/mach/config.py b/python/mach/mach/config.py
35index 7210eca82..edb4d2e93 100644
36--- a/python/mach/mach/config.py
37+++ b/python/mach/mach/config.py
38@@ -144,7 +144,7 @@ def reraise_attribute_error(func):
39 return _
40
41
42-class ConfigSettings(collections.Mapping):
43+class ConfigSettings(collections.abc.Mapping):
44 """Interface for configuration settings.
45
46 This is the main interface to the configuration.
47@@ -190,7 +190,7 @@ class ConfigSettings(collections.Mapping):
48 will result in exceptions being raised.
49 """
50
51- class ConfigSection(collections.MutableMapping, object):
52+ class ConfigSection(collections.abc.MutableMapping, object):
53 """Represents an individual config section."""
54 def __init__(self, config, name, settings):
55 object.__setattr__(self, '_config', config)
56diff --git a/python/mach/mach/decorators.py b/python/mach/mach/decorators.py
57index 27f7f34a6..5f63271a3 100644
58--- a/python/mach/mach/decorators.py
59+++ b/python/mach/mach/decorators.py
60@@ -140,7 +140,7 @@ def CommandProvider(cls):
61 'Conditions argument must take a list ' + \
62 'of functions. Found %s instead.'
63
64- if not isinstance(command.conditions, collections.Iterable):
65+ if not isinstance(command.conditions, collections.abc.Iterable):
66 msg = msg % (command.name, type(command.conditions))
67 raise MachError(msg)
68
69diff --git a/python/mozbuild/mozbuild/backend/configenvironment.py b/python/mozbuild/mozbuild/backend/configenvironment.py
70index 20d1a9fa6..8747958bd 100644
71--- a/python/mozbuild/mozbuild/backend/configenvironment.py
72+++ b/python/mozbuild/mozbuild/backend/configenvironment.py
73@@ -9,7 +9,8 @@ import six
74 import sys
75 import json
76
77-from collections import Iterable, OrderedDict
78+from collections import OrderedDict
79+from collections.abc import Iterable
80 from types import ModuleType
81
82 import mozpack.path as mozpath
83diff --git a/python/mozbuild/mozbuild/makeutil.py b/python/mozbuild/mozbuild/makeutil.py
84index 4da1a3b26..4ce56848c 100644
85--- a/python/mozbuild/mozbuild/makeutil.py
86+++ b/python/mozbuild/mozbuild/makeutil.py
87@@ -7,7 +7,7 @@ from __future__ import absolute_import, print_function, unicode_literals
88 import os
89 import re
90 import six
91-from collections import Iterable
92+from collections.abc import Iterable
93
94
95 class Makefile(object):
96diff --git a/python/mozbuild/mozbuild/util.py b/python/mozbuild/mozbuild/util.py
97index 044cf645c..98ed3ef52 100644
98--- a/python/mozbuild/mozbuild/util.py
99+++ b/python/mozbuild/mozbuild/util.py
100@@ -782,7 +782,7 @@ class HierarchicalStringList(object):
101 self._strings = StrictOrderingOnAppendList()
102 self._children = {}
103
104- class StringListAdaptor(collections.Sequence):
105+ class StringListAdaptor(collections.abc.Sequence):
106 def __init__(self, hsl):
107 self._hsl = hsl
108
109diff --git a/testing/marionette/client/marionette_driver/wait.py b/testing/marionette/client/marionette_driver/wait.py
110index eeaa1e23d..c147f463f 100644
111--- a/testing/marionette/client/marionette_driver/wait.py
112+++ b/testing/marionette/client/marionette_driver/wait.py
113@@ -82,7 +82,7 @@ class Wait(object):
114
115 exceptions = []
116 if ignored_exceptions is not None:
117- if isinstance(ignored_exceptions, collections.Iterable):
118+ if isinstance(ignored_exceptions, collections.abc.Iterable):
119 exceptions.extend(iter(ignored_exceptions))
120 else:
121 exceptions.append(ignored_exceptions)
122diff --git a/testing/mozbase/manifestparser/manifestparser/filters.py b/testing/mozbase/manifestparser/manifestparser/filters.py
123index 287ee033b..b1d608003 100644
124--- a/testing/mozbase/manifestparser/manifestparser/filters.py
125+++ b/testing/mozbase/manifestparser/manifestparser/filters.py
126@@ -12,7 +12,8 @@ from __future__ import absolute_import
127
128 import itertools
129 import os
130-from collections import defaultdict, MutableSequence
131+from collections import defaultdict
132+from collections.abc import MutableSequence
133
134 import six
135 from six import string_types
136diff --git a/testing/mozbase/versioninfo.py b/testing/mozbase/versioninfo.py
137index 91d1a0473..8c1680069 100755
138--- a/testing/mozbase/versioninfo.py
139+++ b/testing/mozbase/versioninfo.py
140@@ -11,7 +11,7 @@ from commit messages.
141
142 from __future__ import absolute_import, print_function
143
144-from collections import Iterable
145+from collections.abc import Iterable
146 from distutils.version import StrictVersion
147 import argparse
148 import os
149diff --git a/testing/web-platform/tests/tools/manifest/vcs.py b/testing/web-platform/tests/tools/manifest/vcs.py
150index 7c0feeb81..05ee19c7c 100644
151--- a/testing/web-platform/tests/tools/manifest/vcs.py
152+++ b/testing/web-platform/tests/tools/manifest/vcs.py
153@@ -3,7 +3,7 @@ import json
154 import os
155 import stat
156 from collections import deque
157-from collections import MutableMapping
158+from collections.abc import MutableMapping
159
160 from six import with_metaclass, PY2
161
162diff --git a/testing/web-platform/tests/tools/third_party/h2/h2/settings.py b/testing/web-platform/tests/tools/third_party/h2/h2/settings.py
163index 3da720329..e097630e9 100644
164--- a/testing/web-platform/tests/tools/third_party/h2/h2/settings.py
165+++ b/testing/web-platform/tests/tools/third_party/h2/h2/settings.py
166@@ -88,7 +88,7 @@ class ChangedSetting:
167 )
168
169
170-class Settings(collections.MutableMapping):
171+class Settings(collections.abc.MutableMapping):
172 """
173 An object that encapsulates HTTP/2 settings state.
174
175diff --git a/testing/web-platform/tests/tools/third_party/html5lib/html5lib/_trie/_base.py b/testing/web-platform/tests/tools/third_party/html5lib/html5lib/_trie/_base.py
176index a1158bbbf..a9295a2ba 100644
177--- a/testing/web-platform/tests/tools/third_party/html5lib/html5lib/_trie/_base.py
178+++ b/testing/web-platform/tests/tools/third_party/html5lib/html5lib/_trie/_base.py
179@@ -1,6 +1,6 @@
180 from __future__ import absolute_import, division, unicode_literals
181
182-from collections import Mapping
183+from collections.abc import Mapping
184
185
186 class Trie(Mapping):
187diff --git a/testing/web-platform/tests/tools/third_party/html5lib/html5lib/treebuilders/dom.py b/testing/web-platform/tests/tools/third_party/html5lib/html5lib/treebuilders/dom.py
188index dcfac220b..818a33433 100644
189--- a/testing/web-platform/tests/tools/third_party/html5lib/html5lib/treebuilders/dom.py
190+++ b/testing/web-platform/tests/tools/third_party/html5lib/html5lib/treebuilders/dom.py
191@@ -1,7 +1,7 @@
192 from __future__ import absolute_import, division, unicode_literals
193
194
195-from collections import MutableMapping
196+from collections.abc import MutableMapping
197 from xml.dom import minidom, Node
198 import weakref
199
200diff --git a/testing/web-platform/tests/tools/third_party/hyper/hyper/common/headers.py b/testing/web-platform/tests/tools/third_party/hyper/hyper/common/headers.py
201index 655a591ac..6454f550a 100644
202--- a/testing/web-platform/tests/tools/third_party/hyper/hyper/common/headers.py
203+++ b/testing/web-platform/tests/tools/third_party/hyper/hyper/common/headers.py
204@@ -10,7 +10,7 @@ import collections
205 from hyper.common.util import to_bytestring, to_bytestring_tuple
206
207
208-class HTTPHeaderMap(collections.MutableMapping):
209+class HTTPHeaderMap(collections.abc.MutableMapping):
210 """
211 A structure that contains HTTP headers.
212
213diff --git a/testing/web-platform/tests/tools/third_party/hyper/hyper/h2/settings.py b/testing/web-platform/tests/tools/third_party/hyper/hyper/h2/settings.py
214index fedc5e3c4..040afea92 100755
215--- a/testing/web-platform/tests/tools/third_party/hyper/hyper/h2/settings.py
216+++ b/testing/web-platform/tests/tools/third_party/hyper/hyper/h2/settings.py
217@@ -151,7 +151,7 @@ class ChangedSetting:
218 )
219
220
221-class Settings(collections.MutableMapping):
222+class Settings(collections.abc.MutableMapping):
223 """
224 An object that encapsulates HTTP/2 settings state.
225
226diff --git a/testing/web-platform/tests/tools/third_party/hyper/hyper/http11/connection.py b/testing/web-platform/tests/tools/third_party/hyper/hyper/http11/connection.py
227index 61361c358..a214311d2 100644
228--- a/testing/web-platform/tests/tools/third_party/hyper/hyper/http11/connection.py
229+++ b/testing/web-platform/tests/tools/third_party/hyper/hyper/http11/connection.py
230@@ -10,7 +10,7 @@ import os
231 import socket
232 import base64
233
234-from collections import Iterable, Mapping
235+from collections.abc import Iterable, Mapping
236
237 import collections
238 from hyperframe.frame import SettingsFrame
239@@ -295,7 +295,7 @@ class HTTP11Connection(object):
240 return
241
242 # Iterables that set a specific content length.
243- elif isinstance(body, collections.Iterable):
244+ elif isinstance(body, collections.abc.Iterable):
245 for item in body:
246 try:
247 self._sock.send(item)
248diff --git a/testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hyperframe/flags.py b/testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hyperframe/flags.py
249index e8f630056..8f2ea689b 100644
250--- a/testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hyperframe/flags.py
251+++ b/testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hyperframe/flags.py
252@@ -11,7 +11,7 @@ import collections
253 Flag = collections.namedtuple("Flag", ["name", "bit"])
254
255
256-class Flags(collections.MutableSet):
257+class Flags(collections.abc.MutableSet):
258 """
259 A simple MutableSet implementation that will only accept known flags as elements.
260
261diff --git a/testing/web-platform/tests/tools/third_party/hyperframe/hyperframe/flags.py b/testing/web-platform/tests/tools/third_party/hyperframe/hyperframe/flags.py
262index 05b35017e..14c352e10 100644
263--- a/testing/web-platform/tests/tools/third_party/hyperframe/hyperframe/flags.py
264+++ b/testing/web-platform/tests/tools/third_party/hyperframe/hyperframe/flags.py
265@@ -11,7 +11,7 @@ import collections
266 Flag = collections.namedtuple("Flag", ["name", "bit"])
267
268
269-class Flags(collections.MutableSet):
270+class Flags(collections.abc.MutableSet):
271 """
272 A simple MutableSet implementation that will only accept known flags as
273 elements.
274diff --git a/testing/web-platform/tests/tools/wptserve/wptserve/config.py b/testing/web-platform/tests/tools/wptserve/wptserve/config.py
275index 7766565fe..3c1c36d6f 100644
276--- a/testing/web-platform/tests/tools/wptserve/wptserve/config.py
277+++ b/testing/web-platform/tests/tools/wptserve/wptserve/config.py
278@@ -2,7 +2,8 @@ import copy
279 import logging
280 import os
281
282-from collections import defaultdict, Mapping
283+from collections import defaultdict
284+from collections.abc import Mapping
285 from six import integer_types, iteritems, itervalues, string_types
286
287 from . import sslutils
288diff --git a/testing/web-platform/tests/webdriver/tests/support/sync.py b/testing/web-platform/tests/webdriver/tests/support/sync.py
289index 3fc77131c..8e8f6b819 100644
290--- a/testing/web-platform/tests/webdriver/tests/support/sync.py
291+++ b/testing/web-platform/tests/webdriver/tests/support/sync.py
292@@ -81,7 +81,7 @@ class Poll(object):
293
294 exceptions = []
295 if ignored_exceptions is not None:
296- if isinstance(ignored_exceptions, collections.Iterable):
297+ if isinstance(ignored_exceptions, collections.abc.Iterable):
298 exceptions.extend(iter(ignored_exceptions))
299 else:
300 exceptions.append(ignored_exceptions)
301--
3022.31.1
303
304
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0006-use-asm-sgidefs.h.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0006-use-asm-sgidefs.h.patch
new file mode 100644
index 0000000000..b56f0b95b5
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0006-use-asm-sgidefs.h.patch
@@ -0,0 +1,35 @@
1From 65acc8800dba7e10da882871d4648241805c47ce 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 gdb/mips-linux-nat.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25--- a/mfbt/RandomNum.cpp
26+++ b/mfbt/RandomNum.cpp
27@@ -52,7 +52,7 @@ extern "C" BOOLEAN NTAPI RtlGenRandom(PV
28 # elif defined(__s390__)
29 # define GETRANDOM_NR 349
30 # elif defined(__mips__)
31-# include <sgidefs.h>
32+# include <asm/sgidefs.h>
33 # if _MIPS_SIM == _MIPS_SIM_ABI32
34 # define GETRANDOM_NR 4353
35 # elif _MIPS_SIM == _MIPS_SIM_ABI64
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0007-fix-musl-build.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0007-fix-musl-build.patch
new file mode 100644
index 0000000000..c0834af589
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0007-fix-musl-build.patch
@@ -0,0 +1,15 @@
1Upstream: No
2Reason: mozjs60 miscompiles on musl if built with HAVE_THREAD_TLS_KEYWORD:
3https://github.com/void-linux/void-packages/issues/2598
4--- a/js/src/old-configure.in
5+++ b/js/src/old-configure.in
6@@ -1072,6 +1072,9 @@ if test "$ac_cv_thread_keyword" = yes; t
7 *-android*|*-linuxandroid*)
8 :
9 ;;
10+ *-musl*)
11+ :
12+ ;;
13 *)
14 AC_DEFINE(HAVE_THREAD_TLS_KEYWORD)
15 ;;
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0008-riscv.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0008-riscv.patch
new file mode 100644
index 0000000000..70177d003d
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0008-riscv.patch
@@ -0,0 +1,52 @@
1Add RISCV32/64 support
2
3Upstream-Status: Pending
4
5Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
6---
7 build/moz.configure/init.configure | 6 ++++++
8 python/mozbuild/mozbuild/configure/constants.py | 2 ++
9 2 files changed, 8 insertions(+)
10
11diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
12index 0a6a33c..eeee87e 100644
13--- a/build/moz.configure/init.configure
14+++ b/build/moz.configure/init.configure
15@@ -755,6 +755,12 @@ def split_triplet(triplet, allow_msvc=False):
16 elif cpu.startswith('aarch64'):
17 canonical_cpu = 'aarch64'
18 endianness = 'little'
19+ elif cpu in ("riscv32", "riscv32gc"):
20+ canonical_cpu = "riscv32"
21+ endianness = "little"
22+ elif cpu in ("riscv64", "riscv64gc"):
23+ canonical_cpu = "riscv64"
24+ endianness = "little"
25 elif cpu == 'sh4':
26 canonical_cpu = 'sh4'
27 endianness = 'little'
28diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py
29index 7542dcd..de25be2 100644
30--- a/python/mozbuild/mozbuild/configure/constants.py
31+++ b/python/mozbuild/mozbuild/configure/constants.py
32@@ -50,6 +50,8 @@ CPU_bitness = {
33 'mips64': 64,
34 'ppc': 32,
35 'ppc64': 64,
36+ 'riscv32': 32,
37+ 'riscv64': 64,
38 's390': 32,
39 's390x': 64,
40 'sh4': 32,
41@@ -82,6 +84,8 @@ CPU_preprocessor_checks = OrderedDict((
42 ('s390', '__s390__'),
43 ('ppc64', '__powerpc64__'),
44 ('ppc', '__powerpc__'),
45+ ('riscv32', '__riscv && __SIZEOF_POINTER__ == 4'),
46+ ('riscv64', '__riscv && __SIZEOF_POINTER__ == 8'),
47 ('Alpha', '__alpha__'),
48 ('hppa', '__hppa__'),
49 ('sparc64', '__sparc__ && __arch64__'),
50--
512.31.1
52
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0009-riscv-Disable-atomic-operations.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0009-riscv-Disable-atomic-operations.patch
new file mode 100644
index 0000000000..ba50e10c6e
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0009-riscv-Disable-atomic-operations.patch
@@ -0,0 +1,52 @@
1From 64ad80e6d95871f17be4cd01da15581f41ac0b2b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 27 May 2019 21:10:34 -0700
4Subject: [PATCH] riscv: Disable atomic operations
5
6This was ported from what was used with mozjs-60 which was
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8
9Upstream-Status: Inappropriate[old-version]
10
11Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
12---
13 js/src/jit/AtomicOperations.h | 3 ++-
14 js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h | 8 ++++++++
15 2 files changed, 10 insertions(+), 1 deletion(-)
16
17diff --git a/js/src/jit/AtomicOperations.h b/js/src/jit/AtomicOperations.h
18index 0486cba..cf6b91c 100644
19--- a/js/src/jit/AtomicOperations.h
20+++ b/js/src/jit/AtomicOperations.h
21@@ -391,7 +391,8 @@ inline bool AtomicOperations::isLockfreeJS(int32_t size) {
22 #elif defined(__ppc__) || defined(__PPC__) || defined(__sparc__) || \
23 defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || \
24 defined(__PPC64LE__) || defined(__alpha__) || defined(__hppa__) || \
25- defined(__sh__) || defined(__s390__) || defined(__s390x__)
26+ defined(__sh__) || defined(__s390__) || defined(__s390x__) || \
27+ defined(__riscv)
28 # include "jit/shared/AtomicOperations-feeling-lucky.h"
29 #else
30 # error "No AtomicOperations support provided for this platform"
31diff --git a/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h b/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
32index f002cd4..14bb5f9 100644
33--- a/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
34+++ b/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
35@@ -77,6 +77,14 @@
36 # endif
37 #endif
38
39+#ifdef __riscv
40+# ifdef __riscv_xlen == 64
41+# define HAS_64BIT_ATOMICS
42+# define HAS_64BIT_LOCKFREE
43+# endif
44+#endif
45+
46+
47 // The default implementation tactic for gcc/clang is to use the newer __atomic
48 // intrinsics added for use in C++11 <atomic>. Where that isn't available, we
49 // use GCC's older __sync functions instead.
50--
512.31.1
52
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0010-riscv-Set-march-correctly.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0010-riscv-Set-march-correctly.patch
new file mode 100644
index 0000000000..befede172e
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0010-riscv-Set-march-correctly.patch
@@ -0,0 +1,60 @@
1From c3c2d1c69859c5e567005f0c3fa07a0dbe31e4a3 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Fri, 29 Oct 2021 21:18:26 +0200
4Subject: [PATCH] riscv: Set march correctly
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Stolen from leftover patch in oe-core [1]
10
11[1] https://github.com/openembedded/openembedded-core/blob/c884878f6c833b18a3a95b193f5de68df5bcea48/meta/recipes-devtools/rust/files/rv64gc.patch
12
13Upstream-Status: Pending
14
15Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
16---
17 third_party/rust/cc/src/lib.rs | 14 ++++++++++----
18 third_party/rust/cc/.cargo-checksum.json | 2 +-
19 1 file changed, 10 insertions(+), 4 deletions(-)
20
21diff --git a/third_party/rust/cc/src/lib.rs b/third_party/rust/cc/src/lib.rs
22index 621d31d..6f72e13 100644
23--- a/third_party/rust/cc/src/lib.rs
24+++ b/third_party/rust/cc/src/lib.rs
25@@ -1587,14 +1587,20 @@ impl Build {
26 let mut parts = target.split('-');
27 if let Some(arch) = parts.next() {
28 let arch = &arch[5..];
29- cmd.args.push(("-march=rv".to_owned() + arch).into());
30- // ABI is always soft-float right now, update this when this is no longer the
31- // case:
32- if arch.starts_with("64") {
33+ if target.contains("linux") && arch.starts_with("64") {
34+ cmd.args.push(("-march=rv64gc").into());
35+ cmd.args.push("-mabi=lp64d".into());
36+ } else if target.contains("linux") && arch.starts_with("32") {
37+ cmd.args.push(("-march=rv32gc").into());
38+ cmd.args.push("-mabi=ilp32d".into());
39+ } else if arch.starts_with("64") {
40+ cmd.args.push(("-march=rv".to_owned() + arch).into());
41 cmd.args.push("-mabi=lp64".into());
42 } else {
43+ cmd.args.push(("-march=rv".to_owned() + arch).into());
44 cmd.args.push("-mabi=ilp32".into());
45 }
46+ cmd.args.push("-mcmodel=medany".into());
47 }
48 }
49 }
50diff --git a/third_party/rust/cc/.cargo-checksum.json b/third_party/rust/cc/.cargo-checksum.json
51index 417fde7..70e5d02 100644
52--- a/third_party/rust/cc/.cargo-checksum.json
53+++ b/third_party/rust/cc/.cargo-checksum.json
54@@ -1 +1 @@
55-{"files":{"Cargo.lock":"3aff5f8b0a7f4d72852b11b0526f0002e6bf55f19f1ebd6470d7f97fbd540e60","Cargo.toml":"6ab10d9b6a9c6f0909074e6698c90c6b6a7223661ec2e83174d2593117cbe7f2","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"7184fbdf375a057e673257348f6d7584c0dd11b66318d98f3647f69eb610b097","src/bin/gcc-shim.rs":"b77907875029494b6288841c3aed2e4939ed40708c7f597fca5c9e2570490ca6","src/com.rs":"bcdaf1c28b71e6ef889c6b08d1ce9d7c0761344a677f523bc4c3cd297957f804","src/lib.rs":"4753929dbb7b676c19d7cfa06d0a47e37003554b80c536cbf2b892d591ef61c2","src/registry.rs":"3cc1b5a50879fa751572878ae1d0afbfc960c11665258492754b2c8bccb0ff5d","src/setup_config.rs":"7014103587d3382eac599cb76f016e2609b8140970861b2237982d1db24af265","src/winapi.rs":"ea8b7edbb9ff87957254f465c2334e714c5d6b3b19a8d757c48ea7ca0881c50c","src/windows_registry.rs":"388e79dcf3e84078ae0b086c6cdee9cf9eb7e3ffafdcbf3e2df26163661f5856","tests/cc_env.rs":"e02b3b0824ad039b47e4462c5ef6dbe6c824c28e7953af94a0f28f7b5158042e","tests/cflags.rs":"57f06eb5ce1557e5b4a032d0c4673e18fbe6f8d26c1deb153126e368b96b41b3","tests/cxxflags.rs":"c2c6c6d8a0d7146616fa1caed26876ee7bc9fcfffd525eb4743593cade5f3371","tests/support/mod.rs":"71620b178583b6e6e5e0d4cac14e2cef6afc62fb6841e0c72ed1784543abf8ac","tests/test.rs":"1605640c9b94a77f48fc92e1dc0485bdf1960da5626e2e00279e4703691656bc"},"package":"aa87058dce70a3ff5621797f1506cb837edd02ac4c0ae642b4542dce802908b8"}
56\ No newline at end of file
57+{"files":{"Cargo.lock":"3aff5f8b0a7f4d72852b11b0526f0002e6bf55f19f1ebd6470d7f97fbd540e60","Cargo.toml":"6ab10d9b6a9c6f0909074e6698c90c6b6a7223661ec2e83174d2593117cbe7f2","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"7184fbdf375a057e673257348f6d7584c0dd11b66318d98f3647f69eb610b097","src/bin/gcc-shim.rs":"b77907875029494b6288841c3aed2e4939ed40708c7f597fca5c9e2570490ca6","src/com.rs":"bcdaf1c28b71e6ef889c6b08d1ce9d7c0761344a677f523bc4c3cd297957f804","src/lib.rs":"feab2b4cc51fcfb041f83a1a689960c3c9abfbaa9580ba186244a880586ba29a","src/registry.rs":"3cc1b5a50879fa751572878ae1d0afbfc960c11665258492754b2c8bccb0ff5d","src/setup_config.rs":"7014103587d3382eac599cb76f016e2609b8140970861b2237982d1db24af265","src/winapi.rs":"ea8b7edbb9ff87957254f465c2334e714c5d6b3b19a8d757c48ea7ca0881c50c","src/windows_registry.rs":"388e79dcf3e84078ae0b086c6cdee9cf9eb7e3ffafdcbf3e2df26163661f5856","tests/cc_env.rs":"e02b3b0824ad039b47e4462c5ef6dbe6c824c28e7953af94a0f28f7b5158042e","tests/cflags.rs":"57f06eb5ce1557e5b4a032d0c4673e18fbe6f8d26c1deb153126e368b96b41b3","tests/cxxflags.rs":"c2c6c6d8a0d7146616fa1caed26876ee7bc9fcfffd525eb4743593cade5f3371","tests/support/mod.rs":"71620b178583b6e6e5e0d4cac14e2cef6afc62fb6841e0c72ed1784543abf8ac","tests/test.rs":"1605640c9b94a77f48fc92e1dc0485bdf1960da5626e2e00279e4703691656bc"},"package":"aa87058dce70a3ff5621797f1506cb837edd02ac4c0ae642b4542dce802908b8"}
58--
592.31.1
60
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0011-replace-include-by-code-to-fix-arm-build.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0011-replace-include-by-code-to-fix-arm-build.patch
new file mode 100644
index 0000000000..adca9c7213
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0011-replace-include-by-code-to-fix-arm-build.patch
@@ -0,0 +1,43 @@
1From fd6847c9416f9eebde636e21d794d25d1be8791d Mon Sep 17 00:00:00 2001
2From: Mike Hommey <mh@glandium.org>
3Date: Sat, 1 Jun 2019 09:06:01 +0900
4Subject: [PATCH] Bug 1526653 - Include struct definitions for user_vfp and
5 user_vfp_exc.
6
7* We need this to fix arm builds
8* Stolen from [1]
9
10[1] https://salsa.debian.org/mozilla-team/firefox/commit/fd6847c9416f9eebde636e21d794d25d1be8791d
11
12Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
13
14Upstream-Status: Pending
15---
16 js/src/wasm/WasmSignalHandlers.cpp | 11 ++++++++++-
17 1 file changed, 10 insertions(+), 1 deletion(-)
18
19diff --git a/js/src/wasm/WasmSignalHandlers.cpp b/js/src/wasm/WasmSignalHandlers.cpp
20index 636537f8478..383c380f04c 100644
21--- a/js/src/wasm/WasmSignalHandlers.cpp
22+++ b/js/src/wasm/WasmSignalHandlers.cpp
23@@ -248,7 +248,16 @@ using mozilla::DebugOnly;
24 #endif
25
26 #ifdef WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS
27-# include <sys/user.h>
28+struct user_vfp {
29+ unsigned long long fpregs[32];
30+ unsigned long fpscr;
31+};
32+
33+struct user_vfp_exc {
34+ unsigned long fpexc;
35+ unsigned long fpinst;
36+ unsigned long fpinst2;
37+};
38 #endif
39
40 #if defined(ANDROID)
41--
42GitLab
43
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0012-Add-SharedArrayRawBufferRefs-to-public-API.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0012-Add-SharedArrayRawBufferRefs-to-public-API.patch
new file mode 100644
index 0000000000..ca37ca72ce
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0012-Add-SharedArrayRawBufferRefs-to-public-API.patch
@@ -0,0 +1,35 @@
1From ccdd47cee610cb33fa5f67f856a68f5e411c79d5 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Sun, 31 Oct 2021 18:32:39 +0100
4Subject: [PATCH] Add SharedArrayRawBufferRefs to public API
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Stolen from [1]
10
11[1] https://src.fedoraproject.org/rpms/mozjs78/blob/rawhide/f/FixSharedArray.diff
12
13Upstream-Status: Pending
14
15Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
16---
17 js/public/StructuredClone.h | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/js/public/StructuredClone.h b/js/public/StructuredClone.h
21index cb3cd5b..06da4dd 100644
22--- a/js/public/StructuredClone.h
23+++ b/js/public/StructuredClone.h
24@@ -381,7 +381,7 @@ enum OwnTransferablePolicy {
25 namespace js {
26 class SharedArrayRawBuffer;
27
28-class SharedArrayRawBufferRefs {
29+class JS_PUBLIC_API SharedArrayRawBufferRefs {
30 public:
31 SharedArrayRawBufferRefs() = default;
32 SharedArrayRawBufferRefs(SharedArrayRawBufferRefs&& other) = default;
33--
342.31.1
35
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
new file mode 100644
index 0000000000..da404fb80c
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78_78.15.0.bb
@@ -0,0 +1,140 @@
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 = " \
7 https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz \
8 file://0001-rust.configure-Skip-all-target-manipulations.patch \
9 file://0002-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch \
10 file://0003-Do-not-check-binaries-after-build.patch \
11 file://0004-Cargo.toml-do-not-abort-on-panic.patch \
12 file://0005-Fixup-compatibility-of-mozbuild-with-Python-3.10.patch \
13 file://0006-use-asm-sgidefs.h.patch \
14 file://0007-fix-musl-build.patch \
15 file://0008-riscv.patch \
16 file://0009-riscv-Disable-atomic-operations.patch \
17 file://0010-riscv-Set-march-correctly.patch \
18 file://0011-replace-include-by-code-to-fix-arm-build.patch \
19 file://0012-Add-SharedArrayRawBufferRefs-to-public-API.patch \
20"
21
22SRC_URI[sha256sum] = "a4438d84d95171a6d4fea9c9f02c2edbf0475a9c614d968ebe2eedc25a672151"
23S = "${WORKDIR}/firefox-${@d.getVar("PV").replace("esr", "")}"
24
25DEPENDS = " \
26 autoconf-2.13-native \
27 icu-native \
28 cargo-native \
29 zlib \
30 python3-six \
31 python3-six-native \
32"
33
34inherit autotools pkgconfig rust python3native siteinfo
35
36JIT ?= ""
37JIT:mipsarch = "--disable-jit"
38
39EXTRA_OECONF = " \
40 --target=${TARGET_SYS} \
41 --host=${BUILD_SYS} \
42 --prefix=${prefix} \
43 --libdir=${libdir} \
44 --without-system-icu \
45 --disable-tests --disable-strip --disable-optimize \
46 --disable-jemalloc \
47 ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \
48 ${JIT} \
49"
50
51# Note: Python with mozilla build is a mess: E.g: python-six: to get an error
52# free configure we need:
53# * python3-six-native in DEPENDS
54# * python3-six in DEPENDS
55# * path to python-six shipped by mozilla in PYTHONPATH
56prepare_python_and_rust() {
57 if [ ! -f ${B}/PYTHONPATH ]; then
58 oldpath=`pwd`
59 cd ${S}
60 # Add mozjs python-modules necessary
61 PYTHONPATH="${S}/build:${S}/config"
62 PYTHONPATH="$PYTHONPATH:${S}/third_party/python/distro:${S}/third_party/python/jsmin"
63 PYTHONPATH="$PYTHONPATH:${S}/third_party/python/pytoml:${S}/third_party/python/six"
64 PYTHONPATH="$PYTHONPATH:${S}/third_party/python/pyyaml/lib3:${S}/third_party/python/which"
65 for sub_dir in python testing/mozbase; do
66 for module_dir in `ls $sub_dir -1`;do
67 [ $module_dir = "virtualenv" ] && continue
68 if [ -d "${S}/$sub_dir/$module_dir" ];then
69 PYTHONPATH="$PYTHONPATH:${S}/$sub_dir/$module_dir"
70 fi
71 done
72 done
73 # looks odd but it's huge and we want to see what's in there
74 echo "$PYTHONPATH" > ${B}/PYTHONPATH
75 cd "$oldpath"
76 fi
77
78 export PYTHONPATH=`cat ${B}/PYTHONPATH`
79
80 export RUST_TARGET_PATH="${RUST_TARGET_PATH}"
81 export RUST_TARGET="${TARGET_SYS}"
82 export RUSTFLAGS="${RUSTFLAGS}"
83}
84
85export HOST_CC = "${BUILD_CC}"
86export HOST_CXX = "${BUILD_CXX}"
87export HOST_CFLAGS = "${BUILD_CFLAGS}"
88export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}"
89export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"
90# otherwise we are asked for yasm...
91export AS = "${CC}"
92
93do_configure() {
94 prepare_python_and_rust
95
96 cd ${S}/js/src
97 autoconf213 --macrodir=${STAGING_DATADIR_NATIVE}/autoconf213 old-configure.in > old-configure
98
99 cd ${B}
100 # * use of /tmp can causes problems on heavily loaded hosts
101 # * with mozjs-78 we get without:
102 # | Path specified in LOCAL_INCLUDES (..) resolves to the topsrcdir or topobjdir (<tmpdir>/oe-core-glibc/work/cortexa72-mortsgna-linux/mozjs-78/78.15.0-r0/firefox-78.15.0/js/src), which is not allowed
103 mkdir -p "${B}/lcl_tmp"
104 TMPDIR="${B}/lcl_tmp" ${S}/js/src/configure ${EXTRA_OECONF}
105
106 # inspired by what fedora [1] does: for big endian rebuild icu dat
107 # this avoids gjs qemu crash on mips at gir creation
108 # [1] https://src.fedoraproject.org/rpms/mozjs78/blob/rawhide/f/mozjs78.spec
109 if [ ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} = "big" ]; then
110 echo "Do big endian icu dat-convert..."
111 icupkg -tb ${S}/config/external/icu/data/icudt67l.dat ${S}/config/external/icu/data/icudt67b.dat
112 rm -f ${S}/config/external/icu/data/icudt*l.dat
113 fi
114}
115
116do_compile:prepend() {
117 prepare_python_and_rust
118}
119
120do_install:prepend() {
121 prepare_python_and_rust
122}
123
124MAJOR_VERSION = "${@oe.utils.trim_version("${PV}", 1)}"
125do_install:append() {
126 # tidy up installation
127 chmod -x ${D}${libdir}/pkgconfig/*.pc
128 sed -i 's:\x24{includedir}/mozjs-78/js/RequiredDefines.h:js/RequiredDefines.h:g' ${D}${libdir}/pkgconfig/*.pc
129
130 mv ${D}${libdir}/libmozjs-${MAJOR_VERSION}.so ${D}${libdir}/libmozjs-${MAJOR_VERSION}.so.${PV}
131 ln -s libmozjs-${MAJOR_VERSION}.so.${PV} ${D}${libdir}/libmozjs-${MAJOR_VERSION}.so.${MAJOR_VERSION}
132 ln -s libmozjs-${MAJOR_VERSION}.so.${PV} ${D}${libdir}/libmozjs-${MAJOR_VERSION}.so
133
134 rm -f ${D}${libdir}/libjs_static.ajs
135}
136
137ARM_INSTRUCTION_SET:armv5 = "arm"
138ARM_INSTRUCTION_SET:armv4 = "arm"
139
140DISABLE_STATIC = ""