335c0bc610
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>
62 lines
2.3 KiB
Diff
62 lines
2.3 KiB
Diff
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] 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 at the
|
|
time did 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, and we are using a tarball with a pre-setup
|
|
old-configure file, there is no need for the old version of autoconf.
|
|
|
|
See: https://bugzilla.mozilla.org/show_bug.cgi?id=104642
|
|
|
|
Upstream-Status: Inappropriate [embedded specific]
|
|
|
|
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
|
---
|
|
build/moz.configure/old.configure | 4 ++--
|
|
js/src/old-configure | 2 +-
|
|
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
|
|
index 17d0c5bf..436fcc5e 100644
|
|
--- a/build/moz.configure/old.configure
|
|
+++ b/build/moz.configure/old.configure
|
|
@@ -33,7 +33,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:
|
|
@@ -87,7 +87,7 @@ def prepare_configure(old_configure, mozconfig, autoconf, build_env, shell,
|
|
old_configure = os.path.join(old_configure_dir, 'js', 'src',
|
|
os.path.basename(old_configure))
|
|
|
|
- refresh = True
|
|
+ refresh = False
|
|
if exists(old_configure):
|
|
mtime = getmtime(old_configure)
|
|
aclocal = os.path.join(build_env.topsrcdir, 'build', 'autoconf',
|
|
diff --git a/js/src/old-configure b/js/src/old-configure
|
|
index 58cc646f..ebd2646e 100644
|
|
--- a/js/src/old-configure
|
|
+++ b/js/src/old-configure
|
|
@@ -587,7 +587,7 @@ if test -z "$srcdir"; then
|
|
ac_prog=$0
|
|
ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
|
|
test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
|
|
- srcdir=$ac_confdir
|
|
+ srcdir="$ac_confdir/../../"
|
|
if test ! -r $srcdir/$ac_unique_file; then
|
|
srcdir=..
|
|
fi
|
|
--
|
|
2.23.0
|
|
|