import PPC fixes as provided by Dinar Valeev firefox14
authorWolfgang Rosenauer <wr@rosenauer.org>
Mon, 16 Jul 2012 21:10:33 +0200
branchfirefox14
changeset 495 8ed13b37e5fb
parent 494 21aea6bec3cb
child 496 3c23dab1c5d9
import PPC fixes as provided by Dinar Valeev
MozillaFirefox/MozillaFirefox.changes
MozillaFirefox/MozillaFirefox.spec
MozillaFirefox/mozilla-ppc.patch
mozilla-ppc.patch
series
xulrunner/mozilla-ppc.patch
xulrunner/xulrunner.changes
xulrunner/xulrunner.spec
--- a/MozillaFirefox/MozillaFirefox.changes	Mon Jul 16 09:49:33 2012 +0200
+++ b/MozillaFirefox/MozillaFirefox.changes	Mon Jul 16 21:10:33 2012 +0200
@@ -4,10 +4,13 @@
 - update to 14.0.1 (bnc#)
 - license change from tri license to MPL-2.0
 - fix crashreporter restart option (bmo#762780)
-- reenabled mozilla-yarr-pcre.patch to fix build for PPC
 - require NSS 3.13.5
 - remove mozjs pacrunner obsoletes again for now
 - adopted mozilla-prefer_plugin_pref.patch
+- PPC fixes:
+  * reenabled mozilla-yarr-pcre.patch to fix build for PPC
+  * add patches for bmo#750620 and bmo#746112
+  * fix xpcshell segfault on ppc
 
 -------------------------------------------------------------------
 Fri Jun 15 12:37:09 UTC 2012 - wr@rosenauer.org
--- a/MozillaFirefox/MozillaFirefox.spec	Mon Jul 16 09:49:33 2012 +0200
+++ b/MozillaFirefox/MozillaFirefox.spec	Mon Jul 16 21:10:33 2012 +0200
@@ -98,6 +98,7 @@
 Patch14:        mozilla-gcc47.patch
 Patch15:        mozilla-arm-disable-edsp.patch
 Patch16:        mozilla-crashreporter-restart-args.patch
+Patch17:        mozilla-ppc.patch
 # Firefox/browser
 Patch30:        firefox-browser-css.patch
 Patch31:        firefox-kde.patch
@@ -228,6 +229,7 @@
 %patch14 -p1
 %patch15 -p1
 %patch16 -p1
+%patch17 -p1
 #
 %patch30 -p1
 %if %suse_version >= 1110
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-ppc.patch	Mon Jul 16 21:10:33 2012 +0200
@@ -0,0 +1,1 @@
+../mozilla-ppc.patch
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mozilla-ppc.patch	Mon Jul 16 21:10:33 2012 +0200
@@ -0,0 +1,115 @@
+# HG changeset patch
+# Parent 67e6f1e1d06ca3d54cea1d26877c2a68f0c096e5
+# User Wolfgang Rosenauer <wr@rosenauer.org>
+Bug 746112 - RegExp hang on ppc64 in execute.
+Bug 750620 - Make double-conversion portable to exotic architectures. TM: mozilla15
+
+diff --git a/js/src/yarr/YarrInterpreter.h b/js/src/yarr/YarrInterpreter.h
+--- a/js/src/yarr/YarrInterpreter.h
++++ b/js/src/yarr/YarrInterpreter.h
+@@ -162,17 +162,17 @@ struct ByteTerm {
+         , m_invert(invert)
+     {
+         atom.characterClass = characterClass;
+         atom.quantityType = QuantifierFixedCount;
+         atom.quantityCount = 1;
+         inputPosition = inputPos;
+     }
+ 
+-    ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos)
++    ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) __attribute__((noinline))
+         : type(type)
+         , m_capture(capture)
+         , m_invert(false)
+     {
+         atom.subpatternId = subpatternId;
+         atom.parenthesesDisjunction = parenthesesInfo;
+         atom.quantityType = QuantifierFixedCount;
+         atom.quantityCount = 1;
+@@ -183,17 +183,17 @@ struct ByteTerm {
+         : type(type)
+         , m_capture(false)
+         , m_invert(invert)
+     {
+         atom.quantityType = QuantifierFixedCount;
+         atom.quantityCount = 1;
+     }
+ 
+-    ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos)
++    ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) __attribute__((noinline))
+         : type(type)
+         , m_capture(capture)
+         , m_invert(invert)
+     {
+         atom.subpatternId = subpatternId;
+         atom.quantityType = QuantifierFixedCount;
+         atom.quantityCount = 1;
+         inputPosition = inputPos;
+diff --git a/js/src/yarr/YarrPattern.h b/js/src/yarr/YarrPattern.h
+--- a/js/src/yarr/YarrPattern.h
++++ b/js/src/yarr/YarrPattern.h
+@@ -166,17 +166,17 @@ struct PatternTerm {
+         , m_capture(false)
+         , m_invert(invert)
+     {
+         characterClass = charClass;
+         quantityType = QuantifierFixedCount;
+         quantityCount = 1;
+     }
+ 
+-    PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false)
++    PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) __attribute__((noinline))
+         : type(type)
+         , m_capture(capture)
+         , m_invert(invert)
+     {
+         parentheses.disjunction = disjunction;
+         parentheses.subpatternId = subpatternId;
+         parentheses.isCopy = false;
+         parentheses.isTerminal = false;
+diff --git a/memory/jemalloc/jemalloc.c b/memory/jemalloc/jemalloc.c
+--- a/memory/jemalloc/jemalloc.c
++++ b/memory/jemalloc/jemalloc.c
+@@ -1086,17 +1086,19 @@ struct arena_s {
+ static unsigned		ncpus;
+ #endif
+ 
+ /*
+  * When MALLOC_STATIC_SIZES is defined most of the parameters
+  * controlling the malloc behavior are defined as compile-time constants
+  * for best performance and cannot be altered at runtime.
+  */
++#if !(defined(__powerpc__))
+ #define MALLOC_STATIC_SIZES 1
++#endif
+ 
+ #ifdef MALLOC_STATIC_SIZES
+ 
+ /*
+  * VM page size. It must divide the runtime CPU page size or the code
+  * will abort.
+  */
+ #define pagesize_2pow			((size_t) 12)
+diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
+--- a/mfbt/double-conversion/utils.h
++++ b/mfbt/double-conversion/utils.h
+@@ -49,17 +49,18 @@
+ // evaluate: 89255.0/1e22. If the floating-point stack is 64 bits wide then
+ // the result is equal to 89255e-22.
+ // The best way to test this, is to create a division-function and to compare
+ // the output of the division with the expected result. (Inlining must be
+ // disabled.)
+ // On Linux,x86 89255e-22 != Div_double(89255.0/1e22)
+ #if defined(_M_X64) || defined(__x86_64__) || \
+     defined(__ARMEL__) || \
+-    defined(_MIPS_ARCH_MIPS32R2)
++    defined(_MIPS_ARCH_MIPS32R2) || \
++    defined(__powerpc__) || defined(__powerpc64__)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #elif defined(_M_IX86) || defined(__i386__)
+ #if defined(_WIN32)
+ // Windows uses a 64bit wide floating point stack.
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #else
+ #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
+ #endif  // _WIN32
--- a/series	Mon Jul 16 09:49:33 2012 +0200
+++ b/series	Mon Jul 16 21:10:33 2012 +0200
@@ -19,6 +19,7 @@
 mozilla-arm-disable-edsp.patch
 mozilla-crashreporter-restart-args.patch
 mozilla-yarr-pcre.patch
+mozilla-ppc.patch
 #mozilla-disable-neon-option.patch
 
 # Firefox patches
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xulrunner/mozilla-ppc.patch	Mon Jul 16 21:10:33 2012 +0200
@@ -0,0 +1,1 @@
+../mozilla-ppc.patch
\ No newline at end of file
--- a/xulrunner/xulrunner.changes	Mon Jul 16 09:49:33 2012 +0200
+++ b/xulrunner/xulrunner.changes	Mon Jul 16 21:10:33 2012 +0200
@@ -4,6 +4,10 @@
 - update to 14.0.1 (bnc#)
 - license change from tri license to MPL-2.0
 - require NSS 3.13.5
+- PPC fixes:
+  * reenabled mozilla-yarr-pcre.patch to fix build for PPC
+  * add patches for bmo#750620 and bmo#746112
+  * fix xpcshell segfault on ppc
 
 -------------------------------------------------------------------
 Sat Jun  2 09:16:34 UTC 2012 - wr@rosenauer.org
--- a/xulrunner/xulrunner.spec	Mon Jul 16 09:49:33 2012 +0200
+++ b/xulrunner/xulrunner.spec	Mon Jul 16 21:10:33 2012 +0200
@@ -79,6 +79,7 @@
 Patch9:         mozilla-sle11.patch
 Patch11:        mozilla-yarr-pcre.patch
 Patch12:        mozilla-gcc47.patch
+Patch13:        mozilla-ppc.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Requires:       mozilla-js = %{version}
 Requires(post):  update-alternatives coreutils
@@ -197,6 +198,7 @@
 %endif
 %patch11 -p1
 %patch12 -p1
+%patch13 -p1
 
 %build
 # no need to add build time to binaries