From owner-svn-ports-head@freebsd.org Mon Dec 12 05:53:26 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4452C725C5; Mon, 12 Dec 2016 05:53:26 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64480162B; Mon, 12 Dec 2016 05:53:26 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBC5rP7G055701; Mon, 12 Dec 2016 05:53:25 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBC5rOoA055686; Mon, 12 Dec 2016 05:53:24 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201612120553.uBC5rOoA055686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Mon, 12 Dec 2016 05:53:24 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r428395 - in head: mail/thunderbird mail/thunderbird/files www/firefox www/firefox-esr www/firefox-esr/files www/firefox/files www/libxul www/libxul/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 05:53:26 -0000 Author: jbeich Date: Mon Dec 12 05:53:24 2016 New Revision: 428395 URL: https://svnweb.freebsd.org/changeset/ports/428395 Log: gecko: apply some sparc64 crashfixes Obtained from: upstream MFH: 2016Q4 Added: head/mail/thunderbird/files/patch-bug1232150 (contents, props changed) head/mail/thunderbird/files/patch-bug1321877 (contents, props changed) head/www/firefox-esr/files/patch-bug1232150 (contents, props changed) head/www/firefox-esr/files/patch-bug1321877 (contents, props changed) head/www/firefox/files/patch-bug1321877 (contents, props changed) head/www/firefox/files/patch-bug1322112 (contents, props changed) head/www/firefox/files/patch-bug1322660 (contents, props changed) head/www/libxul/files/patch-bug1232150 (contents, props changed) head/www/libxul/files/patch-bug1321877 (contents, props changed) Modified: head/mail/thunderbird/Makefile (contents, props changed) head/www/firefox-esr/Makefile (contents, props changed) head/www/firefox/Makefile (contents, props changed) head/www/libxul/Makefile (contents, props changed) Modified: head/mail/thunderbird/Makefile ============================================================================== --- head/mail/thunderbird/Makefile Mon Dec 12 03:27:07 2016 (r428394) +++ head/mail/thunderbird/Makefile Mon Dec 12 05:53:24 2016 (r428395) @@ -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 Added: head/mail/thunderbird/files/patch-bug1232150 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/thunderbird/files/patch-bug1232150 Mon Dec 12 05:53:24 2016 (r428395) @@ -0,0 +1,280 @@ +commit 9a18802e82c7 +Author: Martin Husemann +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 . 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 ++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 ++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 ++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 ++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 ++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 ++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 ++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 ++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 ++inline T ++js::jit::AtomicOperations::loadSafeWhenRacy(T* addr) ++{ ++ return *addr; // FIXME (1208663): not yet safe ++} ++ ++template ++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 ++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 ++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 ++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 Added: head/mail/thunderbird/files/patch-bug1321877 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/thunderbird/files/patch-bug1321877 Mon Dec 12 05:53:24 2016 (r428395) @@ -0,0 +1,42 @@ +commit a13d95795217 +Author: +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&, 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 Modified: head/www/firefox-esr/Makefile ============================================================================== --- head/www/firefox-esr/Makefile Mon Dec 12 03:27:07 2016 (r428394) +++ head/www/firefox-esr/Makefile Mon Dec 12 05:53:24 2016 (r428395) @@ -4,7 +4,7 @@ PORTNAME= firefox DISTVERSION= 45.6.0 DISTVERSIONSUFFIX=esr.source -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= www ipv6 MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}esr/source \ Added: head/www/firefox-esr/files/patch-bug1232150 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/firefox-esr/files/patch-bug1232150 Mon Dec 12 05:53:24 2016 (r428395) @@ -0,0 +1,280 @@ +commit 9a18802e82c7 +Author: Martin Husemann +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 +--- js/src/jit/AtomicOperations.h ++++ 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 ++++ 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 . 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 ++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 ++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 ++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 ++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 ++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 ++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 ++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 ++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 ++inline T ++js::jit::AtomicOperations::loadSafeWhenRacy(T* addr) ++{ ++ return *addr; // FIXME (1208663): not yet safe ++} ++ ++template ++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 ++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 ++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 ++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 Added: head/www/firefox-esr/files/patch-bug1321877 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/firefox-esr/files/patch-bug1321877 Mon Dec 12 05:53:24 2016 (r428395) @@ -0,0 +1,42 @@ +commit a13d95795217 +Author: +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 +--- image/Downscaler.h ++++ 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&, 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 Modified: head/www/firefox/Makefile ============================================================================== --- head/www/firefox/Makefile Mon Dec 12 03:27:07 2016 (r428394) +++ head/www/firefox/Makefile Mon Dec 12 05:53:24 2016 (r428395) @@ -4,7 +4,7 @@ PORTNAME= firefox DISTVERSION= 50.1.0 DISTVERSIONSUFFIX=.source -PORTREVISION= 2 +PORTREVISION= 3 PORTEPOCH= 1 CATEGORIES= www ipv6 MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ Added: head/www/firefox/files/patch-bug1321877 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/firefox/files/patch-bug1321877 Mon Dec 12 05:53:24 2016 (r428395) @@ -0,0 +1,42 @@ +commit a13d95795217 +Author: +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 +--- image/Downscaler.h ++++ 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&, 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 Added: head/www/firefox/files/patch-bug1322112 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/firefox/files/patch-bug1322112 Mon Dec 12 05:53:24 2016 (r428395) @@ -0,0 +1,23 @@ +--- image/decoders/nsIconDecoder.cpp ++++ image/decoders/nsIconDecoder.cpp +@@ -89,17 +89,18 @@ nsIconDecoder::ReadRowOfPixels(const cha + { + MOZ_ASSERT(aLength % 4 == 0, "Rows should contain a multiple of four bytes"); + + auto result = mPipe.WritePixels([&]() -> NextPixel { + if (aLength == 0) { + return AsVariant(WriteState::NEED_MORE_DATA); // Done with this row. + } + +- uint32_t pixel = *reinterpret_cast(aData); ++ uint32_t pixel; ++ memcpy(&pixel, aData, 4); + aData += 4; + aLength -= 4; + + return AsVariant(pixel); + }); + + MOZ_ASSERT(result != WriteState::FAILURE); + + Added: head/www/firefox/files/patch-bug1322660 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/firefox/files/patch-bug1322660 Mon Dec 12 05:53:24 2016 (r428395) @@ -0,0 +1,80 @@ +--- modules/woff2/src/store_bytes.h ++++ modules/woff2/src/store_bytes.h +@@ -29,41 +29,44 @@ inline size_t StoreU32(uint8_t* dst, size_t offset, uint32_t x) { + dst[offset + 1] = x >> 16; + dst[offset + 2] = x >> 8; + dst[offset + 3] = x; + return offset + 4; + } + + inline size_t Store16(uint8_t* dst, size_t offset, int x) { + #if (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) +- *reinterpret_cast(dst + offset) = +- ((x & 0xFF) << 8) | ((x & 0xFF00) >> 8); ++ uint16_t v = ((x & 0xFF) << 8) | ((x & 0xFF00) >> 8); ++ memcpy(dst + offset, &v, 2); + #elif (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)) +- *reinterpret_cast(dst + offset) = static_cast(x); ++ uint16_t v = static_cast(x); ++ memcpy(dst + offset, &v, 2); + #else + dst[offset] = x >> 8; + dst[offset + 1] = x; + #endif + return offset + 2; + } + + inline void StoreU32(uint32_t val, size_t* offset, uint8_t* dst) { + dst[(*offset)++] = val >> 24; + dst[(*offset)++] = val >> 16; + dst[(*offset)++] = val >> 8; + dst[(*offset)++] = val; + } + + inline void Store16(int val, size_t* offset, uint8_t* dst) { + #if (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) +- *reinterpret_cast(dst + *offset) = ++ uint16_t v = ((val & 0xFF) << 8) | ((val & 0xFF00) >> 8); ++ memcpy(dst + *offset, &v, 2); + ((val & 0xFF) << 8) | ((val & 0xFF00) >> 8); + *offset += 2; + #elif (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)) +- *reinterpret_cast(dst + *offset) = static_cast(val); ++ uint16_t v = static_cast(val); ++ memcpy(dst + *offset, &v, 2); + *offset += 2; + #else + dst[(*offset)++] = val >> 8; + dst[(*offset)++] = val; + #endif + } + + inline void StoreBytes(const uint8_t* data, size_t len, +--- modules/woff2/src/woff2_common.cc ++++ modules/woff2/src/woff2_common.cc +@@ -20,22 +20,23 @@ + + namespace woff2 { + + + uint32_t ComputeULongSum(const uint8_t* buf, size_t size) { + uint32_t checksum = 0; + size_t aligned_size = size & ~3; + for (size_t i = 0; i < aligned_size; i += 4) { ++ uint32_t v; ++ memcpy(&v, buf + i, 4); + #if (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) +- uint32_t v = *reinterpret_cast(buf + i); + checksum += (((v & 0xFF) << 24) | ((v & 0xFF00) << 8) | + ((v & 0xFF0000) >> 8) | ((v & 0xFF000000) >> 24)); + #elif (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)) +- checksum += *reinterpret_cast(buf + i); ++ checksum += v; + #else + checksum += (buf[i] << 24) | (buf[i + 1] << 16) | + (buf[i + 2] << 8) | buf[i + 3]; + #endif + } + + // treat size not aligned on 4 as if it were padded to 4 with 0's + if (size != aligned_size) { Modified: head/www/libxul/Makefile ============================================================================== --- head/www/libxul/Makefile Mon Dec 12 03:27:07 2016 (r428394) +++ head/www/libxul/Makefile Mon Dec 12 05:53:24 2016 (r428395) @@ -3,7 +3,7 @@ PORTNAME= libxul DISTVERSION= 45.6.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES?= www devel MASTER_SITES= MOZILLA/firefox/releases/${DISTVERSION}esr/source \ MOZILLA/firefox/candidates/${DISTVERSION}esr-candidates/build1/source Added: head/www/libxul/files/patch-bug1232150 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/libxul/files/patch-bug1232150 Mon Dec 12 05:53:24 2016 (r428395) @@ -0,0 +1,280 @@ +commit 9a18802e82c7 +Author: Martin Husemann +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 +--- js/src/jit/AtomicOperations.h ++++ 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 ++++ 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 . 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 ++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 ++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 ++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 ++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 ++inline T ++js::jit::AtomicOperations::fetchSubSeqCst(T* addr, T val) *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***