Compare commits

...

7 Commits
master ... f26

Author SHA1 Message Date
Kalev Lember 94698979bd Update list of arches where tests pass 2018-05-11 14:26:35 +02:00
Kalev Lember 9de49e9bbb Add two test fixes from Debian 2018-05-11 13:25:36 +02:00
Kalev Lember 92550aef50 Disable JS Helper threads on ppc64le
https://bugzilla.redhat.com/show_bug.cgi?id=1523121
2018-05-11 12:11:32 +02:00
Kalev Lember c4c289089f Fix the build on ppc
... and sync xulrunner-24.0-jemalloc-ppc.patch with firefox.
2018-05-11 12:00:23 +02:00
Kalev Lember 2ab4adec9a Update to 52.8.0 2018-05-11 10:10:09 +02:00
Kalev Lember b0e00cf7e1 Update to 52.7.3 2018-04-07 12:57:52 +02:00
Kalev Lember 40eabdbc26 Update to 52.7.2 2018-03-20 13:26:08 +01:00
7 changed files with 107 additions and 9 deletions

3
.gitignore vendored
View File

@ -2,3 +2,6 @@
/firefox-52.4.0esr.source.tar.xz
/firefox-52.5.0esr.source.tar.xz
/firefox-52.6.0esr.source.tar.xz
/firefox-52.7.2esr.source.tar.xz
/firefox-52.7.3esr.source.tar.xz
/firefox-52.8.0esr.source.tar.xz

View File

@ -0,0 +1,21 @@
diff -up firefox-52.6.0esr/js/src/vm/Runtime.cpp.disable-extra-threads firefox-52.6.0esr/js/src/vm/Runtime.cpp
--- firefox-52.6.0esr/js/src/vm/Runtime.cpp.disable-extra-threads 2018-02-08 10:16:13.453828939 -0500
+++ firefox-52.6.0esr/js/src/vm/Runtime.cpp 2018-02-08 10:23:31.283458826 -0500
@@ -283,6 +283,17 @@ JSRuntime::init(uint32_t maxbytes, uint3
ownerThreadNative_ = (size_t)pthread_self();
#endif
+ const char* enable_js_helper_threads;
+ enable_js_helper_threads = getenv("GJS_ENABLE_JS_HELPER_THREADS");
+
+#if defined(__PPC64__) && defined (__LITTLE_ENDIAN__)
+ if (enable_js_helper_threads == NULL)
+ js::DisableExtraThreads();
+#endif
+
+ if (enable_js_helper_threads != NULL && enable_js_helper_threads[0] == '0')
+ js::DisableExtraThreads();
+
if (!mainThread.init())
return false;

View File

@ -1,12 +1,17 @@
%global major 52
# Require libatomic for ppc
%ifarch ppc
%global system_libatomic 1
%endif
# Big endian platforms
%ifarch ppc ppc64 s390 s390x
%global big_endian 1
%endif
Name: mozjs%{major}
Version: 52.6.0
Version: 52.8.0
Release: 1%{?dist}
Summary: SpiderMonkey JavaScript library
@ -17,6 +22,12 @@ Source0: https://ftp.mozilla.org/pub/firefox/releases/%{version}esr/sourc
# Patches from Debian mozjs52_52.3.1-4.debian.tar.xz:
Patch0001: fix-soname.patch
Patch0002: copy-headers.patch
Patch0003: tests-increase-timeout.patch
Patch0004: tests-snans-be.patch
# Disable JS Helper threads on ppc64le
# https://bugzilla.redhat.com/show_bug.cgi?id=1523121
Patch0010: disable-extra-threads.patch
# Patches from https://github.com/ptomato/mozjs / Debian mozjs52_52.3.1-4.debian.tar.xz
Patch0101: disable-mozglue.patch
@ -36,6 +47,9 @@ BuildRequires: pkgconfig(zlib)
BuildRequires: python2-devel
BuildRequires: readline-devel
BuildRequires: /usr/bin/zip
%if 0%{?system_libatomic}
BuildRequires: libatomic
%endif
# Firefox does not allow to build with system version of jemalloc
Provides: bundled(jemalloc) = 4.3.1
@ -59,6 +73,10 @@ developing applications that use %{name}.
pushd ../..
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0010 -p1
%patch0101 -p1
%patch0104 -p1
@ -134,7 +152,7 @@ ln -s libmozjs-%{major}.so.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so
%check
# Run SpiderMonkey tests
%{__python2} tests/jstests.py -d -s -t 1800 --no-progress ../../js/src/js/src/shell/js \
%ifnarch s390 s390x %{power64}
%ifarch %{ix86} x86_64 %{arm} aarch64 ppc ppc64le s390
;
%else
|| :
@ -142,7 +160,7 @@ ln -s libmozjs-%{major}.so.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so
# Run basic JIT tests
%{__python2} jit-test/jit_test.py -s -t 1800 --no-progress ../../js/src/js/src/shell/js basic \
%ifnarch s390 s390x
%ifarch %{ix86} x86_64 %{arm} aarch64 ppc ppc64le s390 s390x
;
%else
|| :
@ -162,6 +180,17 @@ ln -s libmozjs-%{major}.so.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so
%{_includedir}/mozjs-%{major}/
%changelog
* Fri May 11 2018 Kalev Lember <klember@redhat.com> - 52.8.0-1
- Update to 52.8.0
- Fix the build on ppc
- Disable JS Helper threads on ppc64le (#1523121)
* Sat Apr 07 2018 Kalev Lember <klember@redhat.com> - 52.7.3-1
- Update to 52.7.3
* Tue Mar 20 2018 Kalev Lember <klember@redhat.com> - 52.7.2-1
- Update to 52.7.2
* Tue Jan 23 2018 Kalev Lember <klember@redhat.com> - 52.6.0-1
- Update to 52.6.0

View File

@ -1 +1 @@
SHA512 (firefox-52.6.0esr.source.tar.xz) = cf583df34272b7ff8841c3b093ca0819118f9c36d23c6f9b3135db298e84ca022934bcd189add6473922b199b47330c0ecf14c303ab4177c03dbf26e64476fa4
SHA512 (firefox-52.8.0esr.source.tar.xz) = 4136fa582e4ffd754d46a79bdb562bd12da4d013d87dfe40fa92addf377e95f5f642993c8b783edd5290089619beeb5a907a0810b68b8808884f087986977df1

View File

@ -0,0 +1,16 @@
Description: Increase the test timeout for slower buildds
Author: Adrian Bunk <bunk@debian.org>
Bug-Debian: https://bugs.debian.org/878284
--- mozjs52-52.3.1.orig/js/src/Makefile.in
+++ mozjs52-52.3.1/js/src/Makefile.in
@@ -104,7 +104,7 @@ check:: check-style check-masm check-js-
check-jstests:
$(wildcard $(RUN_TEST_PROGRAM)) $(PYTHON) -u $(srcdir)/tests/jstests.py \
- --no-progress --format=automation --timeout 300 \
+ --no-progress --format=automation --timeout 600 \
$(JSTESTS_EXTRA_ARGS) \
$(DIST)/bin/$(JS_SHELL_NAME)$(BIN_SUFFIX)

29
tests-snans-be.patch Normal file
View File

@ -0,0 +1,29 @@
Description: Fix sort_snans.js test on big endian
Author: Adrian Bunk <bunk@debian.org>
Bug-Debian: https://bugs.debian.org/878285
--- mozjs52-52.3.1.orig/js/src/tests/ecma_6/TypedArray/sort_snans.js
+++ mozjs52-52.3.1/js/src/tests/ecma_6/TypedArray/sort_snans.js
@@ -34,8 +34,20 @@ function testFloat32NaNRanges(start, end
// and startHi, startLow and endHi, endLow should be 32-bit integers which,
// when combined (Hi + Low), form Float64 NaNs.
function testFloat64NaNRanges(startHi, startLow, endHi, endLow) {
- let skipN = 10e6;
+ // Swap on big endian platforms
+ if ((new Uint32Array((new Uint8Array([1,2,3,4])).buffer))[0] === 0x01020304) {
+ let tmp = startHi;
+ startHi = startLow;
+ startLow = tmp;
+
+ tmp = endHi;
+ endHi = endLow;
+ endLow = tmp;
+ }
+
+ let skipN = 10e6;
+
let sampleSizeHi = Math.floor((endHi - startHi)/skipN);
let sampleSizeLow = Math.floor((endLow - startLow)/skipN);

View File

@ -1,12 +1,12 @@
diff -up firefox-48.0/memory/mozjemalloc/jemalloc.c.jemalloc-ppc firefox-48.0/memory/mozjemalloc/jemalloc.c
--- firefox-48.0/memory/mozjemalloc/jemalloc.c.jemalloc-ppc 2016-07-26 10:51:46.385434384 +0200
+++ firefox-48.0/memory/mozjemalloc/jemalloc.c 2016-07-26 10:53:49.061023106 +0200
@@ -1090,7 +1090,7 @@ static const bool config_recycle = false
diff -up mozilla-aurora/memory/mozjemalloc/jemalloc.c.jemalloc-ppc.patch mozilla-aurora/memory/mozjemalloc/jemalloc.c
--- mozilla-aurora/memory/mozjemalloc/jemalloc.c.jemalloc-ppc.patch 2016-11-18 08:56:32.242742746 +0100
+++ mozilla-aurora/memory/mozjemalloc/jemalloc.c 2016-11-18 08:59:51.809071876 +0100
@@ -1096,7 +1096,7 @@ static const bool config_recycle = false
* controlling the malloc behavior are defined as compile-time constants
* for best performance and cannot be altered at runtime.
*/
-#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !defined(__aarch64__)
+#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !defined(__aarch64__) && !(defined(__powerpc__))
+#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !defined(__aarch64__) && !defined(__powerpc__)
#define MALLOC_STATIC_SIZES 1
#endif