aboutsummaryrefslogtreecommitdiff
path: root/mail/thunderbird
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2016-12-12 05:53:24 +0000
committerJan Beich <jbeich@FreeBSD.org>2016-12-12 05:53:24 +0000
commitc3ebc97270df2168f953fcda604d87e82ab081ef (patch)
tree59d19bafa21b1b3c66f764e3654081c89371392d /mail/thunderbird
parent5366798eb492db54c4fac6e53a7bc0b78de07098 (diff)
downloadports-c3ebc97270df2168f953fcda604d87e82ab081ef.tar.gz
ports-c3ebc97270df2168f953fcda604d87e82ab081ef.zip
gecko: apply some sparc64 crashfixes
Obtained from: upstream MFH: 2016Q4
Notes
Notes: svn path=/head/; revision=428395
Diffstat (limited to 'mail/thunderbird')
-rw-r--r--mail/thunderbird/Makefile2
-rw-r--r--mail/thunderbird/files/patch-bug1232150280
-rw-r--r--mail/thunderbird/files/patch-bug132187742
3 files changed, 323 insertions, 1 deletions
diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile
index 371a0b41743e..22d0e5682f41 100644
--- a/mail/thunderbird/Makefile
+++ b/mail/thunderbird/Makefile
@@ -3,7 +3,7 @@
PORTNAME= thunderbird
DISTVERSION= 45.5.1
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= mail news net-im ipv6
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source
diff --git a/mail/thunderbird/files/patch-bug1232150 b/mail/thunderbird/files/patch-bug1232150
new file mode 100644
index 000000000000..463bf653268e
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug1232150
@@ -0,0 +1,280 @@
+commit 9a18802e82c7
+Author: Martin Husemann <martin>
+Date: Fri Jan 22 00:09:00 2016 +0100
+
+ Bug 1232150 - "Atomic operations for PPC/PPC64". r=lhansen
+---
+ js/src/jit/AtomicOperations.h | 2 +
+ js/src/jit/none/AtomicOperations-sparc.h | 251 +++++++++++++++++++++++++++++++
+ 2 files changed, 253 insertions(+)
+
+diff --git js/src/jit/AtomicOperations.h js/src/jit/AtomicOperations.h
+index 16196342a282..42aee72eb879 100644
+--- mozilla/js/src/jit/AtomicOperations.h
++++ mozilla/js/src/jit/AtomicOperations.h
+@@ -328,6 +328,8 @@ AtomicOperations::isLockfree(int32_t size)
+ # include "jit/mips-shared/AtomicOperations-mips-shared.h"
+ #elif defined(__ppc__) || defined(__PPC__)
+ # include "jit/none/AtomicOperations-ppc.h"
++#elif defined(__sparc__)
++# include "jit/none/AtomicOperations-sparc.h"
+ #elif defined(JS_CODEGEN_NONE)
+ // You can disable the JIT with --disable-ion but you must still
+ // provide the atomic operations that will be used by the JS engine.
+diff --git js/src/jit/none/AtomicOperations-sparc.h js/src/jit/none/AtomicOperations-sparc.h
+new file mode 100644
+index 000000000000..706ada86241b
+--- /dev/null
++++ mozilla/js/src/jit/none/AtomicOperations-sparc.h
+@@ -0,0 +1,251 @@
++/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
++ * vim: set ts=8 sts=4 et sw=4 tw=99:
++ * This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0. If a copy of the MPL was not distributed with this
++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
++
++/* For documentation, see jit/AtomicOperations.h */
++
++#ifndef jit_sparc_AtomicOperations_sparc_h
++#define jit_sparc_AtomicOperations_sparc_h
++
++#include "mozilla/Assertions.h"
++#include "mozilla/Types.h"
++
++#if defined(__clang__) || defined(__GNUC__)
++
++// The default implementation tactic for gcc/clang is to use the newer
++// __atomic intrinsics added for use in C++11 <atomic>. Where that
++// isn't available, we use GCC's older __sync functions instead.
++//
++// ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS is kept as a backward
++// compatible option for older compilers: enable this to use GCC's old
++// __sync functions instead of the newer __atomic functions. This
++// will be required for GCC 4.6.x and earlier, and probably for Clang
++// 3.1, should we need to use those versions.
++
++//#define ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++
++inline bool
++js::jit::AtomicOperations::isLockfree8()
++{
++# ifndef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int8_t), 0));
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int16_t), 0));
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int32_t), 0));
++# if defined(__LP64__)
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int64_t), 0));
++# endif
++ return true;
++# else
++ return false;
++# endif
++}
++
++inline void
++js::jit::AtomicOperations::fenceSeqCst()
++{
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ __sync_synchronize();
++# else
++ __atomic_thread_fence(__ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::loadSeqCst(T* addr)
++{
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ __sync_synchronize();
++ T v = *addr;
++ __sync_synchronize();
++# else
++ T v;
++ __atomic_load(addr, &v, __ATOMIC_SEQ_CST);
++# endif
++ return v;
++}
++
++template<typename T>
++inline void
++js::jit::AtomicOperations::storeSeqCst(T* addr, T val)
++{
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ __sync_synchronize();
++ *addr = val;
++ __sync_synchronize();
++# else
++ __atomic_store(addr, &val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::compareExchangeSeqCst(T* addr, T oldval, T newval)
++{
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_val_compare_and_swap(addr, oldval, newval);
++# else
++ __atomic_compare_exchange(addr, &oldval, &newval, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
++ return oldval;
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchAddSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_add(addr, val);
++# else
++ return __atomic_fetch_add(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchSubSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_sub(addr, val);
++# else
++ return __atomic_fetch_sub(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchAndSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_and(addr, val);
++# else
++ return __atomic_fetch_and(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchOrSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_or(addr, val);
++# else
++ return __atomic_fetch_or(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchXorSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_xor(addr, val);
++# else
++ return __atomic_fetch_xor(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::loadSafeWhenRacy(T* addr)
++{
++ return *addr; // FIXME (1208663): not yet safe
++}
++
++template<typename T>
++inline void
++js::jit::AtomicOperations::storeSafeWhenRacy(T* addr, T val)
++{
++ *addr = val; // FIXME (1208663): not yet safe
++}
++
++inline void
++js::jit::AtomicOperations::memcpySafeWhenRacy(void* dest, const void* src, size_t nbytes)
++{
++ ::memcpy(dest, src, nbytes); // FIXME (1208663): not yet safe
++}
++
++inline void
++js::jit::AtomicOperations::memmoveSafeWhenRacy(void* dest, const void* src, size_t nbytes)
++{
++ ::memmove(dest, src, nbytes); // FIXME (1208663): not yet safe
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::exchangeSeqCst(T* addr, T val)
++{
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ T v;
++ __sync_synchronize();
++ do {
++ v = *addr;
++ } while (__sync_val_compare_and_swap(addr, v, val) != v);
++ return v;
++# else
++ T v;
++ __atomic_exchange(addr, &val, &v, __ATOMIC_SEQ_CST);
++ return v;
++# endif
++}
++
++template<size_t nbytes>
++inline void
++js::jit::RegionLock::acquire(void* addr)
++{
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ while (!__sync_bool_compare_and_swap(&spinlock, 0, 1))
++ ;
++# else
++ uint32_t zero = 0;
++ uint32_t one = 1;
++ while (!__atomic_compare_exchange(&spinlock, &zero, &one, false, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE)) {
++ zero = 0;
++ continue;
++ }
++# endif
++}
++
++template<size_t nbytes>
++inline void
++js::jit::RegionLock::release(void* addr)
++{
++ MOZ_ASSERT(AtomicOperations::loadSeqCst(&spinlock) == 1, "releasing unlocked region lock");
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ __sync_sub_and_fetch(&spinlock, 1);
++# else
++ uint32_t zero = 0;
++ __atomic_store(&spinlock, &zero, __ATOMIC_SEQ_CST);
++# endif
++}
++
++# undef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++
++#elif defined(ENABLE_SHARED_ARRAY_BUFFER)
++
++# error "Either disable JS shared memory, use GCC or Clang, or add code here"
++
++#endif
++
++#endif // jit_sparc_AtomicOperations_sparc_h
diff --git a/mail/thunderbird/files/patch-bug1321877 b/mail/thunderbird/files/patch-bug1321877
new file mode 100644
index 000000000000..f7f79285a328
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug1321877
@@ -0,0 +1,42 @@
+commit a13d95795217
+Author: <tharvik@gmail.com>
+Date: Thu Dec 8 18:20:12 2016 -0600
+
+ Bug 1321877. Fix compiler warnings in Downscaler.h when skia is not enabled. r=tnikkel
+---
+ image/Downscaler.h | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git image/Downscaler.h image/Downscaler.h
+index 21179a38f200..0bdef0eaa646 100644
+--- mozilla/image/Downscaler.h
++++ mozilla/image/Downscaler.h
+@@ -154,14 +154,14 @@ private:
+ class Downscaler
+ {
+ public:
+- explicit Downscaler(const nsIntSize&)
++ explicit Downscaler(const nsIntSize&) : mScale(1.0, 1.0)
+ {
+ MOZ_RELEASE_ASSERT(false, "Skia is not enabled");
+ }
+
+- const nsIntSize& OriginalSize() const { return nsIntSize(); }
+- const nsIntSize& TargetSize() const { return nsIntSize(); }
+- const gfxSize& Scale() const { return gfxSize(1.0, 1.0); }
++ const nsIntSize& OriginalSize() const { return mSize; }
++ const nsIntSize& TargetSize() const { return mSize; }
++ const gfxSize& Scale() const { return mScale; }
+
+ nsresult BeginFrame(const nsIntSize&, const Maybe<nsIntRect>&, uint8_t*, bool, bool = false)
+ {
+@@ -177,6 +177,9 @@ public:
+ DownscalerInvalidRect TakeInvalidRect() { return DownscalerInvalidRect(); }
+ void ResetForNextProgressivePass() { }
+ const nsIntSize FrameSize() const { return nsIntSize(0, 0); }
++private:
++ nsIntSize mSize;
++ gfxSize mScale;
+ };
+
+ #endif // MOZ_ENABLE_SKIA