mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-03 02:10:04 +00:00
mozjs: update 60.9.0 -> 91.1.0
The new release requires rust to build and at the same time allows updating to python 3.10; I took the opportunity to rewrite the recipe from scratch, drop all the old cruft and use the official, current upstream build system in it. All prior patches and tweaks have been dropped; I have no reasonable way to test them, so if something regressed for you I'm afraid it needs to be addressed after the fact. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
committed by
Khem Raj
parent
cbd09fd140
commit
66a0f5b8eb
+32
@@ -0,0 +1,32 @@
|
||||
From 9e37248870b2b955293754933c789ca00bca06ef Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex@linutronix.de>
|
||||
Date: Fri, 1 Oct 2021 13:00:24 +0200
|
||||
Subject: [PATCH] Cargo.toml: do not abort on panic
|
||||
|
||||
OE's rust is configured to unwind, and this setting clashes with it/
|
||||
|
||||
Upstream-Status: Inappropriate [oe-core specific]
|
||||
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
|
||||
---
|
||||
Cargo.toml | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index 09f3e7292f..0fff412569 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -57,7 +57,6 @@ panic = "abort"
|
||||
opt-level = 2
|
||||
rpath = false
|
||||
debug-assertions = false
|
||||
-panic = "abort"
|
||||
|
||||
# Optimize build dependencies, because bindgen and proc macros / style
|
||||
# compilation take more to run than to build otherwise.
|
||||
@@ -105,4 +104,4 @@ path = "third_party/rust/mio"
|
||||
|
||||
# Patch failure 0.1.8 to disable the backtrace feature by default. See bug 1608157.
|
||||
[patch.crates-io.failure]
|
||||
-path = "third_party/rust/failure"
|
||||
\ No newline at end of file
|
||||
+path = "third_party/rust/failure"
|
||||
-6897
File diff suppressed because it is too large
Load Diff
+28
@@ -0,0 +1,28 @@
|
||||
From e5b95b3918588e2930c9af7ba304c57e871b2d55 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex@linutronix.de>
|
||||
Date: Thu, 7 Oct 2021 12:44:18 +0200
|
||||
Subject: [PATCH] build: do not use autoconf's config.sub to 'canonicalize'
|
||||
names
|
||||
|
||||
The outcome is that processed names no longer match our custom rust
|
||||
target definitions, and the build fails.
|
||||
|
||||
Upstream-Status: Inappropriate [oe-core specific]
|
||||
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
|
||||
---
|
||||
build/moz.configure/init.configure | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
|
||||
index 3a164c6558..99dfc9054a 100644
|
||||
--- a/build/moz.configure/init.configure
|
||||
+++ b/build/moz.configure/init.configure
|
||||
@@ -823,7 +823,7 @@ def help_host_target(help, host, target):
|
||||
|
||||
def config_sub(shell, triplet):
|
||||
config_sub = os.path.join(os.path.dirname(__file__), "..", "autoconf", "config.sub")
|
||||
- return check_cmd_output(shell, config_sub, triplet).strip()
|
||||
+ return triplet
|
||||
|
||||
|
||||
@depends("--host", shell)
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
From 0a61b0b98c152f10404ccbdeeac583a486638a7a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
|
||||
Date: Thu, 6 Jun 2013 18:36:01 +0200
|
||||
Subject: [PATCH] js.pc.in: do not include RequiredDefines.h for depending
|
||||
packages
|
||||
|
||||
in our cross environment the would fail with:
|
||||
|
||||
| cc1: fatal error: /usr/include/js-17.0/js/RequiredDefines.h: No such file or directory
|
||||
|
||||
and currently it only defines __STDC_LIMIT_MACROS
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
|
||||
|
||||
Rebase to 52.8.1
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
---
|
||||
js/src/build/js.pc.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/src/build/js.pc.in b/js/src/build/js.pc.in
|
||||
index 2eae393..c2dea62 100644
|
||||
--- a/js/src/build/js.pc.in
|
||||
+++ b/js/src/build/js.pc.in
|
||||
@@ -8,4 +8,4 @@ Description: The Mozilla library for JavaScript
|
||||
Version: @MOZILLA_VERSION@
|
||||
@PKGCONF_REQUIRES_PRIVATE@
|
||||
Libs: -L${libdir} -l@JS_LIBRARY_NAME@
|
||||
-Cflags: -include ${includedir}/@JS_LIBRARY_NAME@/js/RequiredDefines.h -I${includedir}/@JS_LIBRARY_NAME@
|
||||
+Cflags: -I${includedir}/@JS_LIBRARY_NAME@
|
||||
--
|
||||
2.7.4
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
From 0133ddb86eb6e0741e02b0032c41468db6438530 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex@linutronix.de>
|
||||
Date: Fri, 1 Oct 2021 13:01:10 +0200
|
||||
Subject: [PATCH] moz.configure: do not look for llvm-objdump
|
||||
|
||||
This avoid dragging in a dependency that isn't even needed
|
||||
for js builds.
|
||||
|
||||
Upstream-Status: Inappropriate [oe-core specific]
|
||||
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
|
||||
---
|
||||
moz.configure | 18 +++++++++---------
|
||||
1 file changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/moz.configure b/moz.configure
|
||||
index fc66b520d0..15de9a2ee0 100755
|
||||
--- a/moz.configure
|
||||
+++ b/moz.configure
|
||||
@@ -994,15 +994,15 @@ def llvm_objdump(host_c_compiler, c_compiler, bindgen_config_paths):
|
||||
return (llvm_objdump,)
|
||||
|
||||
|
||||
-llvm_objdump = check_prog(
|
||||
- "LLVM_OBJDUMP",
|
||||
- llvm_objdump,
|
||||
- what="llvm-objdump",
|
||||
- when="--enable-compile-environment",
|
||||
- paths=clang_search_path,
|
||||
-)
|
||||
-
|
||||
-add_old_configure_assignment("LLVM_OBJDUMP", llvm_objdump)
|
||||
+#llvm_objdump = check_prog(
|
||||
+# "LLVM_OBJDUMP",
|
||||
+# llvm_objdump,
|
||||
+# what="llvm-objdump",
|
||||
+# when="--enable-compile-environment",
|
||||
+# paths=clang_search_path,
|
||||
+#)
|
||||
+
|
||||
+#add_old_configure_assignment("LLVM_OBJDUMP", llvm_objdump)
|
||||
|
||||
|
||||
option("--enable-dtrace", help="Build with dtrace support")
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
From a452138a1dd274bfad381a701729783360dc86fb Mon Sep 17 00:00:00 2001
|
||||
From: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
|
||||
Date: Tue, 5 Jan 2016 22:04:17 +0100
|
||||
Subject: [PATCH] fix cross compilation on i586 targets
|
||||
|
||||
Remove offending -Wl,-rpath-link that may cause host libraries to be picked
|
||||
during linking. The patch applies a fix to configure.in. So as not to
|
||||
regenerate configure, similar fix is applied there.
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
|
||||
|
||||
Rebase to 52.8.1
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
|
||||
Rebase to 60.9.0 (firefox-esr sources)
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
|
||||
---
|
||||
js/src/old-configure.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/src/old-configure.in b/js/src/old-configure.in
|
||||
index 3d53ee1..11c3d5a 100644
|
||||
--- a/js/src/old-configure.in
|
||||
+++ b/js/src/old-configure.in
|
||||
@@ -405,7 +405,7 @@ AS='$(CC)'
|
||||
AS_DASH_C_FLAG='-c'
|
||||
MOZ_USER_DIR=".mozilla"
|
||||
|
||||
-MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin -Wl,-rpath-link,${prefix}/lib"
|
||||
+MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin"
|
||||
|
||||
dnl Configure platform-specific CPU architecture compiler options.
|
||||
dnl ==============================================================
|
||||
--
|
||||
2.21.0
|
||||
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
From 749ba11fd6a69c8180945d4866415d16ae06a9c0 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex@linutronix.de>
|
||||
Date: Fri, 1 Oct 2021 13:02:17 +0200
|
||||
Subject: [PATCH] rust.configure: do not try to find a suitable upstream target
|
||||
|
||||
OE is using custom targets and so this is bound to fail.
|
||||
|
||||
Upstream-Status: Inapppropriate [oe-core specific]
|
||||
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
|
||||
---
|
||||
build/moz.configure/rust.configure | 34 ++----------------------------
|
||||
1 file changed, 2 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure
|
||||
index cd77d72bb7..4b6481cbe3 100644
|
||||
--- a/build/moz.configure/rust.configure
|
||||
+++ b/build/moz.configure/rust.configure
|
||||
@@ -459,33 +459,7 @@ def assert_rust_compile(host_or_target, rustc_target, rustc):
|
||||
def rust_host_triple(
|
||||
rustc, host, compiler_info, rustc_host, rust_supported_targets, arm_target
|
||||
):
|
||||
- rustc_target = detect_rustc_target(
|
||||
- host, compiler_info, arm_target, rust_supported_targets
|
||||
- )
|
||||
- if rustc_target != rustc_host:
|
||||
- if host.alias == rustc_target:
|
||||
- configure_host = host.alias
|
||||
- else:
|
||||
- configure_host = "{}/{}".format(host.alias, rustc_target)
|
||||
- die(
|
||||
- dedent(
|
||||
- """\
|
||||
- The rust compiler host ({rustc}) is not suitable for the configure host ({configure}).
|
||||
-
|
||||
- You can solve this by:
|
||||
- * Set your configure host to match the rust compiler host by editing your
|
||||
- mozconfig and adding "ac_add_options --host={rustc}".
|
||||
- * Or, install the rust toolchain for {configure}, if supported, by running
|
||||
- "rustup default stable-{rustc_target}"
|
||||
- """.format(
|
||||
- rustc=rustc_host,
|
||||
- configure=configure_host,
|
||||
- rustc_target=rustc_target,
|
||||
- )
|
||||
- )
|
||||
- )
|
||||
- assert_rust_compile(host, rustc_target, rustc)
|
||||
- return rustc_target
|
||||
+ return rustc_host
|
||||
|
||||
|
||||
@depends(
|
||||
@@ -495,11 +469,7 @@ def rust_host_triple(
|
||||
def rust_target_triple(
|
||||
rustc, target, compiler_info, rust_supported_targets, arm_target
|
||||
):
|
||||
- rustc_target = detect_rustc_target(
|
||||
- target, compiler_info, arm_target, rust_supported_targets
|
||||
- )
|
||||
- assert_rust_compile(target, rustc_target, rustc)
|
||||
- return rustc_target
|
||||
+ return target.alias
|
||||
|
||||
|
||||
set_config("RUST_TARGET", rust_target_triple)
|
||||
-64
@@ -1,64 +0,0 @@
|
||||
From 5028d1cd669c179ed49061316d04c8e8862a5bd8 Mon Sep 17 00:00:00 2001
|
||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
Date: Thu, 12 Jul 2018 15:04:47 +0800
|
||||
Subject: [PATCH 1/5] do not create python environment
|
||||
|
||||
Use oe's python environment rather than create one of host
|
||||
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
|
||||
Rebase to 60.9.0 (firefox-esr sources)
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
|
||||
---
|
||||
build/moz.configure/init.configure | 18 ------------------
|
||||
configure.py | 10 +++++++++-
|
||||
3 files changed, 11 insertions(+), 21 deletions(-)
|
||||
|
||||
--- a/build/moz.configure/init.configure
|
||||
+++ b/build/moz.configure/init.configure
|
||||
@@ -250,24 +250,6 @@ def virtualenv_python(env_python, build_
|
||||
else:
|
||||
python = sys.executable
|
||||
|
||||
- if not manager.up_to_date(python):
|
||||
- log.info('Creating Python environment')
|
||||
- manager.build(python)
|
||||
-
|
||||
- python = normsep(manager.python_path)
|
||||
-
|
||||
- if python != normsep(sys.executable):
|
||||
- log.info('Reexecuting in the virtualenv')
|
||||
- if env_python:
|
||||
- del os.environ['PYTHON']
|
||||
- # One would prefer to use os.execl, but that's completely borked on
|
||||
- # Windows.
|
||||
- sys.exit(subprocess.call([python] + sys.argv))
|
||||
-
|
||||
- # We are now in the virtualenv
|
||||
- if not distutils.sysconfig.get_python_lib():
|
||||
- die('Could not determine python site packages directory')
|
||||
-
|
||||
return python
|
||||
|
||||
|
||||
--- a/configure.py
|
||||
+++ b/configure.py
|
||||
@@ -12,7 +12,15 @@ import textwrap
|
||||
|
||||
|
||||
base_dir = os.path.abspath(os.path.dirname(__file__))
|
||||
-sys.path.insert(0, os.path.join(base_dir, 'python', 'mozbuild'))
|
||||
+sys.path.insert(0, os.path.join(base_dir, 'config'))
|
||||
+def get_immediate_subdirectories(a_dir):
|
||||
+ return [name for name in os.listdir(a_dir)
|
||||
+ if os.path.isdir(os.path.join(a_dir, name))]
|
||||
+for s in ["python", "testing/mozbase"]:
|
||||
+ sub_dir = os.path.join(base_dir, s)
|
||||
+ for module_dir in get_immediate_subdirectories(sub_dir):
|
||||
+ sys.path.insert(0, os.path.join(sub_dir, module_dir))
|
||||
+
|
||||
from mozbuild.configure import ConfigureSandbox
|
||||
from mozbuild.makeutil import Makefile
|
||||
from mozbuild.pythonutil import iter_modules_in_path
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
From e6dcee5f8a0f80ce99946b81fa1233611a149fe6 Mon Sep 17 00:00:00 2001
|
||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
Date: Thu, 12 Jul 2018 18:00:52 +0800
|
||||
Subject: [PATCH 2/5] fix cannot find link
|
||||
|
||||
..
|
||||
|DEBUG: link: Trying 'mips64-wrs-linux-ld --sysroot=tmp-glibc/work/
|
||||
mips64-wrs-linux/mozjs/52.8.1-r0/recipe-sysroot '
|
||||
|ERROR: Cannot find link
|
||||
...
|
||||
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
---
|
||||
build/moz.configure/checks.configure | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/build/moz.configure/checks.configure b/build/moz.configure/checks.configure
|
||||
index 8c2dbc0..83bffc3 100644
|
||||
--- a/build/moz.configure/checks.configure
|
||||
+++ b/build/moz.configure/checks.configure
|
||||
@@ -128,7 +128,7 @@ def check_prog(var, progs, what=None, input=None, allow_missing=False,
|
||||
|
||||
for prog in value or progs:
|
||||
log.debug('%s: Trying %s', var.lower(), quote(prog))
|
||||
- result = find_program(prog, paths)
|
||||
+ result = find_program(prog.split()[0], paths)
|
||||
if result:
|
||||
return result
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
From 646a78262b18e19721cd41ee515215221dd241b6 Mon Sep 17 00:00:00 2001
|
||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
Date: Thu, 12 Jul 2018 18:12:42 +0800
|
||||
Subject: [PATCH 3/5] workaround autoconf 2.13 detection failed
|
||||
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
---
|
||||
build/moz.configure/old.configure | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
|
||||
index b32c3f7..ece47f4 100644
|
||||
--- a/build/moz.configure/old.configure
|
||||
+++ b/build/moz.configure/old.configure
|
||||
@@ -31,7 +31,7 @@ def autoconf(mozconfig, autoconf):
|
||||
autoconf = autoconf[0] if autoconf else None
|
||||
|
||||
for ac in (mozconfig_autoconf, autoconf, 'autoconf-2.13', 'autoconf2.13',
|
||||
- 'autoconf213'):
|
||||
+ 'autoconf213', 'autoconf'):
|
||||
if ac:
|
||||
autoconf = find_program(ac)
|
||||
if autoconf:
|
||||
--
|
||||
2.7.4
|
||||
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
From 55d833dc3c194f1eb7841f308ad3b9ec3800d3b3 Mon Sep 17 00:00:00 2001
|
||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
Date: Fri, 13 Jul 2018 15:48:32 +0800
|
||||
Subject: [PATCH 5/5] fix do_compile failed on mips
|
||||
|
||||
Link with var-OS_LDFLAGS to fix the issue.
|
||||
Such as on mips:
|
||||
...
|
||||
|mips-wrsmllib32-linux-g++ -meb -mabi=32 -mhard-float ... -o libmozjs-52.so
|
||||
|/usr/include/c++/8.1.0/bits/atomic_base.h:514: error: undefined
|
||||
reference to '__atomic_fetch_add_8'
|
||||
...
|
||||
|
||||
In recipe, set OS_LDFLAGS="-Wl,-latomic" could fix the issue.
|
||||
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
---
|
||||
config/config.mk | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/config/config.mk
|
||||
+++ b/config/config.mk
|
||||
@@ -423,7 +423,7 @@ EXPAND_MKSHLIB_ARGS = --uselist
|
||||
ifdef SYMBOL_ORDER
|
||||
EXPAND_MKSHLIB_ARGS += --symbol-order $(SYMBOL_ORDER)
|
||||
endif
|
||||
-EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB)
|
||||
+EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB) $(OS_LDFLAGS)
|
||||
|
||||
# autoconf.mk sets OBJ_SUFFIX to an error to avoid use before including
|
||||
# this file
|
||||
-50
@@ -1,50 +0,0 @@
|
||||
Add RISC-V support
|
||||
|
||||
Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1318905]
|
||||
|
||||
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
|
||||
|
||||
--- a/build/autoconf/config.guess
|
||||
+++ b/build/autoconf/config.guess
|
||||
@@ -1029,6 +1029,9 @@ EOF
|
||||
ppcle:Linux:*:*)
|
||||
echo powerpcle-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
|
||||
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
+ exit ;;
|
||||
s390:Linux:*:* | s390x:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
|
||||
exit ;;
|
||||
--- a/build/moz.configure/init.configure
|
||||
+++ b/build/moz.configure/init.configure
|
||||
@@ -658,6 +658,9 @@ def split_triplet(triplet, allow_unknown
|
||||
elif cpu == 'sh4':
|
||||
canonical_cpu = 'sh4'
|
||||
endianness = 'little'
|
||||
+ elif cpu in ('riscv32', 'riscv64'):
|
||||
+ canonical_cpu = cpu
|
||||
+ endianness = 'little'
|
||||
elif allow_unknown:
|
||||
canonical_cpu = cpu
|
||||
endianness = 'unknown'
|
||||
--- a/python/mozbuild/mozbuild/configure/constants.py
|
||||
+++ b/python/mozbuild/mozbuild/configure/constants.py
|
||||
@@ -50,6 +50,8 @@ CPU_bitness = {
|
||||
'mips64': 64,
|
||||
'ppc': 32,
|
||||
'ppc64': 64,
|
||||
+ 'riscv32': 32,
|
||||
+ 'riscv64': 64,
|
||||
's390': 32,
|
||||
's390x': 64,
|
||||
'sh4': 32,
|
||||
@@ -82,6 +84,8 @@ CPU_preprocessor_checks = OrderedDict((
|
||||
('s390', '__s390__'),
|
||||
('ppc64', '__powerpc64__'),
|
||||
('ppc', '__powerpc__'),
|
||||
+ ('riscv32', '__riscv && __SIZEOF_POINTER__ == 4'),
|
||||
+ ('riscv64', '__riscv && __SIZEOF_POINTER__ == 8'),
|
||||
('Alpha', '__alpha__'),
|
||||
('hppa', '__hppa__'),
|
||||
('sparc64', '__sparc__ && __arch64__'),
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
From 20b639b7364f9953fdacb058f9ba800bcbf029b4 Mon Sep 17 00:00:00 2001
|
||||
From: Changqing Li <changqing.li@windriver.com>
|
||||
Date: Thu, 2 Aug 2018 09:40:48 +0800
|
||||
Subject: [PATCH] mozjs: fix coredump caused by getenv
|
||||
|
||||
Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1480315]
|
||||
|
||||
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
||||
---
|
||||
mozglue/misc/TimeStamp.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/mozglue/misc/TimeStamp.cpp b/mozglue/misc/TimeStamp.cpp
|
||||
index 932b75c..7a4d71b 100644
|
||||
--- a/mozglue/misc/TimeStamp.cpp
|
||||
+++ b/mozglue/misc/TimeStamp.cpp
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
+#include <stdlib.h>
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
Drop enable format string warnings to help gcc9
|
||||
|
||||
Fixes
|
||||
| /mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/mozjs/52.9.1-r0/mozjs-52.9.1/js/src/jit/x64/BaseAssembler-x64.h:596:13: error: '%s' directive argument is null [-Werror=format-overflow=]
|
||||
| 596 | spew("movq " MEM_obs ", %s", ADDR_obs(offset, base, index, scale), GPReg64Name(dst));
|
||||
| | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Upstream-Status: Inappropriate [Workaround for gcc9]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
--- a/js/src/moz.build
|
||||
+++ b/js/src/moz.build
|
||||
@@ -785,7 +785,7 @@ if CONFIG['JS_HAS_CTYPES']:
|
||||
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
||||
# Also disable strict-aliasing for GCC compiler, that is enabled by default
|
||||
# starting with version 7.1, see Bug 1363009
|
||||
- CXXFLAGS += ['-Wno-shadow', '-Werror=format', '-fno-strict-aliasing']
|
||||
+ CXXFLAGS += ['-Wno-shadow', '-fno-strict-aliasing']
|
||||
|
||||
# Suppress warnings in third-party code.
|
||||
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
From 9afb0e4d3b9209ea198052cea0401bef7ee25ad8 Mon Sep 17 00:00:00 2001
|
||||
From: Lei Maohui <leimaohui@cn.fujitsu.com>
|
||||
Date: Thu, 9 May 2019 12:23:40 +0900
|
||||
Subject: [PATCH] To fix build error on arm32BE.
|
||||
|
||||
error: #error Target architecture was not detected as supported by Double-Conversion.
|
||||
|
||||
Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
|
||||
---
|
||||
mfbt/double-conversion/double-conversion/utils.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/mfbt/double-conversion/double-conversion/utils.h b/mfbt/double-conversion/double-conversion/utils.h
|
||||
index 4f37218..93575cb 100644
|
||||
--- a/mfbt/double-conversion/double-conversion/utils.h
|
||||
+++ b/mfbt/double-conversion/double-conversion/utils.h
|
||||
@@ -53,7 +53,7 @@
|
||||
// disabled.)
|
||||
// On Linux,x86 89255e-22 != Div_double(89255.0/1e22)
|
||||
#if defined(_M_X64) || defined(__x86_64__) || \
|
||||
- defined(__ARMEL__) || defined(__avr32__) || \
|
||||
+ defined(__arm__) || defined(__avr32__) || \
|
||||
defined(__hppa__) || defined(__ia64__) || \
|
||||
defined(__mips__) || \
|
||||
defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
|
||||
--
|
||||
2.7.4
|
||||
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
patch from https://bugzilla.mozilla.org/show_bug.cgi?id=1426865
|
||||
|
||||
Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1426865]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
--- a/js/public/TypeDecls.h
|
||||
+++ b/js/public/TypeDecls.h
|
||||
@@ -21,31 +21,32 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "js-config.h"
|
||||
+#include "jstypes.h"
|
||||
|
||||
typedef uint8_t jsbytecode;
|
||||
|
||||
-class JSAtom;
|
||||
-struct JSCompartment;
|
||||
-struct JSContext;
|
||||
-class JSFunction;
|
||||
-class JSObject;
|
||||
-struct JSRuntime;
|
||||
-class JSScript;
|
||||
-class JSString;
|
||||
-class JSAddonId;
|
||||
-struct JSFreeOp;
|
||||
+class JS_PUBLIC_API JSAtom;
|
||||
+struct JS_PUBLIC_API JSCompartment;
|
||||
+struct JS_PUBLIC_API JSContext;
|
||||
+class JS_PUBLIC_API JSFunction;
|
||||
+class JS_PUBLIC_API JSObject;
|
||||
+struct JS_PUBLIC_API JSRuntime;
|
||||
+class JS_PUBLIC_API JSScript;
|
||||
+class JS_PUBLIC_API JSString;
|
||||
+class JS_PUBLIC_API JSAddonId;
|
||||
+struct JS_PUBLIC_API JSFreeOp;
|
||||
|
||||
-struct jsid;
|
||||
+struct JS_PUBLIC_API jsid;
|
||||
|
||||
namespace JS {
|
||||
|
||||
typedef unsigned char Latin1Char;
|
||||
|
||||
-class Symbol;
|
||||
-class Value;
|
||||
-class Realm;
|
||||
-struct Runtime;
|
||||
-struct Zone;
|
||||
+class JS_PUBLIC_API Symbol;
|
||||
+class JS_PUBLIC_API Value;
|
||||
+class JS_PUBLIC_API Realm;
|
||||
+struct JS_PUBLIC_API Runtime;
|
||||
+struct JS_PUBLIC_API Zone;
|
||||
|
||||
template <typename T>
|
||||
class Handle;
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
From 64ad80e6d95871f17be4cd01da15581f41ac0b2b Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 27 May 2019 21:10:34 -0700
|
||||
Subject: [PATCH] riscv: Disable atomic operations
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
js/src/jit/AtomicOperations.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/js/src/jit/AtomicOperations.h
|
||||
+++ b/js/src/jit/AtomicOperations.h
|
||||
@@ -393,6 +393,8 @@ inline bool AtomicOperations::isLockfree
|
||||
#include "jit/none/AtomicOperations-feeling-lucky.h"
|
||||
#elif defined(__s390__) || defined(__s390x__)
|
||||
#include "jit/none/AtomicOperations-feeling-lucky.h"
|
||||
+#elif defined(__riscv)
|
||||
+#include "jit/none/AtomicOperations-feeling-lucky.h"
|
||||
#else
|
||||
#error "No AtomicOperations support provided for this platform"
|
||||
#endif
|
||||
--- a/js/src/jit/none/AtomicOperations-feeling-lucky.h
|
||||
+++ b/js/src/jit/none/AtomicOperations-feeling-lucky.h
|
||||
@@ -80,6 +80,14 @@
|
||||
#define GNUC_COMPATIBLE
|
||||
#endif
|
||||
|
||||
+#ifdef __riscv
|
||||
+#define GNUC_COMPATIBLE
|
||||
+#ifdef __riscv_xlen == 64
|
||||
+#define HAS_64BIT_ATOMICS
|
||||
+#define HAS_64BIT_LOCKFREE
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
// The default implementation tactic for gcc/clang is to use the newer
|
||||
// __atomic intrinsics added for use in C++11 <atomic>. Where that
|
||||
// isn't available, we use GCC's older __sync functions instead.
|
||||
-111
@@ -1,111 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Lars T Hansen <lhansen@mozilla.com>
|
||||
# Date 1538489772 -7200
|
||||
# Node ID bb430eaf5521aa8ab233a45b585ff9e5dfecf4c9
|
||||
# Parent e87d7028568e721e8d297ce62f9622e74d29bb37
|
||||
Bug 1495731 - remove JS_VOLATILE_ARM, it is no longer relevant. r=waldo
|
||||
|
||||
JS_VOLATILE_ARM was a workaround for a gcc 4.7 bug on B2G where it
|
||||
would generate unaligned word accesses that should have been
|
||||
individual byte accesses. We now require at least gcc 6.1 (and ARM
|
||||
systems support unaligned accesses).
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
Upstream-Status: Backport [https://hg.mozilla.org/integration/mozilla-inbound/rev/bb430eaf5521]
|
||||
|
||||
--- a/js/src/vm/TypedArrayObject-inl.h
|
||||
+++ b/js/src/vm/TypedArrayObject-inl.h
|
||||
@@ -259,68 +259,61 @@ class ElementSpecific {
|
||||
return true;
|
||||
}
|
||||
|
||||
- // Inhibit unaligned accesses on ARM (bug 1097253, a compiler bug).
|
||||
-#if defined(__arm__) && defined(__GNUC__) && !defined(__clang__)
|
||||
-#define JS_VOLATILE_ARM volatile
|
||||
-#else
|
||||
-#define JS_VOLATILE_ARM
|
||||
-#endif
|
||||
-
|
||||
SharedMem<void*> data = Ops::extract(source);
|
||||
switch (source->type()) {
|
||||
case Scalar::Int8: {
|
||||
- SharedMem<JS_VOLATILE_ARM int8_t*> src =
|
||||
- data.cast<JS_VOLATILE_ARM int8_t*>();
|
||||
+ SharedMem<int8_t*> src =
|
||||
+ data.cast<int8_t*>();
|
||||
for (uint32_t i = 0; i < count; ++i)
|
||||
Ops::store(dest++, ConvertNumber<T>(Ops::load(src++)));
|
||||
break;
|
||||
}
|
||||
case Scalar::Uint8:
|
||||
case Scalar::Uint8Clamped: {
|
||||
- SharedMem<JS_VOLATILE_ARM uint8_t*> src =
|
||||
- data.cast<JS_VOLATILE_ARM uint8_t*>();
|
||||
+ SharedMem<uint8_t*> src =
|
||||
+ data.cast<uint8_t*>();
|
||||
for (uint32_t i = 0; i < count; ++i)
|
||||
Ops::store(dest++, ConvertNumber<T>(Ops::load(src++)));
|
||||
break;
|
||||
}
|
||||
case Scalar::Int16: {
|
||||
- SharedMem<JS_VOLATILE_ARM int16_t*> src =
|
||||
- data.cast<JS_VOLATILE_ARM int16_t*>();
|
||||
+ SharedMem<int16_t*> src =
|
||||
+ data.cast<int16_t*>();
|
||||
for (uint32_t i = 0; i < count; ++i)
|
||||
Ops::store(dest++, ConvertNumber<T>(Ops::load(src++)));
|
||||
break;
|
||||
}
|
||||
case Scalar::Uint16: {
|
||||
- SharedMem<JS_VOLATILE_ARM uint16_t*> src =
|
||||
- data.cast<JS_VOLATILE_ARM uint16_t*>();
|
||||
+ SharedMem<uint16_t*> src =
|
||||
+ data.cast<uint16_t*>();
|
||||
for (uint32_t i = 0; i < count; ++i)
|
||||
Ops::store(dest++, ConvertNumber<T>(Ops::load(src++)));
|
||||
break;
|
||||
}
|
||||
case Scalar::Int32: {
|
||||
- SharedMem<JS_VOLATILE_ARM int32_t*> src =
|
||||
- data.cast<JS_VOLATILE_ARM int32_t*>();
|
||||
+ SharedMem<int32_t*> src =
|
||||
+ data.cast<int32_t*>();
|
||||
for (uint32_t i = 0; i < count; ++i)
|
||||
Ops::store(dest++, ConvertNumber<T>(Ops::load(src++)));
|
||||
break;
|
||||
}
|
||||
case Scalar::Uint32: {
|
||||
- SharedMem<JS_VOLATILE_ARM uint32_t*> src =
|
||||
- data.cast<JS_VOLATILE_ARM uint32_t*>();
|
||||
+ SharedMem<uint32_t*> src =
|
||||
+ data.cast<uint32_t*>();
|
||||
for (uint32_t i = 0; i < count; ++i)
|
||||
Ops::store(dest++, ConvertNumber<T>(Ops::load(src++)));
|
||||
break;
|
||||
}
|
||||
case Scalar::Float32: {
|
||||
- SharedMem<JS_VOLATILE_ARM float*> src =
|
||||
- data.cast<JS_VOLATILE_ARM float*>();
|
||||
+ SharedMem<float*> src =
|
||||
+ data.cast<float*>();
|
||||
for (uint32_t i = 0; i < count; ++i)
|
||||
Ops::store(dest++, ConvertNumber<T>(Ops::load(src++)));
|
||||
break;
|
||||
}
|
||||
case Scalar::Float64: {
|
||||
- SharedMem<JS_VOLATILE_ARM double*> src =
|
||||
- data.cast<JS_VOLATILE_ARM double*>();
|
||||
+ SharedMem<double*> src =
|
||||
+ data.cast<double*>();
|
||||
for (uint32_t i = 0; i < count; ++i)
|
||||
Ops::store(dest++, ConvertNumber<T>(Ops::load(src++)));
|
||||
break;
|
||||
@@ -329,8 +322,6 @@ class ElementSpecific {
|
||||
MOZ_CRASH("setFromTypedArray with a typed array with bogus type");
|
||||
}
|
||||
|
||||
-#undef JS_VOLATILE_ARM
|
||||
-
|
||||
return true;
|
||||
}
|
||||
|
||||
-80
@@ -1,80 +0,0 @@
|
||||
From f2f8be496c8e34b4d909b688a95c6f8565201081 Mon Sep 17 00:00:00 2001
|
||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
Date: Wed, 19 Jun 2019 14:30:44 +0800
|
||||
Subject: [PATCH] fix compiling failure on mips64-n32 bsp
|
||||
|
||||
- Tweak mips64-n32 with mips32
|
||||
|
||||
- The toolchain of mips64-n32 supports both of macro
|
||||
`__mips64' and `__mips__', but 32bit is required here.
|
||||
|
||||
- N32 uses 64-bit registers but restricts addresses to 32 bits.
|
||||
https://www.linux-mips.org/pub/linux/mips/doc/ABI/MIPS-N32-ABI-Handbook.pdf
|
||||
Table 2-1 specifies the use of registers in n32 and native 64-bit mode.
|
||||
From the table, N32 and N64 have the same registers
|
||||
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
|
||||
---
|
||||
build/moz.configure/init.configure | 5 ++++-
|
||||
js/src/jit/mips-shared/Architecture-mips-shared.h | 4 +++-
|
||||
python/mozbuild/mozbuild/configure/constants.py | 2 +-
|
||||
3 files changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
|
||||
index 648ac2d..d0bcaf8 100644
|
||||
--- a/build/moz.configure/init.configure
|
||||
+++ b/build/moz.configure/init.configure
|
||||
@@ -650,7 +650,10 @@ def split_triplet(triplet, allow_unknown=False):
|
||||
canonical_cpu = 'mips32'
|
||||
endianness = 'little' if 'el' in cpu else 'big'
|
||||
elif cpu in ('mips64', 'mips64el'):
|
||||
- canonical_cpu = 'mips64'
|
||||
+ if 'n32' in triplet:
|
||||
+ canonical_cpu = 'mips32'
|
||||
+ else:
|
||||
+ canonical_cpu = 'mips64'
|
||||
endianness = 'little' if 'el' in cpu else 'big'
|
||||
elif cpu.startswith('aarch64'):
|
||||
canonical_cpu = 'aarch64'
|
||||
diff --git a/js/src/jit/mips-shared/Architecture-mips-shared.h b/js/src/jit/mips-shared/Architecture-mips-shared.h
|
||||
index e95ffd4..caf83f7 100644
|
||||
--- a/js/src/jit/mips-shared/Architecture-mips-shared.h
|
||||
+++ b/js/src/jit/mips-shared/Architecture-mips-shared.h
|
||||
@@ -28,6 +28,8 @@
|
||||
#elif (defined(_MIPS_SIM) && (_MIPS_SIM == _ABI64)) || \
|
||||
defined(JS_SIMULATOR_MIPS64)
|
||||
#define USES_N64_ABI
|
||||
+#elif (defined(_MIPS_SIM) && (_MIPS_SIM == _ABIN32))
|
||||
+#define USES_N32_ABI
|
||||
#else
|
||||
#error "Unsupported ABI"
|
||||
#endif
|
||||
@@ -94,7 +96,7 @@ class Registers {
|
||||
ta1 = t5,
|
||||
ta2 = t6,
|
||||
ta3 = t7,
|
||||
-#elif defined(USES_N64_ABI)
|
||||
+#elif defined(USES_N64_ABI) || defined(USES_N32_ABI)
|
||||
a4 = r8,
|
||||
a5 = r9,
|
||||
a6 = r10,
|
||||
diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py
|
||||
index 1067b6a..e0f0405 100644
|
||||
--- a/python/mozbuild/mozbuild/configure/constants.py
|
||||
+++ b/python/mozbuild/mozbuild/configure/constants.py
|
||||
@@ -90,8 +90,8 @@ CPU_preprocessor_checks = OrderedDict((
|
||||
('hppa', '__hppa__'),
|
||||
('sparc64', '__sparc__ && __arch64__'),
|
||||
('sparc', '__sparc__'),
|
||||
- ('mips64', '__mips64'),
|
||||
('mips32', '__mips__'),
|
||||
+ ('mips64', '__mips64'),
|
||||
('sh4', '__sh__'),
|
||||
))
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
-98
@@ -1,98 +0,0 @@
|
||||
From 04e8a611e958f0da1ccac61acae3a6f1a5168b20 Mon Sep 17 00:00:00 2001
|
||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
Date: Fri, 13 Jul 2018 18:08:14 +0800
|
||||
Subject: [PATCH] support musl
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
---
|
||||
mozglue/misc/TimeStamp_darwin.cpp | 1 -
|
||||
mozglue/misc/TimeStamp_posix.cpp | 1 -
|
||||
nsprpub/pr/src/misc/prsystem.c | 1 -
|
||||
python/psutil/psutil/_psutil_bsd.c | 1 -
|
||||
python/psutil/psutil/_psutil_osx.c | 1 -
|
||||
python/psutil/psutil/arch/bsd/process_info.c | 1 -
|
||||
python/psutil/psutil/arch/osx/process_info.c | 1 -
|
||||
9 files changed, 3 insertions(+), 12 deletions(-)
|
||||
|
||||
--- a/mozglue/misc/TimeStamp_darwin.cpp
|
||||
+++ b/mozglue/misc/TimeStamp_darwin.cpp
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#include <mach/mach_time.h>
|
||||
#include <sys/time.h>
|
||||
-#include <sys/sysctl.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
--- a/mozglue/misc/TimeStamp_posix.cpp
|
||||
+++ b/mozglue/misc/TimeStamp_posix.cpp
|
||||
@@ -21,7 +21,6 @@
|
||||
#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
|
||||
defined(__OpenBSD__)
|
||||
#include <sys/param.h>
|
||||
-#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
#if defined(__DragonFly__) || defined(__FreeBSD__)
|
||||
--- a/nsprpub/pr/src/misc/prsystem.c
|
||||
+++ b/nsprpub/pr/src/misc/prsystem.c
|
||||
@@ -27,7 +27,6 @@
|
||||
|| defined(OPENBSD) || defined(DRAGONFLY) || defined(DARWIN)
|
||||
#define _PR_HAVE_SYSCTL
|
||||
#include <sys/param.h>
|
||||
-#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
#if defined(DARWIN)
|
||||
--- a/third_party/python/psutil/psutil/_psutil_bsd.c
|
||||
+++ b/third_party/python/psutil/psutil/_psutil_bsd.c
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <paths.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
-#include <sys/sysctl.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/file.h>
|
||||
--- a/third_party/python/psutil/psutil/_psutil_osx.c
|
||||
+++ b/third_party/python/psutil/psutil/_psutil_osx.c
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <utmpx.h>
|
||||
-#include <sys/sysctl.h>
|
||||
#include <sys/vmmeter.h>
|
||||
#include <libproc.h>
|
||||
#include <sys/proc_info.h>
|
||||
--- a/third_party/python/psutil/psutil/arch/osx/process_info.c
|
||||
+++ b/third_party/python/psutil/psutil/arch/osx/process_info.c
|
||||
@@ -16,7 +16,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
-#include <sys/sysctl.h>
|
||||
#include <libproc.h>
|
||||
|
||||
#include "process_info.h"
|
||||
--- a/memory/build/Mutex.h
|
||||
+++ b/memory/build/Mutex.h
|
||||
@@ -42,7 +42,7 @@ struct Mutex {
|
||||
if (pthread_mutexattr_init(&attr) != 0) {
|
||||
return false;
|
||||
}
|
||||
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP);
|
||||
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_STALLED);
|
||||
if (pthread_mutex_init(&mMutex, &attr) != 0) {
|
||||
pthread_mutexattr_destroy(&attr);
|
||||
return false;
|
||||
@@ -102,7 +102,7 @@ typedef Mutex StaticMutex;
|
||||
|
||||
#if defined(XP_DARWIN)
|
||||
#define STATIC_MUTEX_INIT OS_SPINLOCK_INIT
|
||||
-#elif defined(XP_LINUX) && !defined(ANDROID)
|
||||
+#elif defined(XP_LINUX) && !defined(ANDROID) && defined(__GLIBC__)
|
||||
#define STATIC_MUTEX_INIT PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
|
||||
#else
|
||||
#define STATIC_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
From 0c9e8f586ba52a9aef5ed298e8315b2598b8fb72 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 25 May 2019 16:54:45 -0700
|
||||
Subject: [PATCH] js: Fix build with musl
|
||||
|
||||
The MIPS specific header <sgidefs.h> is not provided by musl
|
||||
linux kernel headers provide <asm/sgidefs.h> which has same definitions
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
js/src/jsmath.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/src/jsmath.cpp b/js/src/jsmath.cpp
|
||||
index a28968be..8facaa81 100644
|
||||
--- a/js/src/jsmath.cpp
|
||||
+++ b/js/src/jsmath.cpp
|
||||
@@ -71,7 +71,7 @@
|
||||
#elif defined(__s390__)
|
||||
#define GETRANDOM_NR 349
|
||||
#elif defined(__mips__)
|
||||
-#include <sgidefs.h>
|
||||
+#include <asm/sgidefs.h>
|
||||
#if _MIPS_SIM == _MIPS_SIM_ABI32
|
||||
#define GETRANDOM_NR 4353
|
||||
#elif _MIPS_SIM == _MIPS_SIM_ABI64
|
||||
--
|
||||
2.21.0
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++"
|
||||
HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
|
||||
LICENSE = "MPL-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf"
|
||||
|
||||
SRC_URI = " \
|
||||
https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz \
|
||||
file://0001-Port-build-to-python3.patch \
|
||||
file://0002-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \
|
||||
file://0003-fix-cross-compilation-on-i586-targets.patch \
|
||||
file://0004-do-not-create-python-environment.patch \
|
||||
file://0005-fix-cannot-find-link.patch \
|
||||
file://0006-workaround-autoconf-2.13-detection-failed.patch \
|
||||
file://0007-fix-do_compile-failed-on-mips.patch \
|
||||
file://0008-add-riscv-support.patch \
|
||||
file://0009-mozjs-fix-coredump-caused-by-getenv.patch \
|
||||
file://0010-format-overflow.patch \
|
||||
file://0011-To-fix-build-error-on-arm32BE.patch \
|
||||
file://0012-JS_PUBLIC_API.patch \
|
||||
file://0013-riscv-Disable-atomic-operations.patch \
|
||||
file://0014-remove-JS_VOLATIME_ARM.patch \
|
||||
"
|
||||
SRC_URI:append:libc-musl = " \
|
||||
file://musl/0001-support-musl.patch \
|
||||
file://musl/0002-js-Fix-build-with-musl.patch \
|
||||
"
|
||||
SRC_URI:append:mipsarchn32 = " \
|
||||
file://mipsarchn32/0001-fix-compiling-failure-on-mips64-n32-bsp.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "69a0be9ce695e5dc4941ed0c78ef00c2"
|
||||
SRC_URI[sha256sum] = "9f453c8cc5669e46e38f977764d49a36295bf0d023619d9aac782e6bb3e8c53f"
|
||||
|
||||
S = "${WORKDIR}/firefox-${@d.getVar("PV").replace("esr", "")}"
|
||||
|
||||
inherit autotools pkgconfig perlnative python3native
|
||||
|
||||
inherit features_check
|
||||
CONFLICT_DISTRO_FEATURES:mipsarchn32 = "ld-is-gold"
|
||||
|
||||
DEPENDS += " \
|
||||
nspr zlib autoconf-2.13-native \
|
||||
python3-six-native python3-pytoml-native \
|
||||
python3-jsmin-native python3-six \
|
||||
"
|
||||
|
||||
# Disable null pointer optimization in gcc >= 6
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1328045
|
||||
CFLAGS += "-fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks"
|
||||
CXXFLAGS += "-fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks"
|
||||
|
||||
# nspr's package-config is ignored so set libs manually
|
||||
EXTRA_OECONF = " \
|
||||
--target=${TARGET_SYS} \
|
||||
--host=${BUILD_SYS} \
|
||||
--prefix=${prefix} \
|
||||
--libdir=${libdir} \
|
||||
--disable-tests --disable-strip --disable-optimize \
|
||||
--disable-jemalloc \
|
||||
--with-nspr-cflags='-I${STAGING_INCDIR}/nspr -I${STAGING_INCDIR}/nss3' \
|
||||
--with-nspr-libs='-lplds4 -lplc4 -lnspr4' \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \
|
||||
"
|
||||
|
||||
# Without this, JS_Init() will fail for mips64.
|
||||
EXTRA_OECONF:append:mipsarch = " --with-intl-api=build"
|
||||
EXTRA_OECONF:append:powerpc = " --with-intl-api=build"
|
||||
|
||||
EXTRA_OECONF:append:mipsarch = " --disable-ion"
|
||||
EXTRA_OECONF:append:riscv64 = " --disable-ion"
|
||||
EXTRA_OECONF:append:riscv32 = " --disable-ion"
|
||||
|
||||
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
|
||||
PACKAGECONFIG[x11] = "--x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--x-includes=no --x-libraries=no,virtual/libx11"
|
||||
|
||||
EXTRA_OEMAKE:task-compile += "BUILD_OPT=1 OS_LDFLAGS='-Wl,-latomic ${LDFLAGS}'"
|
||||
EXTRA_OEMAKE:task-install += "STATIC_LIBRARY_NAME=js_static"
|
||||
|
||||
export HOST_CC = "${BUILD_CC}"
|
||||
export HOST_CXX = "${BUILD_CXX}"
|
||||
export HOST_CFLAGS = "${BUILD_CFLAGS}"
|
||||
export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}"
|
||||
export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"
|
||||
|
||||
do_configure() {
|
||||
export SHELL="/bin/sh"
|
||||
cd ${S}
|
||||
# Add mozjs python-modules necessary
|
||||
PYTHONPATH="${S}/third_party/python/which:${S}/config:${S}/build"
|
||||
for sub_dir in python testing/mozbase; do
|
||||
for module_dir in `ls $sub_dir -1`;do
|
||||
[ $module_dir = "virtualenv" ] && continue
|
||||
if [ -d "${S}/$sub_dir/$module_dir" ];then
|
||||
PYTHONPATH="$PYTHONPATH:${S}/$sub_dir/$module_dir"
|
||||
fi
|
||||
done
|
||||
done
|
||||
echo "$PYTHONPATH" > ${B}/PYTHONPATH
|
||||
export PYTHONPATH=`cat ${B}/PYTHONPATH`
|
||||
|
||||
cd ${S}/js/src
|
||||
autoconf213 --macrodir=${STAGING_DATADIR_NATIVE}/autoconf213 old-configure.in > old-configure
|
||||
|
||||
cd ${B}
|
||||
# use of /tmp can causes problems on heavily loaded hosts
|
||||
mkdir -p "${B}/lcl_tmp"
|
||||
TMPDIR="${B}/lcl_tmp" ${S}/js/src/configure ${EXTRA_OECONF}
|
||||
|
||||
# Make standard Makefile checks pass
|
||||
touch ${S}/js/src/configure
|
||||
touch ${B}/config.status
|
||||
}
|
||||
|
||||
do_compile:prepend() {
|
||||
export SHELL="/bin/sh"
|
||||
export PYTHONPATH=`cat ${B}/PYTHONPATH`
|
||||
}
|
||||
|
||||
do_install:prepend() {
|
||||
export SHELL="/bin/sh"
|
||||
export PYTHONPATH=`cat ${B}/PYTHONPATH`
|
||||
}
|
||||
|
||||
inherit multilib_script multilib_header
|
||||
|
||||
MULTILIB_SCRIPTS += " ${PN}-dev:${bindir}/js60-config"
|
||||
|
||||
do_install:append() {
|
||||
oe_multilib_header mozjs-60/js-config.h
|
||||
sed -e 's@${STAGING_DIR_HOST}@@g' \
|
||||
-i ${D}${bindir}/js60-config
|
||||
}
|
||||
|
||||
PACKAGES =+ "lib${BPN}"
|
||||
FILES:lib${BPN} += "${libdir}/lib*.so"
|
||||
FILES:${PN}-dev += "${bindir}/js60-config"
|
||||
|
||||
# Fails to build with thumb-1 (qemuarm)
|
||||
#| {standard input}: Assembler messages:
|
||||
#| {standard input}:2172: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r2,r1,LSR#20'
|
||||
#| {standard input}:2173: Error: unshifted register required -- `bic r2,r2,#(1<<11)'
|
||||
#| {standard input}:2174: Error: unshifted register required -- `orr r1,r1,#(1<<20)'
|
||||
#| {standard input}:2176: Error: instruction not supported in Thumb16 mode -- `subs r2,r2,#0x300'
|
||||
#| {standard input}:2178: Error: instruction not supported in Thumb16 mode -- `subs r5,r2,#52'
|
||||
ARM_INSTRUCTION_SET:armv5 = "arm"
|
||||
ARM_INSTRUCTION_SET:armv4 = "arm"
|
||||
|
||||
DISABLE_STATIC = ""
|
||||
@@ -0,0 +1,61 @@
|
||||
SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++"
|
||||
HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
|
||||
LICENSE = "MPL-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf"
|
||||
|
||||
SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz \
|
||||
file://0001-Cargo.toml-do-not-abort-on-panic.patch \
|
||||
file://0002-moz.configure-do-not-look-for-llvm-objdump.patch \
|
||||
file://0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch \
|
||||
file://0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "3b913d6a52c95a8986123c98543f1273812a2d59f2891b4b1c604e35f4580766"
|
||||
|
||||
S = "${WORKDIR}/firefox-${@d.getVar("PV").replace("esr", "")}"
|
||||
|
||||
inherit pkgconfig perlnative python3native rust
|
||||
|
||||
DEPENDS += "zlib cargo-native python3"
|
||||
|
||||
B = "${WORKDIR}/build"
|
||||
|
||||
export 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"
|
||||
|
||||
export HOST_CC = "${BUILD_CC}"
|
||||
export HOST_CXX = "${BUILD_CXX}"
|
||||
export HOST_CFLAGS = "${BUILD_CFLAGS}"
|
||||
export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}"
|
||||
export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"
|
||||
|
||||
export AS = "${CC}"
|
||||
|
||||
export RUSTFLAGS
|
||||
|
||||
do_configure() {
|
||||
cd ${B}
|
||||
python3 ${S}/configure.py \
|
||||
--enable-project=js \
|
||||
--target=${HOST_SYS} \
|
||||
--host=${BUILD_SYS} \
|
||||
--prefix=${prefix} \
|
||||
--libdir=${libdir} \
|
||||
--disable-jemalloc
|
||||
|
||||
}
|
||||
|
||||
do_install() {
|
||||
oe_runmake 'DESTDIR=${D}' install
|
||||
}
|
||||
|
||||
inherit multilib_script multilib_header
|
||||
|
||||
MULTILIB_SCRIPTS += " ${PN}-dev:${bindir}/js91-config"
|
||||
|
||||
do_install:append() {
|
||||
oe_multilib_header mozjs-91/js-config.h
|
||||
sed -e 's@${STAGING_DIR_HOST}@@g' \
|
||||
-i ${D}${bindir}/js91-config
|
||||
}
|
||||
|
||||
PACKAGES =+ "lib${BPN}"
|
||||
FILES:lib${BPN} += "${libdir}/lib*"
|
||||
Reference in New Issue
Block a user