mirror of
https://github.com/schnitzeltony/meta-gnome-forks.git
synced 2026-01-29 17:08:42 +01:00
mozjs-52: initial add 52.9.1 to satisfy cjs demands
* Stolen from meta-oe right before mozjs was upgraded to 60.x * In the long term mozjs-52 can go because cinnamon intends to move to mozjs-68 [1]. That is not yet available in any layer as far sa I know (off-topic have started work on mozjs-68 to get rid of python2 but did not yet get it to fly) * build might fail on other arches than arm but that is good enough for me [1] https://github.com/linuxmint/cjs/issues/80 Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
BBPATH .= ":${LAYERDIR}"
|
||||
|
||||
# We have a recipes directory, add to BBFILES
|
||||
BBFILES += "${LAYERDIR}/recipes*/*/*.bb"
|
||||
BBFILES += "${LAYERDIR}/recipes*/*.bb ${LAYERDIR}/recipes*/*/*.bb"
|
||||
|
||||
BBFILE_COLLECTIONS += "meta-gnome-forks"
|
||||
BBFILE_PATTERN_meta-gnome-forks := "^${LAYERDIR}/"
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
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/utils.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
|
||||
index 4f37218..93575cb 100644
|
||||
--- a/mfbt/double-conversion/utils.h
|
||||
+++ b/mfbt/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
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
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>
|
||||
---
|
||||
build/moz.configure/init.configure | 18 ------------------
|
||||
configure.py | 10 +++++++++-
|
||||
js/src/old-configure | 4 ++--
|
||||
3 files changed, 11 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
|
||||
index 2123beb..6fe6591 100644
|
||||
--- a/build/moz.configure/init.configure
|
||||
+++ b/build/moz.configure/init.configure
|
||||
@@ -179,24 +179,6 @@ def virtualenv_python(env_python, build_env, mozconfig, help):
|
||||
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
|
||||
|
||||
set_config('PYTHON', virtualenv_python)
|
||||
diff --git a/configure.py b/configure.py
|
||||
index f7392d0..45323a5 100644
|
||||
--- 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.util import (
|
||||
indented_repr,
|
||||
diff --git a/js/src/old-configure b/js/src/old-configure
|
||||
index ee4527b..75b00e1 100644
|
||||
--- a/js/src/old-configure
|
||||
+++ b/js/src/old-configure
|
||||
@@ -10512,7 +10512,7 @@ if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then
|
||||
;;
|
||||
esac
|
||||
|
||||
- eval $dumpenv $PYTHON $_topsrcdir/build/subconfigure.py --prepare "$srcdir" "$moz_config_dir" "$_CONFIG_SHELL" $ac_configure_args
|
||||
+ eval $dumpenv PYTHONPATH=$_topsrcdir/python/mozbuild/ $PYTHON $_topsrcdir/build/subconfigure.py --prepare "$srcdir" "$moz_config_dir" "$_CONFIG_SHELL" $ac_configure_args
|
||||
|
||||
done
|
||||
|
||||
@@ -10931,7 +10931,7 @@ if test "$JS_STANDALONE"; then
|
||||
|
||||
if test "$no_recursion" != yes; then
|
||||
trap '' EXIT
|
||||
- if ! $PYTHON $_topsrcdir/build/subconfigure.py --list subconfigures --skip skip_subconfigures; then
|
||||
+ if ! PYTHONPATH=$_topsrcdir/python/mozbuild/ $PYTHON $_topsrcdir/build/subconfigure.py --list subconfigures --skip skip_subconfigures; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
From 5ad700c92224193bfc789f7d53af38fc6f8b8904 Mon Sep 17 00:00:00 2001
|
||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
Date: Thu, 19 Jul 2018 17:31:35 +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>
|
||||
---
|
||||
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 6fe6591..a77b46c 100644
|
||||
--- a/build/moz.configure/init.configure
|
||||
+++ b/build/moz.configure/init.configure
|
||||
@@ -357,7 +357,10 @@ def split_triplet(triplet):
|
||||
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 7afe305..c6e29dc 100644
|
||||
--- a/js/src/jit/mips-shared/Architecture-mips-shared.h
|
||||
+++ b/js/src/jit/mips-shared/Architecture-mips-shared.h
|
||||
@@ -24,6 +24,8 @@
|
||||
#define USES_O32_ABI
|
||||
#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
|
||||
@@ -91,7 +93,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 dfc7cf8..27f83ab 100644
|
||||
--- a/python/mozbuild/mozbuild/configure/constants.py
|
||||
+++ b/python/mozbuild/mozbuild/configure/constants.py
|
||||
@@ -83,8 +83,8 @@ CPU_preprocessor_checks = OrderedDict((
|
||||
('hppa', '__hppa__'),
|
||||
('sparc64', '__sparc__ && __arch64__'),
|
||||
('sparc', '__sparc__'),
|
||||
- ('mips64', '__mips64'),
|
||||
('mips32', '__mips__'),
|
||||
+ ('mips64', '__mips64'),
|
||||
))
|
||||
|
||||
assert sorted(CPU_preprocessor_checks.keys()) == sorted(CPU.POSSIBLE_VALUES)
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
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/js.pc.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/src/js.pc.in b/js/src/js.pc.in
|
||||
index 2eae393..c2dea62 100644
|
||||
--- a/js/src/js.pc.in
|
||||
+++ b/js/src/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
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
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
|
||||
|
||||
34
recipes-support/mozjs-52/0002-fix-cannot-find-link.patch
Normal file
34
recipes-support/mozjs-52/0002-fix-cannot-find-link.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
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
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
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
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From a46adb74b5ba5e17d676d31d70faca76c1381d15 Mon Sep 17 00:00:00 2001
|
||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
Date: Thu, 12 Jul 2018 21:25:46 +0800
|
||||
Subject: [PATCH 4/5] do not use autoconf 2.13 to refresh old.configure
|
||||
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
---
|
||||
build/moz.configure/old.configure | 2 +-
|
||||
js/src/old-configure | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
|
||||
index ece47f4..a73900f 100644
|
||||
--- a/build/moz.configure/old.configure
|
||||
+++ b/build/moz.configure/old.configure
|
||||
@@ -83,7 +83,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 75b00e1..8a8ef52 100644
|
||||
--- a/js/src/old-configure
|
||||
+++ b/js/src/old-configure
|
||||
@@ -619,7 +619,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.7.4
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
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(-)
|
||||
|
||||
diff --git a/config/config.mk b/config/config.mk
|
||||
index 4e3fd1a..d847ffa 100644
|
||||
--- a/config/config.mk
|
||||
+++ b/config/config.mk
|
||||
@@ -523,7 +523,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)
|
||||
|
||||
# $(call CHECK_SYMBOLS,lib,PREFIX,dep_name,test)
|
||||
# Checks that the given `lib` doesn't contain dependency on symbols with a
|
||||
--
|
||||
2.7.4
|
||||
|
||||
158
recipes-support/mozjs-52/0006-support-musl.patch
Normal file
158
recipes-support/mozjs-52/0006-support-musl.patch
Normal file
@@ -0,0 +1,158 @@
|
||||
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>
|
||||
---
|
||||
memory/jemalloc/src/src/pages.c | 1 -
|
||||
memory/mozjemalloc/jemalloc.c | 7 +++----
|
||||
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(-)
|
||||
|
||||
diff --git a/memory/jemalloc/src/src/pages.c b/memory/jemalloc/src/src/pages.c
|
||||
index 647952a..7b964c8 100644
|
||||
--- a/memory/jemalloc/src/src/pages.c
|
||||
+++ b/memory/jemalloc/src/src/pages.c
|
||||
@@ -2,7 +2,6 @@
|
||||
#include "jemalloc/internal/jemalloc_internal.h"
|
||||
|
||||
#ifdef JEMALLOC_SYSCTL_VM_OVERCOMMIT
|
||||
-#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c
|
||||
index 5d4d83a..c618de9 100644
|
||||
--- a/memory/mozjemalloc/jemalloc.c
|
||||
+++ b/memory/mozjemalloc/jemalloc.c
|
||||
@@ -332,7 +332,6 @@ __FBSDID("$FreeBSD: head/lib/libc/stdlib/malloc.c 180599 2008-07-18 19:35:44Z ja
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#if !defined(MOZ_MEMORY_SOLARIS) && !defined(MOZ_MEMORY_ANDROID)
|
||||
-#include <sys/sysctl.h>
|
||||
#endif
|
||||
#include <sys/uio.h>
|
||||
#ifndef MOZ_MEMORY
|
||||
@@ -674,7 +673,7 @@ static bool malloc_initialized = false;
|
||||
#elif defined(MOZ_MEMORY_DARWIN)
|
||||
static malloc_mutex_t init_lock = {OS_SPINLOCK_INIT};
|
||||
#elif defined(MOZ_MEMORY_LINUX) && !defined(MOZ_MEMORY_ANDROID)
|
||||
-static malloc_mutex_t init_lock = PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP;
|
||||
+static malloc_mutex_t init_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
#elif defined(MOZ_MEMORY)
|
||||
static malloc_mutex_t init_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
#else
|
||||
@@ -1644,7 +1643,7 @@ malloc_mutex_init(malloc_mutex_t *mutex)
|
||||
pthread_mutexattr_t attr;
|
||||
if (pthread_mutexattr_init(&attr) != 0)
|
||||
return (true);
|
||||
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP);
|
||||
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_STALLED);
|
||||
if (pthread_mutex_init(mutex, &attr) != 0) {
|
||||
pthread_mutexattr_destroy(&attr);
|
||||
return (true);
|
||||
@@ -1709,7 +1708,7 @@ malloc_spin_init(malloc_spinlock_t *lock)
|
||||
pthread_mutexattr_t attr;
|
||||
if (pthread_mutexattr_init(&attr) != 0)
|
||||
return (true);
|
||||
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP);
|
||||
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_STALLED);
|
||||
if (pthread_mutex_init(lock, &attr) != 0) {
|
||||
pthread_mutexattr_destroy(&attr);
|
||||
return (true);
|
||||
diff --git a/mozglue/misc/TimeStamp_darwin.cpp b/mozglue/misc/TimeStamp_darwin.cpp
|
||||
index f30bc98..3998c9c 100644
|
||||
--- a/mozglue/misc/TimeStamp_darwin.cpp
|
||||
+++ b/mozglue/misc/TimeStamp_darwin.cpp
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
#include <mach/mach_time.h>
|
||||
#include <sys/time.h>
|
||||
-#include <sys/sysctl.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
diff --git a/mozglue/misc/TimeStamp_posix.cpp b/mozglue/misc/TimeStamp_posix.cpp
|
||||
index 05dedde..d9e30f2 100644
|
||||
--- 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__)
|
||||
diff --git a/nsprpub/pr/src/misc/prsystem.c b/nsprpub/pr/src/misc/prsystem.c
|
||||
index eba85fb..54b57bb 100644
|
||||
--- 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)
|
||||
diff --git a/python/psutil/psutil/_psutil_bsd.c b/python/psutil/psutil/_psutil_bsd.c
|
||||
index 7b6e561..0a91262 100644
|
||||
--- a/python/psutil/psutil/_psutil_bsd.c
|
||||
+++ b/python/psutil/psutil/_psutil_bsd.c
|
||||
@@ -16,7 +16,6 @@
|
||||
#include <fcntl.h>
|
||||
#include <paths.h>
|
||||
#include <sys/types.h>
|
||||
-#include <sys/sysctl.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
diff --git a/python/psutil/psutil/_psutil_osx.c b/python/psutil/psutil/_psutil_osx.c
|
||||
index 3ebf8ff..b3910ba 100644
|
||||
--- a/python/psutil/psutil/_psutil_osx.c
|
||||
+++ b/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>
|
||||
diff --git a/python/psutil/psutil/arch/bsd/process_info.c b/python/psutil/psutil/arch/bsd/process_info.c
|
||||
index 4d73924..46f288d 100644
|
||||
--- a/python/psutil/psutil/arch/bsd/process_info.c
|
||||
+++ b/python/psutil/psutil/arch/bsd/process_info.c
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
-#include <sys/sysctl.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
diff --git a/python/psutil/psutil/arch/osx/process_info.c b/python/psutil/psutil/arch/osx/process_info.c
|
||||
index b6dd5bb..62a838f 100644
|
||||
--- a/python/psutil/psutil/arch/osx/process_info.c
|
||||
+++ b/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"
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
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>
|
||||
---
|
||||
js/src/old-configure | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/src/old-configure b/js/src/old-configure
|
||||
index 8a8ef52..d7afcff 100644
|
||||
--- a/js/src/old-configure
|
||||
+++ b/js/src/old-configure
|
||||
@@ -3964,7 +3964,7 @@ IMPORT_LIB_SUFFIX=
|
||||
DIRENT_INO=d_ino
|
||||
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"
|
||||
|
||||
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
37
recipes-support/mozjs-52/JS_PUBLIC_API.patch
Normal file
37
recipes-support/mozjs-52/JS_PUBLIC_API.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
Patch from https://bugzilla.mozilla.org/show_bug.cgi?id=1426865
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1426865]
|
||||
--- a/js/public/TypeDecls.h
|
||||
+++ b/js/public/TypeDecls.h
|
||||
@@ -21,22 +21,23 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "js-config.h"
|
||||
+#include "jstypes.h"
|
||||
|
||||
struct JSContext;
|
||||
-class JSFunction;
|
||||
+class JS_PUBLIC_API(JSFunction);
|
||||
class JSObject;
|
||||
-class JSScript;
|
||||
-class JSString;
|
||||
-class JSAddonId;
|
||||
+class JS_PUBLIC_API(JSScript);
|
||||
+class JS_PUBLIC_API(JSString);
|
||||
+class JS_PUBLIC_API(JSAddonId);
|
||||
|
||||
-struct jsid;
|
||||
+struct JS_PUBLIC_API(jsid);
|
||||
|
||||
namespace JS {
|
||||
|
||||
typedef unsigned char Latin1Char;
|
||||
|
||||
-class Symbol;
|
||||
-class Value;
|
||||
+class JS_PUBLIC_API(Symbol);
|
||||
+class JS_PUBLIC_API(Value);
|
||||
template <typename T> class Handle;
|
||||
template <typename T> class MutableHandle;
|
||||
template <typename T> class Rooted;
|
||||
70
recipes-support/mozjs-52/add-riscv-support.patch
Normal file
70
recipes-support/mozjs-52/add-riscv-support.patch
Normal file
@@ -0,0 +1,70 @@
|
||||
Add RISC-V support
|
||||
|
||||
Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1318905]
|
||||
|
||||
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
|
||||
|
||||
diff --git a/build/autoconf/config.guess b/build/autoconf/config.guess
|
||||
index d5d667d..1277a86 100755
|
||||
--- 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 ;;
|
||||
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
|
||||
index 6fe6591..56e6730 100644
|
||||
--- a/build/moz.configure/init.configure
|
||||
+++ b/build/moz.configure/init.configure
|
||||
@@ -362,6 +362,9 @@ def split_triplet(triplet):
|
||||
elif cpu.startswith('aarch64'):
|
||||
canonical_cpu = 'aarch64'
|
||||
endianness = 'little'
|
||||
+ elif cpu in ('riscv32', 'riscv64'):
|
||||
+ canonical_cpu = cpu
|
||||
+ endianness = 'little'
|
||||
else:
|
||||
die('Unknown CPU type: %s' % cpu)
|
||||
|
||||
diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
|
||||
index 15dd4bf..4f37218 100644
|
||||
--- a/mfbt/double-conversion/utils.h
|
||||
+++ b/mfbt/double-conversion/utils.h
|
||||
@@ -60,7 +60,8 @@
|
||||
defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
|
||||
defined(__SH4__) || defined(__alpha__) || \
|
||||
defined(_MIPS_ARCH_MIPS32R2) || \
|
||||
- defined(__AARCH64EL__) || defined(__aarch64__)
|
||||
+ defined(__AARCH64EL__) || defined(__aarch64__) || \
|
||||
+ defined(__riscv)
|
||||
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
|
||||
#elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
|
||||
#if defined(_WIN32)
|
||||
diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py
|
||||
index dfc7cf8..4f8d666 100644
|
||||
--- a/python/mozbuild/mozbuild/configure/constants.py
|
||||
+++ b/python/mozbuild/mozbuild/configure/constants.py
|
||||
@@ -48,6 +48,8 @@ CPU_bitness = {
|
||||
'mips64': 64,
|
||||
'ppc': 32,
|
||||
'ppc64': 64,
|
||||
+ 'riscv32': 32,
|
||||
+ 'riscv64': 64,
|
||||
's390': 32,
|
||||
's390x': 64,
|
||||
'sparc': 32,
|
||||
@@ -79,6 +81,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__'),
|
||||
@@ -0,0 +1,74 @@
|
||||
From 2fb531ac753500314336ccd508cb2d53f5e768e5 Mon Sep 17 00:00:00 2001
|
||||
From: Till Schneidereit <till@tillschneidereit.net>
|
||||
Date: Thu, 1 Oct 2015 12:59:09 +0200
|
||||
Subject: Disable MOZ_GLUE_IN_PROGRAM in stand-alone builds on all platforms
|
||||
|
||||
Otherwise, build fails not being able to find HashBytes.
|
||||
|
||||
Patch ported forward to mozjs52 by Philip Chimento
|
||||
<philip.chimento@gmail.com>.
|
||||
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1176787
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
|
||||
---
|
||||
js/src/old-configure | 20 ++++++++++++--------
|
||||
mozglue/build/moz.build | 2 +-
|
||||
2 files changed, 13 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/js/src/old-configure b/js/src/old-configure
|
||||
index d7afcff..8a6f142 100644
|
||||
--- a/js/src/old-configure
|
||||
+++ b/js/src/old-configure
|
||||
@@ -8546,21 +8546,25 @@ if test -z "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then
|
||||
fi
|
||||
|
||||
|
||||
-case "${OS_TARGET}" in
|
||||
-Android|WINNT|Darwin)
|
||||
+if test "$JS_STANDALONE"; then
|
||||
MOZ_GLUE_IN_PROGRAM=
|
||||
- ;;
|
||||
-*)
|
||||
- MOZ_GLUE_IN_PROGRAM=1
|
||||
- cat >> confdefs.pytmp <<\EOF
|
||||
+else
|
||||
+ case "${OS_TARGET}" in
|
||||
+ Android|WINNT|Darwin)
|
||||
+ MOZ_GLUE_IN_PROGRAM=
|
||||
+ ;;
|
||||
+ *)
|
||||
+ MOZ_GLUE_IN_PROGRAM=1
|
||||
+ cat >> confdefs.pytmp <<\EOF
|
||||
(''' MOZ_GLUE_IN_PROGRAM ''', ' 1 ')
|
||||
EOF
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define MOZ_GLUE_IN_PROGRAM 1
|
||||
EOF
|
||||
|
||||
- ;;
|
||||
-esac
|
||||
+ ;;
|
||||
+ esac
|
||||
+fi
|
||||
|
||||
if test "$MOZ_MEMORY"; then
|
||||
if test "x$MOZ_DEBUG" = "x1"; then
|
||||
diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build
|
||||
index d289747..e3be5a2 100644
|
||||
--- a/mozglue/build/moz.build
|
||||
+++ b/mozglue/build/moz.build
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
# Build mozglue as a shared lib on Windows, OSX and Android.
|
||||
# If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
|
||||
-if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
|
||||
+if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') and not CONFIG['JS_STANDALONE']:
|
||||
SharedLibrary('mozglue')
|
||||
else:
|
||||
Library('mozglue')
|
||||
--
|
||||
2.7.4
|
||||
|
||||
21
recipes-support/mozjs-52/format-overflow.patch
Normal file
21
recipes-support/mozjs-52/format-overflow.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
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']:
|
||||
DEFINES['FFI_BUILDING'] = True
|
||||
|
||||
if CONFIG['GNU_CXX']:
|
||||
- CXXFLAGS += ['-Wno-shadow', '-Werror=format']
|
||||
+ CXXFLAGS += ['-Wno-shadow']
|
||||
|
||||
# Suppress warnings in third-party code.
|
||||
if CONFIG['CLANG_CXX']:
|
||||
122
recipes-support/mozjs-52_52.9.1.bb
Normal file
122
recipes-support/mozjs-52_52.9.1.bb
Normal file
@@ -0,0 +1,122 @@
|
||||
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=815ca599c9df247a0c7f619bab123dad"
|
||||
|
||||
SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/main/m/mozjs52/mozjs52_52.9.1.orig.tar.xz \
|
||||
file://0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \
|
||||
file://0010-fix-cross-compilation-on-i586-targets.patch \
|
||||
file://0001-do-not-create-python-environment.patch \
|
||||
file://0002-fix-cannot-find-link.patch \
|
||||
file://0003-workaround-autoconf-2.13-detection-failed.patch \
|
||||
file://0004-do-not-use-autoconf-2.13-to-refresh-old.configure.patch \
|
||||
file://0005-fix-do_compile-failed-on-mips.patch \
|
||||
file://disable-mozglue-in-stand-alone-builds.patch \
|
||||
file://add-riscv-support.patch \
|
||||
file://0001-mozjs-fix-coredump-caused-by-getenv.patch \
|
||||
file://format-overflow.patch \
|
||||
file://JS_PUBLIC_API.patch \
|
||||
file://0001-To-fix-build-error-on-arm32BE.patch \
|
||||
"
|
||||
SRC_URI_append_libc-musl = " \
|
||||
file://0006-support-musl.patch \
|
||||
"
|
||||
SRC_URI_append_mipsarchn32 = " \
|
||||
file://0001-fix-compiling-failure-on-mips64-n32-bsp.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "c9473c625ee0a9edaaac8b742ff24c5f"
|
||||
SRC_URI[sha256sum] = "f9324a6724233ab15f10381fe13e635e89d725ef1e78025a0a7d36c58a84a0f9"
|
||||
|
||||
S = "${WORKDIR}/mozjs-${PV}"
|
||||
|
||||
inherit autotools pkgconfig perlnative pythonnative
|
||||
|
||||
inherit features_check
|
||||
CONFLICT_DISTRO_FEATURES_mipsarchn32 = "ld-is-gold"
|
||||
|
||||
DEPENDS += "nspr zlib"
|
||||
|
||||
# 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 \
|
||||
--with-nspr-libs='-lplds4 -lplc4 -lnspr4' \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \
|
||||
"
|
||||
|
||||
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"
|
||||
export TMP="${B}"
|
||||
${S}/js/src/configure ${EXTRA_OECONF}
|
||||
}
|
||||
|
||||
do_compile_prepend() {
|
||||
export SHELL="/bin/sh"
|
||||
export S
|
||||
export PYTHONPATH
|
||||
cd ${S}
|
||||
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
|
||||
PYTHONPATH="$PYTHONPATH:${S}/config:${S}/build"
|
||||
cd -
|
||||
}
|
||||
|
||||
do_install_prepend() {
|
||||
export SHELL="/bin/sh"
|
||||
export S
|
||||
export PYTHONPATH
|
||||
cd ${S}
|
||||
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
|
||||
PYTHONPATH="$PYTHONPATH:${S}/config:${S}/build"
|
||||
cd -
|
||||
}
|
||||
|
||||
PACKAGES =+ "lib${BPN}"
|
||||
FILES_lib${BPN} += "${libdir}/lib*.so"
|
||||
FILES_${PN}-dev += "${bindir}/js52-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 = ""
|
||||
Reference in New Issue
Block a user