commit:     6290ff0ea8dd57f0b55b064eaf4636581a0d09d0
Author:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 12 19:27:31 2016 +0000
Commit:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Sat Mar 12 19:27:31 2016 +0000
URL:        https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=6290ff0e

attempt at fixing crash when jit is disabled

 ...efox-45.0-jitless-atomic-operations-ppc64.patch | 46 ++++++++++++++++++++++
 ...irefox-45.0-jitless-atomic-operations-x86.patch | 11 ++++++
 www-client/firefox/firefox-45.0.ebuild             |  4 +-
 3 files changed, 60 insertions(+), 1 deletion(-)

diff --git 
a/www-client/firefox/files/firefox-45.0-jitless-atomic-operations-ppc64.patch 
b/www-client/firefox/files/firefox-45.0-jitless-atomic-operations-ppc64.patch
new file mode 100644
index 0000000..26e9373
--- /dev/null
+++ 
b/www-client/firefox/files/firefox-45.0-jitless-atomic-operations-ppc64.patch
@@ -0,0 +1,46 @@
+
+# HG changeset patch
+# User Lars T Hansen <[email protected]>
+# Date 1457091735 -3600
+# Node ID 69f237c2cf9131e97372debee01931dbacd064e5
+# Parent  3aa4483740828617001060fe7386051020521e90
+Bug 1253216 - clean up the atomic ops ifdef nest. r=jorendorff
+
+diff --git a/js/src/jit/AtomicOperations.h b/js/src/jit/AtomicOperations.h
+--- a/js/src/jit/AtomicOperations.h
++++ b/js/src/jit/AtomicOperations.h
+@@ -318,21 +318,29 @@ AtomicOperations::isLockfree(int32_t siz
+ } // namespace js
+ 
+ #if defined(JS_CODEGEN_ARM)
+ # include "jit/arm/AtomicOperations-arm.h"
+ #elif defined(JS_CODEGEN_ARM64)
+ # include "jit/arm64/AtomicOperations-arm64.h"
+ #elif defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64)
+ # include "jit/mips-shared/AtomicOperations-mips-shared.h"
+-#elif defined(__ppc64__) || defined(__PPC64_)       \
+-    || defined(__ppc64le__) || defined(__PPC64LE__) \
+-    || defined(__ppc__) || defined(__PPC__)
++#elif defined(__ppc__) || defined(__PPC__)
+ # include "jit/none/AtomicOperations-ppc.h"
+ #elif defined(JS_CODEGEN_NONE)
+-# include "jit/none/AtomicOperations-none.h"
++  // You can disable the JIT with --disable-ion but you must still
++  // provide the atomic operations that will be used by the JS engine.
++  // When the JIT is disabled the operations are simply safe-for-races
++  // C++ realizations of atomics.  These operations cannot be written
++  // in portable C++, hence the default here is to crash.  See the
++  // top of the file for more guidance.
++# if defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || 
defined(__PPC64LE__)
++#  include "jit/none/AtomicOperations-ppc.h"
++# else
++#  include "jit/none/AtomicOperations-none.h" // These MOZ_CRASH() always
++# endif
+ #elif defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64)
+ # include "jit/x86-shared/AtomicOperations-x86-shared.h"
+ #else
+ # error "Atomic operations must be defined for this platform"
+ #endif
+ 
+ #endif // jit_AtomicOperations_h
+

diff --git 
a/www-client/firefox/files/firefox-45.0-jitless-atomic-operations-x86.patch 
b/www-client/firefox/files/firefox-45.0-jitless-atomic-operations-x86.patch
new file mode 100644
index 0000000..86b2713
--- /dev/null
+++ b/www-client/firefox/files/firefox-45.0-jitless-atomic-operations-x86.patch
@@ -0,0 +1,11 @@
+--- a/js/src/jit/AtomicOperations.h    2016-03-12 13:42:27.914524205 -0500
++++ b/js/src/jit/AtomicOperations.h    2016-03-12 13:42:15.644573630 -0500
+@@ -311,6 +311,8 @@
+   // top of the file for more guidance.
+ # if defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || 
defined(__PPC64LE__)
+ #  include "jit/none/AtomicOperations-ppc.h"
++# elif defined(__i386__) || defined(__x86_64__)
++#  include "jit/x86-shared/AtomicOperations-x86-shared.h"
+ # else
+ #  include "jit/none/AtomicOperations-none.h" // These MOZ_CRASH() always
+ # endif

diff --git a/www-client/firefox/firefox-45.0.ebuild 
b/www-client/firefox/firefox-45.0.ebuild
index 7026972..8fa5df6 100644
--- a/www-client/firefox/firefox-45.0.ebuild
+++ b/www-client/firefox/firefox-45.0.ebuild
@@ -132,7 +132,9 @@ src_unpack() {
 src_prepare() {
        # Apply our patches
        eapply "${WORKDIR}/firefox" \
-               "${FILESDIR}"/${PN}-45-qt-widget-fix.patch
+               "${FILESDIR}"/${PN}-45-qt-widget-fix.patch \
+               "${FILESDIR}"/${P}-jitless-atomic-operations-ppc64.patch \
+               "${FILESDIR}"/${P}-jitless-atomic-operations-x86.patch
 
        # Allow user to apply any additional patches without modifing ebuild
        eapply_user

Reply via email to