From 79138d90f021c4250ff7bebc576fd1728c800cdd Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Fri, 11 May 2018 11:10:50 +0200 Subject: [PATCH] Fix the build on ppc ... and sync xulrunner-24.0-jemalloc-ppc.patch with firefox. --- mozjs52.spec | 13 +++++++++++-- xulrunner-24.0-jemalloc-ppc.patch | 10 +++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/mozjs52.spec b/mozjs52.spec index a8ed685..606845a 100644 --- a/mozjs52.spec +++ b/mozjs52.spec @@ -1,5 +1,10 @@ %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 @@ -36,6 +41,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 @@ -134,7 +142,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 ; %else || : @@ -142,7 +150,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 %{power64} ; %else || : @@ -163,6 +171,7 @@ ln -s libmozjs-%{major}.so.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so %changelog * Fri May 11 2018 Kalev Lember - 52.8.0-1 - Update to 52.8.0 +- Fix the build on ppc * Sat Apr 07 2018 Kalev Lember - 52.7.3-1 - Update to 52.7.3 diff --git a/xulrunner-24.0-jemalloc-ppc.patch b/xulrunner-24.0-jemalloc-ppc.patch index b2aaae6..d0c3d8c 100644 --- a/xulrunner-24.0-jemalloc-ppc.patch +++ b/xulrunner-24.0-jemalloc-ppc.patch @@ -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