summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs/0001-To-fix-build-error-on-arm32BE.patch8
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs/0001-do-not-create-python-environment.patch28
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs/0001-fix-compiling-failure-on-mips64-n32-bsp.patch19
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs/0001-js-Fix-build-with-musl.patch31
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs/0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch8
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs/0001-riscv-Disable-atomic-operations.patch38
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs/0005-fix-do_compile-failed-on-mips.patch11
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs/0006-support-musl.patch124
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs/0010-fix-cross-compilation-on-i586-targets.patch9
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs/JS_PUBLIC_API.patch48
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs/add-riscv-support.patch38
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs/disable-mozglue-in-stand-alone-builds.patch74
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs/format-overflow.patch12
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs_60.5.2.bb (renamed from meta-oe/recipes-extended/mozjs/mozjs_52.9.1.bb)25
14 files changed, 188 insertions, 285 deletions
diff --git a/meta-oe/recipes-extended/mozjs/mozjs/0001-To-fix-build-error-on-arm32BE.patch b/meta-oe/recipes-extended/mozjs/mozjs/0001-To-fix-build-error-on-arm32BE.patch
index 3bbd10a17..056f74a52 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs/0001-To-fix-build-error-on-arm32BE.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs/0001-To-fix-build-error-on-arm32BE.patch
@@ -7,13 +7,13 @@ error: #error Target architecture was not detected as supported by Double-Conver
7 7
8Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> 8Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
9--- 9---
10 mfbt/double-conversion/utils.h | 2 +- 10 mfbt/double-conversion/double-conversion/utils.h | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-) 11 1 file changed, 1 insertion(+), 1 deletion(-)
12 12
13diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h 13diff --git a/mfbt/double-conversion/double-conversion/utils.h b/mfbt/double-conversion/double-conversion/utils.h
14index 4f37218..93575cb 100644 14index 4f37218..93575cb 100644
15--- a/mfbt/double-conversion/utils.h 15--- a/mfbt/double-conversion/double-conversion/utils.h
16+++ b/mfbt/double-conversion/utils.h 16+++ b/mfbt/double-conversion/double-conversion/utils.h
17@@ -53,7 +53,7 @@ 17@@ -53,7 +53,7 @@
18 // disabled.) 18 // disabled.)
19 // On Linux,x86 89255e-22 != Div_double(89255.0/1e22) 19 // On Linux,x86 89255e-22 != Div_double(89255.0/1e22)
diff --git a/meta-oe/recipes-extended/mozjs/mozjs/0001-do-not-create-python-environment.patch b/meta-oe/recipes-extended/mozjs/mozjs/0001-do-not-create-python-environment.patch
index ba317bc0c..a3c1b69e2 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs/0001-do-not-create-python-environment.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs/0001-do-not-create-python-environment.patch
@@ -14,11 +14,9 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
14 js/src/old-configure | 4 ++-- 14 js/src/old-configure | 4 ++--
15 3 files changed, 11 insertions(+), 21 deletions(-) 15 3 files changed, 11 insertions(+), 21 deletions(-)
16 16
17diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
18index 2123beb..6fe6591 100644
19--- a/build/moz.configure/init.configure 17--- a/build/moz.configure/init.configure
20+++ b/build/moz.configure/init.configure 18+++ b/build/moz.configure/init.configure
21@@ -179,24 +179,6 @@ def virtualenv_python(env_python, build_env, mozconfig, help): 19@@ -250,24 +250,6 @@ def virtualenv_python(env_python, build_
22 else: 20 else:
23 python = sys.executable 21 python = sys.executable
24 22
@@ -42,9 +40,7 @@ index 2123beb..6fe6591 100644
42- 40-
43 return python 41 return python
44 42
45 set_config('PYTHON', virtualenv_python) 43
46diff --git a/configure.py b/configure.py
47index f7392d0..45323a5 100644
48--- a/configure.py 44--- a/configure.py
49+++ b/configure.py 45+++ b/configure.py
50@@ -12,7 +12,15 @@ import textwrap 46@@ -12,7 +12,15 @@ import textwrap
@@ -62,22 +58,11 @@ index f7392d0..45323a5 100644
62+ sys.path.insert(0, os.path.join(sub_dir, module_dir)) 58+ sys.path.insert(0, os.path.join(sub_dir, module_dir))
63+ 59+
64 from mozbuild.configure import ConfigureSandbox 60 from mozbuild.configure import ConfigureSandbox
65 from mozbuild.util import ( 61 from mozbuild.makeutil import Makefile
66 indented_repr, 62 from mozbuild.pythonutil import iter_modules_in_path
67diff --git a/js/src/old-configure b/js/src/old-configure
68index ee4527b..75b00e1 100644
69--- a/js/src/old-configure 63--- a/js/src/old-configure
70+++ b/js/src/old-configure 64+++ b/js/src/old-configure
71@@ -10512,7 +10512,7 @@ if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then 65@@ -9974,7 +9974,7 @@ if test "$JS_STANDALONE"; then
72 ;;
73 esac
74
75- eval $dumpenv $PYTHON $_topsrcdir/build/subconfigure.py --prepare "$srcdir" "$moz_config_dir" "$_CONFIG_SHELL" $ac_configure_args
76+ eval $dumpenv PYTHONPATH=$_topsrcdir/python/mozbuild/ $PYTHON $_topsrcdir/build/subconfigure.py --prepare "$srcdir" "$moz_config_dir" "$_CONFIG_SHELL" $ac_configure_args
77
78 done
79
80@@ -10931,7 +10931,7 @@ if test "$JS_STANDALONE"; then
81 66
82 if test "$no_recursion" != yes; then 67 if test "$no_recursion" != yes; then
83 trap '' EXIT 68 trap '' EXIT
@@ -86,6 +71,3 @@ index ee4527b..75b00e1 100644
86 exit 1 71 exit 1
87 fi 72 fi
88 fi 73 fi
89--
902.7.4
91
diff --git a/meta-oe/recipes-extended/mozjs/mozjs/0001-fix-compiling-failure-on-mips64-n32-bsp.patch b/meta-oe/recipes-extended/mozjs/mozjs/0001-fix-compiling-failure-on-mips64-n32-bsp.patch
index bc1af3c70..a36478bfb 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs/0001-fix-compiling-failure-on-mips64-n32-bsp.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs/0001-fix-compiling-failure-on-mips64-n32-bsp.patch
@@ -22,11 +22,9 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
22 python/mozbuild/mozbuild/configure/constants.py | 2 +- 22 python/mozbuild/mozbuild/configure/constants.py | 2 +-
23 3 files changed, 8 insertions(+), 3 deletions(-) 23 3 files changed, 8 insertions(+), 3 deletions(-)
24 24
25diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
26index 6fe6591..a77b46c 100644
27--- a/build/moz.configure/init.configure 25--- a/build/moz.configure/init.configure
28+++ b/build/moz.configure/init.configure 26+++ b/build/moz.configure/init.configure
29@@ -357,7 +357,10 @@ def split_triplet(triplet): 27@@ -650,7 +650,10 @@ def split_triplet(triplet, allow_unknown
30 canonical_cpu = 'mips32' 28 canonical_cpu = 'mips32'
31 endianness = 'little' if 'el' in cpu else 'big' 29 endianness = 'little' if 'el' in cpu else 'big'
32 elif cpu in ('mips64', 'mips64el'): 30 elif cpu in ('mips64', 'mips64el'):
@@ -38,11 +36,9 @@ index 6fe6591..a77b46c 100644
38 endianness = 'little' if 'el' in cpu else 'big' 36 endianness = 'little' if 'el' in cpu else 'big'
39 elif cpu.startswith('aarch64'): 37 elif cpu.startswith('aarch64'):
40 canonical_cpu = 'aarch64' 38 canonical_cpu = 'aarch64'
41diff --git a/js/src/jit/mips-shared/Architecture-mips-shared.h b/js/src/jit/mips-shared/Architecture-mips-shared.h
42index 7afe305..c6e29dc 100644
43--- a/js/src/jit/mips-shared/Architecture-mips-shared.h 39--- a/js/src/jit/mips-shared/Architecture-mips-shared.h
44+++ b/js/src/jit/mips-shared/Architecture-mips-shared.h 40+++ b/js/src/jit/mips-shared/Architecture-mips-shared.h
45@@ -24,6 +24,8 @@ 41@@ -26,6 +26,8 @@
46 #define USES_O32_ABI 42 #define USES_O32_ABI
47 #elif (defined(_MIPS_SIM) && (_MIPS_SIM == _ABI64)) || defined(JS_SIMULATOR_MIPS64) 43 #elif (defined(_MIPS_SIM) && (_MIPS_SIM == _ABI64)) || defined(JS_SIMULATOR_MIPS64)
48 #define USES_N64_ABI 44 #define USES_N64_ABI
@@ -51,7 +47,7 @@ index 7afe305..c6e29dc 100644
51 #else 47 #else
52 #error "Unsupported ABI" 48 #error "Unsupported ABI"
53 #endif 49 #endif
54@@ -91,7 +93,7 @@ class Registers 50@@ -93,7 +95,7 @@ class Registers
55 ta1 = t5, 51 ta1 = t5,
56 ta2 = t6, 52 ta2 = t6,
57 ta3 = t7, 53 ta3 = t7,
@@ -60,20 +56,15 @@ index 7afe305..c6e29dc 100644
60 a4 = r8, 56 a4 = r8,
61 a5 = r9, 57 a5 = r9,
62 a6 = r10, 58 a6 = r10,
63diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py
64index dfc7cf8..27f83ab 100644
65--- a/python/mozbuild/mozbuild/configure/constants.py 59--- a/python/mozbuild/mozbuild/configure/constants.py
66+++ b/python/mozbuild/mozbuild/configure/constants.py 60+++ b/python/mozbuild/mozbuild/configure/constants.py
67@@ -83,8 +83,8 @@ CPU_preprocessor_checks = OrderedDict(( 61@@ -90,8 +90,8 @@ CPU_preprocessor_checks = OrderedDict((
68 ('hppa', '__hppa__'), 62 ('hppa', '__hppa__'),
69 ('sparc64', '__sparc__ && __arch64__'), 63 ('sparc64', '__sparc__ && __arch64__'),
70 ('sparc', '__sparc__'), 64 ('sparc', '__sparc__'),
71- ('mips64', '__mips64'), 65- ('mips64', '__mips64'),
72 ('mips32', '__mips__'), 66 ('mips32', '__mips__'),
73+ ('mips64', '__mips64'), 67+ ('mips64', '__mips64'),
68 ('sh4', '__sh__'),
74 )) 69 ))
75 70
76 assert sorted(CPU_preprocessor_checks.keys()) == sorted(CPU.POSSIBLE_VALUES)
77--
782.7.4
79
diff --git a/meta-oe/recipes-extended/mozjs/mozjs/0001-js-Fix-build-with-musl.patch b/meta-oe/recipes-extended/mozjs/mozjs/0001-js-Fix-build-with-musl.patch
new file mode 100644
index 000000000..f4c6e2768
--- /dev/null
+++ b/meta-oe/recipes-extended/mozjs/mozjs/0001-js-Fix-build-with-musl.patch
@@ -0,0 +1,31 @@
1From 0c9e8f586ba52a9aef5ed298e8315b2598b8fb72 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 25 May 2019 16:54:45 -0700
4Subject: [PATCH] js: Fix build with musl
5
6The MIPS specific header <sgidefs.h> is not provided by musl
7linux kernel headers provide <asm/sgidefs.h> which has same definitions
8
9Upstream-Status: Pending
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 js/src/jsmath.cpp | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/js/src/jsmath.cpp b/js/src/jsmath.cpp
17index a28968be..8facaa81 100644
18--- a/js/src/jsmath.cpp
19+++ b/js/src/jsmath.cpp
20@@ -71,7 +71,7 @@
21 #elif defined(__s390__)
22 #define GETRANDOM_NR 349
23 #elif defined(__mips__)
24-#include <sgidefs.h>
25+#include <asm/sgidefs.h>
26 #if _MIPS_SIM == _MIPS_SIM_ABI32
27 #define GETRANDOM_NR 4353
28 #elif _MIPS_SIM == _MIPS_SIM_ABI64
29--
302.21.0
31
diff --git a/meta-oe/recipes-extended/mozjs/mozjs/0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch b/meta-oe/recipes-extended/mozjs/mozjs/0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch
index c111ea5ea..e3f1883a9 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs/0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs/0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch
@@ -15,13 +15,13 @@ Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
15Rebase to 52.8.1 15Rebase to 52.8.1
16Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 16Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
17--- 17---
18 js/src/js.pc.in | 2 +- 18 js/src/build/js.pc.in | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-) 19 1 file changed, 1 insertion(+), 1 deletion(-)
20 20
21diff --git a/js/src/js.pc.in b/js/src/js.pc.in 21diff --git a/js/src/build/js.pc.in b/js/src/build/js.pc.in
22index 2eae393..c2dea62 100644 22index 2eae393..c2dea62 100644
23--- a/js/src/js.pc.in 23--- a/js/src/build/js.pc.in
24+++ b/js/src/js.pc.in 24+++ b/js/src/build/js.pc.in
25@@ -8,4 +8,4 @@ Description: The Mozilla library for JavaScript 25@@ -8,4 +8,4 @@ Description: The Mozilla library for JavaScript
26 Version: @MOZILLA_VERSION@ 26 Version: @MOZILLA_VERSION@
27 @PKGCONF_REQUIRES_PRIVATE@ 27 @PKGCONF_REQUIRES_PRIVATE@
diff --git a/meta-oe/recipes-extended/mozjs/mozjs/0001-riscv-Disable-atomic-operations.patch b/meta-oe/recipes-extended/mozjs/mozjs/0001-riscv-Disable-atomic-operations.patch
new file mode 100644
index 000000000..2e810c87f
--- /dev/null
+++ b/meta-oe/recipes-extended/mozjs/mozjs/0001-riscv-Disable-atomic-operations.patch
@@ -0,0 +1,38 @@
1From 64ad80e6d95871f17be4cd01da15581f41ac0b2b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 27 May 2019 21:10:34 -0700
4Subject: [PATCH] riscv: Disable atomic operations
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8 js/src/jit/AtomicOperations.h | 2 ++
9 1 file changed, 2 insertions(+)
10
11--- a/js/src/jit/AtomicOperations.h
12+++ b/js/src/jit/AtomicOperations.h
13@@ -393,6 +393,8 @@ inline bool AtomicOperations::isLockfree
14 #include "jit/none/AtomicOperations-feeling-lucky.h"
15 #elif defined(__s390__) || defined(__s390x__)
16 #include "jit/none/AtomicOperations-feeling-lucky.h"
17+#elif defined(__riscv)
18+#include "jit/none/AtomicOperations-feeling-lucky.h"
19 #else
20 #error "No AtomicOperations support provided for this platform"
21 #endif
22--- a/js/src/jit/none/AtomicOperations-feeling-lucky.h
23+++ b/js/src/jit/none/AtomicOperations-feeling-lucky.h
24@@ -80,6 +80,14 @@
25 #define GNUC_COMPATIBLE
26 #endif
27
28+#ifdef __riscv
29+#define GNUC_COMPATIBLE
30+#ifdef __riscv_xlen == 64
31+#define HAS_64BIT_ATOMICS
32+#define HAS_64BIT_LOCKFREE
33+#endif
34+#endif
35+
36 // The default implementation tactic for gcc/clang is to use the newer
37 // __atomic intrinsics added for use in C++11 <atomic>. Where that
38 // isn't available, we use GCC's older __sync functions instead.
diff --git a/meta-oe/recipes-extended/mozjs/mozjs/0005-fix-do_compile-failed-on-mips.patch b/meta-oe/recipes-extended/mozjs/mozjs/0005-fix-do_compile-failed-on-mips.patch
index 38e4698f2..d1da10972 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs/0005-fix-do_compile-failed-on-mips.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs/0005-fix-do_compile-failed-on-mips.patch
@@ -20,19 +20,14 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
20 config/config.mk | 2 +- 20 config/config.mk | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-) 21 1 file changed, 1 insertion(+), 1 deletion(-)
22 22
23diff --git a/config/config.mk b/config/config.mk
24index 4e3fd1a..d847ffa 100644
25--- a/config/config.mk 23--- a/config/config.mk
26+++ b/config/config.mk 24+++ b/config/config.mk
27@@ -523,7 +523,7 @@ EXPAND_MKSHLIB_ARGS = --uselist 25@@ -423,7 +423,7 @@ EXPAND_MKSHLIB_ARGS = --uselist
28 ifdef SYMBOL_ORDER 26 ifdef SYMBOL_ORDER
29 EXPAND_MKSHLIB_ARGS += --symbol-order $(SYMBOL_ORDER) 27 EXPAND_MKSHLIB_ARGS += --symbol-order $(SYMBOL_ORDER)
30 endif 28 endif
31-EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB) 29-EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB)
32+EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB) $(OS_LDFLAGS) 30+EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB) $(OS_LDFLAGS)
33 31
34 # $(call CHECK_SYMBOLS,lib,PREFIX,dep_name,test) 32 # autoconf.mk sets OBJ_SUFFIX to an error to avoid use before including
35 # Checks that the given `lib` doesn't contain dependency on symbols with a 33 # this file
36--
372.7.4
38
diff --git a/meta-oe/recipes-extended/mozjs/mozjs/0006-support-musl.patch b/meta-oe/recipes-extended/mozjs/mozjs/0006-support-musl.patch
index 32a977ce2..770d5e0aa 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs/0006-support-musl.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs/0006-support-musl.patch
@@ -7,8 +7,6 @@ Upstream-Status: Pending
7 7
8Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 8Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
9--- 9---
10 memory/jemalloc/src/src/pages.c | 1 -
11 memory/mozjemalloc/jemalloc.c | 7 +++----
12 mozglue/misc/TimeStamp_darwin.cpp | 1 - 10 mozglue/misc/TimeStamp_darwin.cpp | 1 -
13 mozglue/misc/TimeStamp_posix.cpp | 1 - 11 mozglue/misc/TimeStamp_posix.cpp | 1 -
14 nsprpub/pr/src/misc/prsystem.c | 1 - 12 nsprpub/pr/src/misc/prsystem.c | 1 -
@@ -18,62 +16,9 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
18 python/psutil/psutil/arch/osx/process_info.c | 1 - 16 python/psutil/psutil/arch/osx/process_info.c | 1 -
19 9 files changed, 3 insertions(+), 12 deletions(-) 17 9 files changed, 3 insertions(+), 12 deletions(-)
20 18
21diff --git a/memory/jemalloc/src/src/pages.c b/memory/jemalloc/src/src/pages.c
22index 647952a..7b964c8 100644
23--- a/memory/jemalloc/src/src/pages.c
24+++ b/memory/jemalloc/src/src/pages.c
25@@ -2,7 +2,6 @@
26 #include "jemalloc/internal/jemalloc_internal.h"
27
28 #ifdef JEMALLOC_SYSCTL_VM_OVERCOMMIT
29-#include <sys/sysctl.h>
30 #endif
31
32 /******************************************************************************/
33diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c
34index 5d4d83a..c618de9 100644
35--- a/memory/mozjemalloc/jemalloc.c
36+++ b/memory/mozjemalloc/jemalloc.c
37@@ -332,7 +332,6 @@ __FBSDID("$FreeBSD: head/lib/libc/stdlib/malloc.c 180599 2008-07-18 19:35:44Z ja
38 #include <sys/time.h>
39 #include <sys/types.h>
40 #if !defined(MOZ_MEMORY_SOLARIS) && !defined(MOZ_MEMORY_ANDROID)
41-#include <sys/sysctl.h>
42 #endif
43 #include <sys/uio.h>
44 #ifndef MOZ_MEMORY
45@@ -674,7 +673,7 @@ static bool malloc_initialized = false;
46 #elif defined(MOZ_MEMORY_DARWIN)
47 static malloc_mutex_t init_lock = {OS_SPINLOCK_INIT};
48 #elif defined(MOZ_MEMORY_LINUX) && !defined(MOZ_MEMORY_ANDROID)
49-static malloc_mutex_t init_lock = PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP;
50+static malloc_mutex_t init_lock = PTHREAD_MUTEX_INITIALIZER;
51 #elif defined(MOZ_MEMORY)
52 static malloc_mutex_t init_lock = PTHREAD_MUTEX_INITIALIZER;
53 #else
54@@ -1644,7 +1643,7 @@ malloc_mutex_init(malloc_mutex_t *mutex)
55 pthread_mutexattr_t attr;
56 if (pthread_mutexattr_init(&attr) != 0)
57 return (true);
58- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP);
59+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_STALLED);
60 if (pthread_mutex_init(mutex, &attr) != 0) {
61 pthread_mutexattr_destroy(&attr);
62 return (true);
63@@ -1709,7 +1708,7 @@ malloc_spin_init(malloc_spinlock_t *lock)
64 pthread_mutexattr_t attr;
65 if (pthread_mutexattr_init(&attr) != 0)
66 return (true);
67- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP);
68+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_STALLED);
69 if (pthread_mutex_init(lock, &attr) != 0) {
70 pthread_mutexattr_destroy(&attr);
71 return (true);
72diff --git a/mozglue/misc/TimeStamp_darwin.cpp b/mozglue/misc/TimeStamp_darwin.cpp
73index f30bc98..3998c9c 100644
74--- a/mozglue/misc/TimeStamp_darwin.cpp 19--- a/mozglue/misc/TimeStamp_darwin.cpp
75+++ b/mozglue/misc/TimeStamp_darwin.cpp 20+++ b/mozglue/misc/TimeStamp_darwin.cpp
76@@ -18,7 +18,6 @@ 21@@ -19,7 +19,6 @@
77 22
78 #include <mach/mach_time.h> 23 #include <mach/mach_time.h>
79 #include <sys/time.h> 24 #include <sys/time.h>
@@ -81,20 +26,16 @@ index f30bc98..3998c9c 100644
81 #include <time.h> 26 #include <time.h>
82 #include <unistd.h> 27 #include <unistd.h>
83 28
84diff --git a/mozglue/misc/TimeStamp_posix.cpp b/mozglue/misc/TimeStamp_posix.cpp
85index 05dedde..d9e30f2 100644
86--- a/mozglue/misc/TimeStamp_posix.cpp 29--- a/mozglue/misc/TimeStamp_posix.cpp
87+++ b/mozglue/misc/TimeStamp_posix.cpp 30+++ b/mozglue/misc/TimeStamp_posix.cpp
88@@ -21,7 +21,6 @@ 31@@ -21,7 +21,6 @@
89 #if defined(__DragonFly__) || defined(__FreeBSD__) \ 32 #if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
90 || defined(__NetBSD__) || defined(__OpenBSD__) 33 defined(__OpenBSD__)
91 #include <sys/param.h> 34 #include <sys/param.h>
92-#include <sys/sysctl.h> 35-#include <sys/sysctl.h>
93 #endif 36 #endif
94 37
95 #if defined(__DragonFly__) || defined(__FreeBSD__) 38 #if defined(__DragonFly__) || defined(__FreeBSD__)
96diff --git a/nsprpub/pr/src/misc/prsystem.c b/nsprpub/pr/src/misc/prsystem.c
97index eba85fb..54b57bb 100644
98--- a/nsprpub/pr/src/misc/prsystem.c 39--- a/nsprpub/pr/src/misc/prsystem.c
99+++ b/nsprpub/pr/src/misc/prsystem.c 40+++ b/nsprpub/pr/src/misc/prsystem.c
100@@ -27,7 +27,6 @@ 41@@ -27,7 +27,6 @@
@@ -105,22 +46,18 @@ index eba85fb..54b57bb 100644
105 #endif 46 #endif
106 47
107 #if defined(DARWIN) 48 #if defined(DARWIN)
108diff --git a/python/psutil/psutil/_psutil_bsd.c b/python/psutil/psutil/_psutil_bsd.c 49--- a/third_party/python/psutil/psutil/_psutil_bsd.c
109index 7b6e561..0a91262 100644 50+++ b/third_party/python/psutil/psutil/_psutil_bsd.c
110--- a/python/psutil/psutil/_psutil_bsd.c 51@@ -29,7 +29,6 @@
111+++ b/python/psutil/psutil/_psutil_bsd.c
112@@ -16,7 +16,6 @@
113 #include <fcntl.h>
114 #include <paths.h> 52 #include <paths.h>
115 #include <sys/types.h> 53 #include <sys/types.h>
116-#include <sys/sysctl.h>
117 #include <sys/param.h> 54 #include <sys/param.h>
55-#include <sys/sysctl.h>
118 #include <sys/user.h> 56 #include <sys/user.h>
119 #include <sys/proc.h> 57 #include <sys/proc.h>
120diff --git a/python/psutil/psutil/_psutil_osx.c b/python/psutil/psutil/_psutil_osx.c 58 #include <sys/file.h>
121index 3ebf8ff..b3910ba 100644 59--- a/third_party/python/psutil/psutil/_psutil_osx.c
122--- a/python/psutil/psutil/_psutil_osx.c 60+++ b/third_party/python/psutil/psutil/_psutil_osx.c
123+++ b/python/psutil/psutil/_psutil_osx.c
124@@ -13,7 +13,6 @@ 61@@ -13,7 +13,6 @@
125 #include <stdlib.h> 62 #include <stdlib.h>
126 #include <stdio.h> 63 #include <stdio.h>
@@ -129,22 +66,8 @@ index 3ebf8ff..b3910ba 100644
129 #include <sys/vmmeter.h> 66 #include <sys/vmmeter.h>
130 #include <libproc.h> 67 #include <libproc.h>
131 #include <sys/proc_info.h> 68 #include <sys/proc_info.h>
132diff --git a/python/psutil/psutil/arch/bsd/process_info.c b/python/psutil/psutil/arch/bsd/process_info.c 69--- a/third_party/python/psutil/psutil/arch/osx/process_info.c
133index 4d73924..46f288d 100644 70+++ b/third_party/python/psutil/psutil/arch/osx/process_info.c
134--- a/python/psutil/psutil/arch/bsd/process_info.c
135+++ b/python/psutil/psutil/arch/bsd/process_info.c
136@@ -15,7 +15,6 @@
137 #include <stdio.h>
138 #include <string.h>
139 #include <sys/types.h>
140-#include <sys/sysctl.h>
141 #include <sys/param.h>
142 #include <sys/user.h>
143 #include <sys/proc.h>
144diff --git a/python/psutil/psutil/arch/osx/process_info.c b/python/psutil/psutil/arch/osx/process_info.c
145index b6dd5bb..62a838f 100644
146--- a/python/psutil/psutil/arch/osx/process_info.c
147+++ b/python/psutil/psutil/arch/osx/process_info.c
148@@ -16,7 +16,6 @@ 71@@ -16,7 +16,6 @@
149 #include <stdlib.h> 72 #include <stdlib.h>
150 #include <stdio.h> 73 #include <stdio.h>
@@ -153,6 +76,23 @@ index b6dd5bb..62a838f 100644
153 #include <libproc.h> 76 #include <libproc.h>
154 77
155 #include "process_info.h" 78 #include "process_info.h"
156-- 79--- a/memory/build/Mutex.h
1572.7.4 80+++ b/memory/build/Mutex.h
158 81@@ -42,7 +42,7 @@ struct Mutex {
82 if (pthread_mutexattr_init(&attr) != 0) {
83 return false;
84 }
85- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP);
86+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_STALLED);
87 if (pthread_mutex_init(&mMutex, &attr) != 0) {
88 pthread_mutexattr_destroy(&attr);
89 return false;
90@@ -102,7 +102,7 @@ typedef Mutex StaticMutex;
91
92 #if defined(XP_DARWIN)
93 #define STATIC_MUTEX_INIT OS_SPINLOCK_INIT
94-#elif defined(XP_LINUX) && !defined(ANDROID)
95+#elif defined(XP_LINUX) && !defined(ANDROID) && defined(__GLIBC__)
96 #define STATIC_MUTEX_INIT PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
97 #else
98 #define STATIC_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
diff --git a/meta-oe/recipes-extended/mozjs/mozjs/0010-fix-cross-compilation-on-i586-targets.patch b/meta-oe/recipes-extended/mozjs/mozjs/0010-fix-cross-compilation-on-i586-targets.patch
index 9194e346a..3ac25f6ae 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs/0010-fix-cross-compilation-on-i586-targets.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs/0010-fix-cross-compilation-on-i586-targets.patch
@@ -17,12 +17,10 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
17 js/src/old-configure | 2 +- 17 js/src/old-configure | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-) 18 1 file changed, 1 insertion(+), 1 deletion(-)
19 19
20diff --git a/js/src/old-configure b/js/src/old-configure
21index 8a8ef52..d7afcff 100644
22--- a/js/src/old-configure 20--- a/js/src/old-configure
23+++ b/js/src/old-configure 21+++ b/js/src/old-configure
24@@ -3964,7 +3964,7 @@ IMPORT_LIB_SUFFIX= 22@@ -3833,7 +3833,7 @@ AS='$(CC)'
25 DIRENT_INO=d_ino 23 AS_DASH_C_FLAG='-c'
26 MOZ_USER_DIR=".mozilla" 24 MOZ_USER_DIR=".mozilla"
27 25
28-MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin -Wl,-rpath-link,${prefix}/lib" 26-MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin -Wl,-rpath-link,${prefix}/lib"
@@ -30,6 +28,3 @@ index 8a8ef52..d7afcff 100644
30 28
31 29
32 30
33--
342.7.4
35
diff --git a/meta-oe/recipes-extended/mozjs/mozjs/JS_PUBLIC_API.patch b/meta-oe/recipes-extended/mozjs/mozjs/JS_PUBLIC_API.patch
index 6c87ff2a4..56b18ba8c 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs/JS_PUBLIC_API.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs/JS_PUBLIC_API.patch
@@ -1,28 +1,40 @@
1Patch from https://bugzilla.mozilla.org/show_bug.cgi?id=1426865 1patch from https://bugzilla.mozilla.org/show_bug.cgi?id=1426865
2 2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1426865] 3Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1426865]
4Signed-off-by: Khem Raj <raj.khem@gmail.com>
5--- a/js/public/TypeDecls.h 5--- a/js/public/TypeDecls.h
6+++ b/js/public/TypeDecls.h 6+++ b/js/public/TypeDecls.h
7@@ -21,22 +21,23 @@ 7@@ -21,31 +21,32 @@
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "js-config.h" 10 #include "js-config.h"
11+#include "jstypes.h" 11+#include "jstypes.h"
12 12
13 struct JSContext; 13 typedef uint8_t jsbytecode;
14
15-class JSAtom;
16-struct JSCompartment;
17-struct JSContext;
14-class JSFunction; 18-class JSFunction;
15+class JS_PUBLIC_API(JSFunction); 19-class JSObject;
16 class JSObject; 20-struct JSRuntime;
17-class JSScript; 21-class JSScript;
18-class JSString; 22-class JSString;
19-class JSAddonId; 23-class JSAddonId;
20+class JS_PUBLIC_API(JSScript); 24-struct JSFreeOp;
21+class JS_PUBLIC_API(JSString); 25+class JS_PUBLIC_API JSAtom;
22+class JS_PUBLIC_API(JSAddonId); 26+struct JS_PUBLIC_API JSCompartment;
27+struct JS_PUBLIC_API JSContext;
28+class JS_PUBLIC_API JSFunction;
29+class JS_PUBLIC_API JSObject;
30+struct JS_PUBLIC_API JSRuntime;
31+class JS_PUBLIC_API JSScript;
32+class JS_PUBLIC_API JSString;
33+class JS_PUBLIC_API JSAddonId;
34+struct JS_PUBLIC_API JSFreeOp;
23 35
24-struct jsid; 36-struct jsid;
25+struct JS_PUBLIC_API(jsid); 37+struct JS_PUBLIC_API jsid;
26 38
27 namespace JS { 39 namespace JS {
28 40
@@ -30,8 +42,14 @@ Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1426865
30 42
31-class Symbol; 43-class Symbol;
32-class Value; 44-class Value;
33+class JS_PUBLIC_API(Symbol); 45-class Realm;
34+class JS_PUBLIC_API(Value); 46-struct Runtime;
35 template <typename T> class Handle; 47-struct Zone;
36 template <typename T> class MutableHandle; 48+class JS_PUBLIC_API Symbol;
37 template <typename T> class Rooted; 49+class JS_PUBLIC_API Value;
50+class JS_PUBLIC_API Realm;
51+struct JS_PUBLIC_API Runtime;
52+struct JS_PUBLIC_API Zone;
53
54 template <typename T>
55 class Handle;
diff --git a/meta-oe/recipes-extended/mozjs/mozjs/add-riscv-support.patch b/meta-oe/recipes-extended/mozjs/mozjs/add-riscv-support.patch
index 4354a9dee..0a4148561 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs/add-riscv-support.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs/add-riscv-support.patch
@@ -4,8 +4,6 @@ Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1318905
4 4
5Signed-off-by: Ricardo Salveti <ricardo@foundries.io> 5Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
6 6
7diff --git a/build/autoconf/config.guess b/build/autoconf/config.guess
8index d5d667d..1277a86 100755
9--- a/build/autoconf/config.guess 7--- a/build/autoconf/config.guess
10+++ b/build/autoconf/config.guess 8+++ b/build/autoconf/config.guess
11@@ -1029,6 +1029,9 @@ EOF 9@@ -1029,6 +1029,9 @@ EOF
@@ -18,39 +16,21 @@ index d5d667d..1277a86 100755
18 s390:Linux:*:* | s390x:Linux:*:*) 16 s390:Linux:*:* | s390x:Linux:*:*)
19 echo ${UNAME_MACHINE}-ibm-linux-${LIBC} 17 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
20 exit ;; 18 exit ;;
21diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
22index 6fe6591..56e6730 100644
23--- a/build/moz.configure/init.configure 19--- a/build/moz.configure/init.configure
24+++ b/build/moz.configure/init.configure 20+++ b/build/moz.configure/init.configure
25@@ -362,6 +362,9 @@ def split_triplet(triplet): 21@@ -658,6 +658,9 @@ def split_triplet(triplet, allow_unknown
26 elif cpu.startswith('aarch64'): 22 elif cpu == 'sh4':
27 canonical_cpu = 'aarch64' 23 canonical_cpu = 'sh4'
28 endianness = 'little' 24 endianness = 'little'
29+ elif cpu in ('riscv32', 'riscv64'): 25+ elif cpu in ('riscv32', 'riscv64'):
30+ canonical_cpu = cpu 26+ canonical_cpu = cpu
31+ endianness = 'little' 27+ endianness = 'little'
32 else: 28 elif allow_unknown:
33 die('Unknown CPU type: %s' % cpu) 29 canonical_cpu = cpu
34 30 endianness = 'unknown'
35diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
36index 15dd4bf..4f37218 100644
37--- a/mfbt/double-conversion/utils.h
38+++ b/mfbt/double-conversion/utils.h
39@@ -60,7 +60,8 @@
40 defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
41 defined(__SH4__) || defined(__alpha__) || \
42 defined(_MIPS_ARCH_MIPS32R2) || \
43- defined(__AARCH64EL__) || defined(__aarch64__)
44+ defined(__AARCH64EL__) || defined(__aarch64__) || \
45+ defined(__riscv)
46 #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
47 #elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
48 #if defined(_WIN32)
49diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py
50index dfc7cf8..4f8d666 100644
51--- a/python/mozbuild/mozbuild/configure/constants.py 31--- a/python/mozbuild/mozbuild/configure/constants.py
52+++ b/python/mozbuild/mozbuild/configure/constants.py 32+++ b/python/mozbuild/mozbuild/configure/constants.py
53@@ -48,6 +48,8 @@ CPU_bitness = { 33@@ -50,6 +50,8 @@ CPU_bitness = {
54 'mips64': 64, 34 'mips64': 64,
55 'ppc': 32, 35 'ppc': 32,
56 'ppc64': 64, 36 'ppc64': 64,
@@ -58,8 +38,8 @@ index dfc7cf8..4f8d666 100644
58+ 'riscv64': 64, 38+ 'riscv64': 64,
59 's390': 32, 39 's390': 32,
60 's390x': 64, 40 's390x': 64,
61 'sparc': 32, 41 'sh4': 32,
62@@ -79,6 +81,8 @@ CPU_preprocessor_checks = OrderedDict(( 42@@ -82,6 +84,8 @@ CPU_preprocessor_checks = OrderedDict((
63 ('s390', '__s390__'), 43 ('s390', '__s390__'),
64 ('ppc64', '__powerpc64__'), 44 ('ppc64', '__powerpc64__'),
65 ('ppc', '__powerpc__'), 45 ('ppc', '__powerpc__'),
diff --git a/meta-oe/recipes-extended/mozjs/mozjs/disable-mozglue-in-stand-alone-builds.patch b/meta-oe/recipes-extended/mozjs/mozjs/disable-mozglue-in-stand-alone-builds.patch
deleted file mode 100644
index 5487cdbe6..000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs/disable-mozglue-in-stand-alone-builds.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1From 2fb531ac753500314336ccd508cb2d53f5e768e5 Mon Sep 17 00:00:00 2001
2From: Till Schneidereit <till@tillschneidereit.net>
3Date: Thu, 1 Oct 2015 12:59:09 +0200
4Subject: Disable MOZ_GLUE_IN_PROGRAM in stand-alone builds on all platforms
5
6Otherwise, build fails not being able to find HashBytes.
7
8Patch ported forward to mozjs52 by Philip Chimento
9<philip.chimento@gmail.com>.
10
11https://bugzilla.mozilla.org/show_bug.cgi?id=1176787
12
13Upstream-Status: Backport
14
15Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
16---
17 js/src/old-configure | 20 ++++++++++++--------
18 mozglue/build/moz.build | 2 +-
19 2 files changed, 13 insertions(+), 9 deletions(-)
20
21diff --git a/js/src/old-configure b/js/src/old-configure
22index d7afcff..8a6f142 100644
23--- a/js/src/old-configure
24+++ b/js/src/old-configure
25@@ -8546,21 +8546,25 @@ if test -z "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then
26 fi
27
28
29-case "${OS_TARGET}" in
30-Android|WINNT|Darwin)
31+if test "$JS_STANDALONE"; then
32 MOZ_GLUE_IN_PROGRAM=
33- ;;
34-*)
35- MOZ_GLUE_IN_PROGRAM=1
36- cat >> confdefs.pytmp <<\EOF
37+else
38+ case "${OS_TARGET}" in
39+ Android|WINNT|Darwin)
40+ MOZ_GLUE_IN_PROGRAM=
41+ ;;
42+ *)
43+ MOZ_GLUE_IN_PROGRAM=1
44+ cat >> confdefs.pytmp <<\EOF
45 (''' MOZ_GLUE_IN_PROGRAM ''', ' 1 ')
46 EOF
47 cat >> confdefs.h <<\EOF
48 #define MOZ_GLUE_IN_PROGRAM 1
49 EOF
50
51- ;;
52-esac
53+ ;;
54+ esac
55+fi
56
57 if test "$MOZ_MEMORY"; then
58 if test "x$MOZ_DEBUG" = "x1"; then
59diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build
60index d289747..e3be5a2 100644
61--- a/mozglue/build/moz.build
62+++ b/mozglue/build/moz.build
63@@ -6,7 +6,7 @@
64
65 # Build mozglue as a shared lib on Windows, OSX and Android.
66 # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
67-if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
68+if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') and not CONFIG['JS_STANDALONE']:
69 SharedLibrary('mozglue')
70 else:
71 Library('mozglue')
72--
732.7.4
74
diff --git a/meta-oe/recipes-extended/mozjs/mozjs/format-overflow.patch b/meta-oe/recipes-extended/mozjs/mozjs/format-overflow.patch
index 29c6a7b69..e257fc6f6 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs/format-overflow.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs/format-overflow.patch
@@ -11,11 +11,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
11--- a/js/src/moz.build 11--- a/js/src/moz.build
12+++ b/js/src/moz.build 12+++ b/js/src/moz.build
13@@ -785,7 +785,7 @@ if CONFIG['JS_HAS_CTYPES']: 13@@ -785,7 +785,7 @@ if CONFIG['JS_HAS_CTYPES']:
14 DEFINES['FFI_BUILDING'] = True 14 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
15 15 # Also disable strict-aliasing for GCC compiler, that is enabled by default
16 if CONFIG['GNU_CXX']: 16 # starting with version 7.1, see Bug 1363009
17- CXXFLAGS += ['-Wno-shadow', '-Werror=format'] 17- CXXFLAGS += ['-Wno-shadow', '-Werror=format', '-fno-strict-aliasing']
18+ CXXFLAGS += ['-Wno-shadow'] 18+ CXXFLAGS += ['-Wno-shadow', '-fno-strict-aliasing']
19 19
20 # Suppress warnings in third-party code. 20 # Suppress warnings in third-party code.
21 if CONFIG['CLANG_CXX']: 21 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
diff --git a/meta-oe/recipes-extended/mozjs/mozjs_52.9.1.bb b/meta-oe/recipes-extended/mozjs/mozjs_60.5.2.bb
index 5e67eeea7..70bdbc168 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs_52.9.1.bb
+++ b/meta-oe/recipes-extended/mozjs/mozjs_60.5.2.bb
@@ -1,9 +1,9 @@
1SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++" 1SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++"
2HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey" 2HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
3LICENSE = "MPL-2.0" 3LICENSE = "MPL-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad" 4LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf"
5 5
6SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/main/m/mozjs52/mozjs52_52.9.1.orig.tar.xz \ 6SRC_URI = "https://dev.gentoo.org/~axs/distfiles/mozjs-60.5.2.tar.bz2 \
7 file://0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \ 7 file://0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \
8 file://0010-fix-cross-compilation-on-i586-targets.patch \ 8 file://0010-fix-cross-compilation-on-i586-targets.patch \
9 file://0001-do-not-create-python-environment.patch \ 9 file://0001-do-not-create-python-environment.patch \
@@ -11,29 +11,31 @@ SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/main/m/mozjs52/mozjs52_52.9.1.o
11 file://0003-workaround-autoconf-2.13-detection-failed.patch \ 11 file://0003-workaround-autoconf-2.13-detection-failed.patch \
12 file://0004-do-not-use-autoconf-2.13-to-refresh-old.configure.patch \ 12 file://0004-do-not-use-autoconf-2.13-to-refresh-old.configure.patch \
13 file://0005-fix-do_compile-failed-on-mips.patch \ 13 file://0005-fix-do_compile-failed-on-mips.patch \
14 file://disable-mozglue-in-stand-alone-builds.patch \
15 file://add-riscv-support.patch \ 14 file://add-riscv-support.patch \
16 file://0001-mozjs-fix-coredump-caused-by-getenv.patch \ 15 file://0001-mozjs-fix-coredump-caused-by-getenv.patch \
17 file://format-overflow.patch \ 16 file://format-overflow.patch \
18 file://JS_PUBLIC_API.patch \
19 file://0001-To-fix-build-error-on-arm32BE.patch \ 17 file://0001-To-fix-build-error-on-arm32BE.patch \
18 file://JS_PUBLIC_API.patch \
19 file://0001-riscv-Disable-atomic-operations.patch \
20 " 20 "
21SRC_URI_append_libc-musl = " \ 21SRC_URI_append_libc-musl = " \
22 file://0006-support-musl.patch \ 22 file://0006-support-musl.patch \
23 file://0001-js-Fix-build-with-musl.patch \
23 " 24 "
24SRC_URI_append_mipsarchn32 = " \ 25SRC_URI_append_mipsarchn32 = " \
25 file://0001-fix-compiling-failure-on-mips64-n32-bsp.patch \ 26 file://0001-fix-compiling-failure-on-mips64-n32-bsp.patch \
26 " 27 "
27 28SRC_URI[md5sum] = "023ed014e9e93d01620d121bc06a3589"
28SRC_URI[md5sum] = "c9473c625ee0a9edaaac8b742ff24c5f" 29SRC_URI[sha256sum] = "f51039c997415fd0f13f8e01966b4a8ff80cbf90deb8b14c18827104a369cc0d"
29SRC_URI[sha256sum] = "f9324a6724233ab15f10381fe13e635e89d725ef1e78025a0a7d36c58a84a0f9"
30 30
31inherit autotools pkgconfig perlnative pythonnative 31inherit autotools pkgconfig perlnative pythonnative
32 32
33inherit distro_features_check 33inherit distro_features_check
34CONFLICT_DISTRO_FEATURES_mipsarchn32 = "ld-is-gold" 34CONFLICT_DISTRO_FEATURES_mipsarchn32 = "ld-is-gold"
35 35
36DEPENDS += "nspr zlib" 36DEPENDS += "nspr zlib python-six-native python-pytoml-native \
37 python-jsmin-native python-futures-native \
38 python-which-native"
37 39
38# Disable null pointer optimization in gcc >= 6 40# Disable null pointer optimization in gcc >= 6
39# https://bugzilla.redhat.com/show_bug.cgi?id=1328045 41# https://bugzilla.redhat.com/show_bug.cgi?id=1328045
@@ -47,10 +49,15 @@ EXTRA_OECONF = " \
47 --prefix=${prefix} \ 49 --prefix=${prefix} \
48 --libdir=${libdir} \ 50 --libdir=${libdir} \
49 --disable-tests --disable-strip --disable-optimize \ 51 --disable-tests --disable-strip --disable-optimize \
52 --disable-jemalloc \
50 --with-nspr-libs='-lplds4 -lplc4 -lnspr4' \ 53 --with-nspr-libs='-lplds4 -lplc4 -lnspr4' \
51 ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \ 54 ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \
52" 55"
53 56
57EXTRA_OECONF_append_mipsarch = " --disable-ion"
58EXTRA_OECONF_append_riscv64 = " --disable-ion"
59EXTRA_OECONF_append_riscv32 = " --disable-ion"
60
54PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" 61PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
55PACKAGECONFIG[x11] = "--x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--x-includes=no --x-libraries=no,virtual/libx11" 62PACKAGECONFIG[x11] = "--x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--x-includes=no --x-libraries=no,virtual/libx11"
56 63
@@ -105,7 +112,7 @@ do_install_prepend() {
105 112
106PACKAGES =+ "lib${BPN}" 113PACKAGES =+ "lib${BPN}"
107FILES_lib${BPN} += "${libdir}/lib*.so" 114FILES_lib${BPN} += "${libdir}/lib*.so"
108FILES_${PN}-dev += "${bindir}/js52-config" 115FILES_${PN}-dev += "${bindir}/js60-config"
109 116
110# Fails to build with thumb-1 (qemuarm) 117# Fails to build with thumb-1 (qemuarm)
111#| {standard input}: Assembler messages: 118#| {standard input}: Assembler messages: