![Adam Duskett](/assets/img/avatar_default.png)
Spidermonkey is Mozilla's JavaScript engine written in C and C++. It is used in various Mozilla products, including Firefox, and is available under the MPL2. There are 10 patches currently required to properly cross-compile spidermonkey: 1) allow-newer-autoconf-versions - Spidermonkey is hardcoded to use Autoconf 2.13, which is from 1999! The reasoning behind using 2.13 is because newer versions of Autoconf do not work correctly with the custom m4 macros in the source code. However: Because we are building just the Spidermonkey engine instead of the entire Firefox package, newer versions of Autoconf work without issue. See: See: https://bugzilla.mozilla.org/show_bug.cgi?id=104642 for further explanation. 2) allow-building-in-tree - By default, spidermonkey must be configured and built out-of-tree, otherwise the following error occurs: FATAL ERROR PROCESSING MOZBUILD FILE ============================== The error occurred while processing the following file or one of the files it includes: js/src/shell/moz.build The error occurred when validating the result of the execution. The reported error is: The path specified in LOCAL_INCLUDES is not allowed: .. (resolved to js/src) Remove this check, as spidermonkey builds without issue in-tree. 3) allow-unknown-configuration-options - By default, if an unknown parameter is passed to configure, an error is raised. Replace the raise with a pass and continue. Fixes: https://bugzilla.mozilla.org/show_bug.cgi?id=1379540 4) fix-building-with-musl - The MIPS specific header <sgidefs.h> is not provided by musl. The Linux kernel headers <asm/sgidefs.h> provide the same definitions. 5) add-riscv-support - Submitted upstream: See: https://bugzilla.mozilla.org/show_bug.cgi?id=1318905 6) copy-headers-on-install-instead-of-symlinking - When installing, instead of linking the headers to the source directory, copy them. 7) ensure-proper-running-on-64-bit-and-32-bit-be-platforms - Taken from the Fedora RPM Applied upstream. Fixes: https://bugzilla.mozilla.org/show_bug.cgi?id=1488552 8) 0008-save-and-restore-non-volatile-x28-on-ARM64-for-generated-unboxed-obje - Taken from the Fedora RPM: Applied upstream. Fixes: https://bugzilla.mozilla.org/show_bug.cgi?id=1375074 9) save-x28-before-clobbering-it-in-the-regex-compiler - Taken from the Fedora RPM: Applied upstream. Fixes: https://bugzilla.mozilla.org/show_bug.cgi?id=1445907 10) always-use-the-equivalent-year-to-determine-the-time-zone - Taken from the Fedora RPM: Applied upstream. Fixes: https://bugzilla.mozilla.org/show_bug.cgi?id=1415202 Typically, The Firefox source tarball is used to build spidermonkey; however, this has two disadvantages: - It's large. The Firefox source tarball is over 250M. - It requires Autoconf 2.13 Instead, use a tarball with only the Spidermonkey source code in it with a pre-setup configure file. This tarball reduces the size to 31M and prevents the Autoconf 2.13 requirement. Signed-off-by: Adam Duskett <aduskett@greenlots.com> [Thomas: adjust how the libnspr arch dependency is handled] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
36 lines
1.4 KiB
Diff
36 lines
1.4 KiB
Diff
From 4a06a1a6a71293decb83aee7adb74bc709493106 Mon Sep 17 00:00:00 2001
|
|
From: Philip Chimento <philip.chimento@gmail.com>
|
|
Date: Wed, 5 Jul 2017 22:57:09 -0700
|
|
Subject: [PATCH] allow unknown configuration options
|
|
|
|
By default, if an unknown parameter is passed to configure, an error is raised.
|
|
Replace the raise with a pass and continue.
|
|
|
|
Fixes: https://bugzilla.mozilla.org/show_bug.cgi?id=1379540
|
|
|
|
Signed-off-by: Philip Chimento <philip.chimento@gmail.com>
|
|
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
|
---
|
|
js/src/configure | 9 +++++++++
|
|
python/mozbuild/mozbuild/configure/__init__.py | 2 +-
|
|
python/mozbuild/mozbuild/configure/options.py | 6 +++++-
|
|
3 files changed, 15 insertions(+), 2 deletions(-)
|
|
create mode 100755 js/src/configure
|
|
|
|
diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mozbuild/configure/__init__.py
|
|
index 0fe640ca..09b460d3 100644
|
|
--- a/python/mozbuild/mozbuild/configure/__init__.py
|
|
+++ b/python/mozbuild/mozbuild/configure/__init__.py
|
|
@@ -421,7 +421,7 @@ def run(self, path=None):
|
|
# All options should have been removed (handled) by now.
|
|
for arg in self._helper:
|
|
without_value = arg.split('=', 1)[0]
|
|
- raise InvalidOptionError('Unknown option: %s' % without_value)
|
|
+ pass
|
|
|
|
# Run the execution queue
|
|
for func, args in self._execution_queue:
|
|
--
|
|
2.23.0
|
|
|