diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-02-16 13:46:19 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-02-16 13:46:19 +0000 |
commit | 2fb331fbca471799894bee314a4ded512221f64c (patch) | |
tree | a66d9d1123eb04bba729f3dc9ee05828f50ac648 /experimental/firefox-esr | |
parent | ba82ac64e0274b2357b02f7f0f9a50ba1c26f1c8 (diff) | |
download | packages-2fb331fbca471799894bee314a4ded512221f64c.tar.gz packages-2fb331fbca471799894bee314a4ded512221f64c.tar.bz2 packages-2fb331fbca471799894bee314a4ded512221f64c.tar.xz packages-2fb331fbca471799894bee314a4ded512221f64c.zip |
experimental/firefox-esr: bump to 60.5.0 ESR
Diffstat (limited to 'experimental/firefox-esr')
-rw-r--r-- | experimental/firefox-esr/APKBUILD | 20 | ||||
-rw-r--r-- | experimental/firefox-esr/endian-gfx.patch | 11 | ||||
-rw-r--r-- | experimental/firefox-esr/endianness-js.patch | 175 | ||||
-rw-r--r-- | experimental/firefox-esr/fix-arm-atomics-grsec.patch | 306 | ||||
-rw-r--r-- | experimental/firefox-esr/shut-up-warning.patch | 11 | ||||
-rw-r--r-- | experimental/firefox-esr/stackwalk-x86-ppc.patch | 4 |
6 files changed, 109 insertions, 418 deletions
diff --git a/experimental/firefox-esr/APKBUILD b/experimental/firefox-esr/APKBUILD index 8a518d222..2a2e54066 100644 --- a/experimental/firefox-esr/APKBUILD +++ b/experimental/firefox-esr/APKBUILD @@ -1,9 +1,6 @@ -# Contributor: William Pitcock <nenolod@dereferenced.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=firefox-esr -pkgver=60.3.0 -_pkgver=$pkgver -_xulver=$pkgver +pkgver=60.5.0 pkgrel=0 pkgdesc="Firefox web browser" url="https://www.mozilla.org/en-US/firefox/organizations/faq/" @@ -29,7 +26,6 @@ source="https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox mallinfo.patch musl-pthread-setname.patch - fix-arm-atomics-grsec.patch fix-arm-version-detect.patch mozilla-build-arm.patch missing-header-s390x.patch @@ -42,6 +38,7 @@ source="https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox fix-mutex-build.patch proper-system-hunspell.patch rust-config.patch + shut-up-warning.patch skia.patch stackwalk-x86-ppc.patch webrtc-broken.patch @@ -50,9 +47,6 @@ source="https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox firefox-safe.desktop" builddir="$srcdir"/firefox-$pkgver -_mozappdir=/usr/lib/firefox - -# help our shared-object scanner to find the libs ldpath="$_mozappdir" unpack() { @@ -149,27 +143,27 @@ package() { EOF } -sha512sums="7ded25a38835fbd73a58085e24ad83308afee1784a3bf853d75093c1500ad46988f5865c106abdae938cfbd1fb10746cc1795ece7994fd7eba8a002158cf1bcd firefox-60.3.0esr.source.tar.xz +sha512sums="dd47e38a87a1339b733c06ea3f235576bf8dce414194ab308d0dda07bf15290afbbad92b8484732daa53cf6a48b57412f7f41e30ae0ac21144c8657b86047aec firefox-60.5.0esr.source.tar.xz 76e3e6f64f4dd1206106b2b73cca3ccd312a8d907010c382ab9e2f0a497fed297abf0654d4dd90c563e6dde6403e3f9084ce927bb275fec95be87bed8adf9257 mozconfig 0b3f1e4b9fdc868e4738b5c81fd6c6128ce8885b260affcb9a65ff9d164d7232626ce1291aaea70132b3e3124f5e13fef4d39326b8e7173e362a823722a85127 stab.h 09bc32cf9ee81b9cc6bb58ddbc66e6cc5c344badff8de3435cde5848e5a451e0172153231db85c2385ff05b5d9c20760cb18e4138dfc99060a9e960de2befbd5 fix-fortify-inline.patch 70863b985427b9653ce5e28d6064f078fb6d4ccf43dd1b68e72f97f44868fc0ce063161c39a4e77a0a1a207b7365d5dc7a7ca5e68c726825eba814f2b93e2f5d fix-seccomp-bpf.patch bdcd1b402d2ec94957ba5d08cbad7b1a7f59c251c311be9095208491a05abb05a956c79f27908e1f26b54a3679387b2f33a51e945b650671ad85c0a2d59a5a29 mallinfo.patch 3f535b1e4e9a5a0506ef6f6d9427a84fae1efa3c8e8d6b25b21046d2d04c132bde1a7a98e415067e5c542f699d89249b8cc3d925e0be4e96db498037429691ef musl-pthread-setname.patch -ed0d344c66fc8e1cc83a11e9858b32c42e841cbeedd9eb9438811e9fcc3593dc824a8336d00058d55836cedc970aeadd6a82c6dcd7bc0fb746e564d8b478cc6c fix-arm-atomics-grsec.patch 015e1ff6dbf920033982b5df95d869a0b7bf56c6964e45e50649ddf46d1ce09563458e45240c3ecb92808662b1300b67507f7af272ba184835d91068a9e7d5b0 fix-arm-version-detect.patch e61664bc93eadce5016a06a4d0684b34a05074f1815e88ef2613380d7b369c6fd305fb34f83b5eb18b9e3138273ea8ddcfdcb1084fdcaa922a1e5b30146a3b18 mozilla-build-arm.patch 6beba471b6a7fc229a9c105d58137f80cec07219e52bb9a666c787b37ca88635d6ec2eba651eccb5096429c2965709c9475c89839c255c3545f8c96c5d40f403 missing-header-s390x.patch ace7492f4fb0523c7340fdc09c831906f74fddad93822aff367135538dacd3f56288b907f5a04f53f94c76e722ba0bab73e28d83ec12d3e672554712e6b08613 bad-google-code.patch 61c7117345b4bcb045ce0287aa368d90dffd7331347021ff345d5a7c46097ffd2575f38711309ce7bdbbbec15561e03fdabcb16235ed8a325ccc8c9d5bba35a6 cmsghdr.patch -83b233e279846474bfb662d066e31f80be9055a022b126c638453ced46f70d3904dc114dbabd44800221a1bf3164350ea8c557c25d5e770e8871b7f2932c2427 endian-gfx.patch -31f0cf9663443410a996002ed0357c2ea21692ce965a30d8bfb65d0f1827173da8d8b5c831ccbc199ecbe7a577613be0dd54a09db08e620fe37e1ce977a7afb0 endianness-js.patch +11361b009d708e80afcf2eca8b02381be0c8314421eb439200c674cfa4e4bca15127f2d0dd11bf36f48d0e309d4424f949caf588f08458f8e9ba6812b83023ab endian-gfx.patch +363f1df1a78799783b4e9f887dc85d83ec83c6ec392aeacbd98dc89e543d0cd3b9d1964ce274142b44847a03c47f845cbf6fa7fa17a04b25bbaa37fc5d714730 endianness-js.patch a50b412edf9573a0bd04a43578b1c927967a616b73a5995eefb15bfa78fd2bd14e36ec05315a0703f6370ecd524e6bcb012e7285beb1245e9add9b8553acb79e fix-bug-1261392.patch d5d3ec190b1916d5c06f466a72124a3d438d90ea40d54e894105a9faf2aa2a6ce9cc21a0a80bd4408f7be867e5a660ee3d8aed40c8d1fb511cfb947739f45240 fix-mutex-build.patch 1a88c21c39d5878e2018463fe08dd3a960cdf10e650e06ef3e4f089a431800b50267d8749a7acde196bb47c45aa66058a6ed4fb4d60de2ab69e8a48cd5a109bc proper-system-hunspell.patch fd3b165e26ab931dd7eaf220d578c30b8772eab0a870710d59403c9823c2233ef941cd7eb25d1625d705de9e8a7138d0e8c4e227a185e9b687553132da96d81a rust-config.patch +21100340ff03f4257fa6a4b59e206d4d1b71c074ebae392ba616f9e6e6d4988a22eec69b40534221f9453ec3a58397fa4ab99b87abdcb7d22fabb13f9cc577d2 shut-up-warning.patch 8ef2bc4404601f66c7505f3e0a2f6d1d11e8f11e5a888dce4942cf27c86fbdbcdd66cb3d98738b7d9e25538793986140e75d51a893d22c70714ed98ef50a9894 skia.patch -d12ce112b97cbdba0748c5734a024b13032c5e0696efbd499764246e031d477b0f0a966aedc7b3bedd166bcdc2cc24d45bb9da5f678de9cff547bc6aa231cd16 stackwalk-x86-ppc.patch +e196c998a4029e4fc134fbe4b7455abb4b93644f7f07b88faef4eda900de225e72b124b5a9ab3492cbe398e17f8390d29b769a2544744a106bba6a5def540973 stackwalk-x86-ppc.patch 76409619464259e3ba52e38d640c5b6210a7fecdc75cf124c185ef356507d4d266a845e9fcdeb7766dcd547f70748123c4fa1670f6e52aadd001a3c866dc2d51 webrtc-broken.patch f3b7c3e804ce04731012a46cb9e9a6b0769e3772aef9c0a4a8c7520b030fdf6cd703d5e9ff49275f14b7d738fe82a0a4fde3bc3219dff7225d5db0e274987454 firefox.desktop 5dcb6288d0444a8a471d669bbaf61cdb1433663eff38b72ee5e980843f5fc07d0d60c91627a2c1159215d0ad77ae3f115dcc5fdfe87e64ca704b641aceaa44ed firefox-safe.desktop" diff --git a/experimental/firefox-esr/endian-gfx.patch b/experimental/firefox-esr/endian-gfx.patch index ec81a9cee..ca92bf830 100644 --- a/experimental/firefox-esr/endian-gfx.patch +++ b/experimental/firefox-esr/endian-gfx.patch @@ -10,12 +10,10 @@ CLOSED TREE diff --git a/gfx/2d/Swizzle.cpp b/gfx/2d/Swizzle.cpp --- a/gfx/2d/Swizzle.cpp +++ b/gfx/2d/Swizzle.cpp -@@ -82,17 +82,17 @@ AlphaByteIndex(SurfaceFormat aFormat) +@@ -75,13 +75,13 @@ AlphaByteIndex(SurfaceFormat aFormat) // The endian-dependent bit shift to access RGB of a UINT32 pixel. - static constexpr uint32_t - RGBBitShift(SurfaceFormat aFormat) - { + static constexpr uint32_t RGBBitShift(SurfaceFormat aFormat) { #if MOZ_LITTLE_ENDIAN return 8 * RGBByteIndex(aFormat); #else @@ -25,8 +23,5 @@ diff --git a/gfx/2d/Swizzle.cpp b/gfx/2d/Swizzle.cpp } // The endian-dependent bit shift to access alpha of a UINT32 pixel. - static constexpr uint32_t - AlphaBitShift(SurfaceFormat aFormat) - { + static constexpr uint32_t AlphaBitShift(SurfaceFormat aFormat) { return (RGBBitShift(aFormat) + 24) % 32; - diff --git a/experimental/firefox-esr/endianness-js.patch b/experimental/firefox-esr/endianness-js.patch index 98e1bd092..1a04573ea 100644 --- a/experimental/firefox-esr/endianness-js.patch +++ b/experimental/firefox-esr/endianness-js.patch @@ -1,52 +1,44 @@ -# HG changeset patch -# User Steve Fink <sfink@mozilla.com> -# Date 1536603384 25200 -# Mon Sep 10 11:16:24 2018 -0700 -# Node ID f598dceb588d1adf503d30acf4e0915d07d34006 -# Parent b7dd3969261896020d7a9449d22f350a97e3517a -# EXP-Topic b1488552.enD -Bug 1488552 - JSString flags bit must alias the low 32 bits of JSObject.group_, not the high 32. r=tcampbell +Bug 1488552 - Ensure proper running on 64-bit and 32-bit BE platforms. diff --git a/js/src/gc/RelocationOverlay.h b/js/src/gc/RelocationOverlay.h --- a/js/src/gc/RelocationOverlay.h +++ b/js/src/gc/RelocationOverlay.h -@@ -29,24 +29,35 @@ struct Cell; +@@ -29,23 +29,34 @@ struct Cell; * This structure overlays a Cell that has been moved and provides a way to find * its new location. It's used during generational and compacting GC. */ - class RelocationOverlay - { - /* See comment in js/public/HeapAPI.h. */ - static const uint32_t Relocated = js::gc::Relocated; + class RelocationOverlay { + /* See comment in js/public/HeapAPI.h. */ + static const uint32_t Relocated = js::gc::Relocated; -+#if MOZ_LITTLE_ENDIAN - /* -- * Keep the low 32 bits untouched. Use them to distinguish strings from -+ * Keep the first 32 bits untouched. Use them to distinguish strings from - * objects in the nursery. - */ - uint32_t preserve_; ++#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32 + /* +- * Keep the low 32 bits untouched. Use them to distinguish strings from ++ * Keep the first 32 bits untouched. Use them to distinguish strings from + * objects in the nursery. + */ + uint32_t preserve_; - /* Set to Relocated when moved. */ - uint32_t magic_; + /* Set to Relocated when moved. */ + uint32_t magic_; +#elif JS_BITS_PER_WORD == 64 -+ /* -+ * On big-endian, we need to reorder to keep preserve_ lined up with the -+ * low 32 bits of the aligned group_ pointer in JSObject. -+ */ -+ uint32_t magic_; -+ uint32_t preserve_; ++ /* ++ * On big-endian, we need to reorder to keep preserve_ lined up with the ++ * low 32 bits of the aligned group_ pointer in JSObject. ++ */ ++ uint32_t magic_; ++ uint32_t preserve_; +#else -+# error "Support for 32-bit big-endian architectures is untested. See bug 1488552." ++# error "Unknown endianness or word size" +#endif - /* The location |this| was moved to. */ - Cell* newLocation_; + /* The location |this| was moved to. */ + Cell* newLocation_; - /* A list entry to track all relocated things. */ - RelocationOverlay* next_; + /* A list entry to track all relocated things. */ + RelocationOverlay* next_; - public: + public: diff --git a/js/src/vm/StringType.h b/js/src/vm/StringType.h --- a/js/src/vm/StringType.h +++ b/js/src/vm/StringType.h @@ -68,54 +60,59 @@ diff --git a/js/src/vm/StringType.h b/js/src/vm/StringType.h #include "jsfriendapi.h" #include "builtin/String.h" -@@ -161,18 +162,30 @@ class JSString : public js::gc::Cell - static const size_t NUM_INLINE_CHARS_LATIN1 = 2 * sizeof(void*) / sizeof(JS::Latin1Char); - static const size_t NUM_INLINE_CHARS_TWO_BYTE = 2 * sizeof(void*) / sizeof(char16_t); - - /* Fields only apply to string types commented on the right. */ - struct Data - { - union { - struct { -+#if MOZ_LITTLE_ENDIAN - uint32_t flags; /* JSString */ - uint32_t length; /* JSString */ +@@ -168,8 +168,20 @@ class JSString : public js::gc::Cell + struct Data { + union { + struct { ++#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32 + uint32_t flags; /* JSString */ + uint32_t length; /* JSString */ +#elif JS_BITS_PER_WORD == 64 -+ /* -+ * On big-endian, we need to reorder to keep flags lined up -+ * with the low 32 bits of the aligned group_ pointer in -+ * JSObject. -+ */ -+ uint32_t length; /* JSString */ -+ uint32_t flags; /* JSString */ ++ /* ++ * On big-endian, we need to reorder to keep flags lined up ++ * with the low 32 bits of the aligned group_ pointer in ++ * JSObject. ++ */ ++ uint32_t length; /* JSString */ ++ uint32_t flags; /* JSString */ +#else -+# error "Support for 32-bit big-endian architectures is untested. See bug 1488552." ++# error "Unknown endianness or word size" +#endif - }; - uintptr_t flattenData; /* JSRope (temporary while flattening) */ - } u1; - union { - union { - /* JS(Fat)InlineString */ - JS::Latin1Char inlineStorageLatin1[NUM_INLINE_CHARS_LATIN1]; - char16_t inlineStorageTwoByte[NUM_INLINE_CHARS_TWO_BYTE]; + }; + uintptr_t flattenData; /* JSRope (temporary while flattening) */ + } u1; --- thunderbird-60.2.1/js/src/gc/Marking-inl.h.old 2018-10-01 14:51:12.000000000 +0000 +++ thunderbird-60.2.1/js/src/gc/Marking-inl.h 2018-10-12 19:08:28.260000000 +0000 -@@ -92,10 +92,10 @@ - MOZ_ASSERT(!isForwarded()); - // The location of magic_ is important because it must never be valid to see - // the value Relocated there in a GC thing that has not been moved. -- static_assert(offsetof(RelocationOverlay, magic_) == offsetof(JSObject, group_) + sizeof(uint32_t), -- "RelocationOverlay::magic_ is in the wrong location"); -- static_assert(offsetof(RelocationOverlay, magic_) == offsetof(js::Shape, base_) + sizeof(uint32_t), -- "RelocationOverlay::magic_ is in the wrong location"); -+ //static_assert(offsetof(RelocationOverlay, magic_) == offsetof(JSObject, group_) + sizeof(uint32_t), -+ // "RelocationOverlay::magic_ is in the wrong location"); -+ //static_assert(offsetof(RelocationOverlay, magic_) == offsetof(js::Shape, base_) + sizeof(uint32_t), -+ // "RelocationOverlay::magic_ is in the wrong location"); - static_assert(offsetof(RelocationOverlay, magic_) == offsetof(JSString, d.u1.length), - "RelocationOverlay::magic_ is in the wrong location"); - magic_ = Relocated; +@@ -92,13 +92,29 @@ + MOZ_ASSERT(!isForwarded()); + // The location of magic_ is important because it must never be valid to see + // the value Relocated there in a GC thing that has not been moved. ++#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32 ++ // On 32-bit, the magic_ aliases with whatever comes after the first ++ // pointer; on little-endian 64-bit, the magic_ aliases with the ++ // 32 most significant bits of the pointer, which are the second half. + static_assert(offsetof(RelocationOverlay, magic_) == + offsetof(JSObject, group_) + sizeof(uint32_t), + "RelocationOverlay::magic_ is in the wrong location"); + static_assert(offsetof(RelocationOverlay, magic_) == + offsetof(js::Shape, base_) + sizeof(uint32_t), + "RelocationOverlay::magic_ is in the wrong location"); ++#elif JS_BITS_PER_WORD == 64 ++ // On big-endian 64-bit, the magic_ aliases with the 32 most ++ // significant bits of the pointer, but now that's the first half. ++ static_assert(offsetof(RelocationOverlay, magic_) == ++ offsetof(JSObject, group_), ++ "RelocationOverlay::magic_ is in the wrong location"); ++ static_assert(offsetof(RelocationOverlay, magic_) == ++ offsetof(js::Shape, base_), ++ "RelocationOverlay::magic_ is in the wrong location"); ++#else ++# error "Unknown endianness or word size" ++#endif + static_assert( + offsetof(RelocationOverlay, magic_) == offsetof(JSString, d.u1.length), + "RelocationOverlay::magic_ is in the wrong location"); + magic_ = Relocated; --- thunderbird-60.2.1/js/src/jsfriendapi.h.old 2018-10-01 14:51:13.000000000 +0000 +++ thunderbird-60.2.1/js/src/jsfriendapi.h 2018-10-12 19:12:06.190000000 +0000 @@ -9,6 +9,7 @@ @@ -127,18 +124,18 @@ diff --git a/js/src/vm/StringType.h b/js/src/vm/StringType.h #include "mozilla/MemoryReporting.h" #include "mozilla/UniquePtr.h" @@ -640,8 +641,15 @@ - static const uint32_t LATIN1_CHARS_BIT = JS_BIT(6); - static const uint32_t EXTERNAL_FLAGS = LINEAR_BIT | NON_ATOM_BIT | JS_BIT(5); - static const uint32_t TYPE_FLAGS_MASK = JS_BIT(6) - 1; -+#if MOZ_LITTLE_ENDIAN - uint32_t flags; - uint32_t length; + static const uint32_t LATIN1_CHARS_BIT = JS_BIT(6); + static const uint32_t EXTERNAL_FLAGS = LINEAR_BIT | NON_ATOM_BIT | JS_BIT(5); + static const uint32_t TYPE_FLAGS_MASK = JS_BIT(6) - 1; ++#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32 + uint32_t flags; + uint32_t length; +#elif JS_BITS_PER_WORD == 64 -+ uint32_t length; -+ uint32_t flags; ++ uint32_t length; ++ uint32_t flags; +#else -+# error "Support for 32-bit big-endian architectures is untested. See bug 1488552." ++# error "Unknown endianness or word size" +#endif - union { - const JS::Latin1Char* nonInlineCharsLatin1; - const char16_t* nonInlineCharsTwoByte; + union { + const JS::Latin1Char* nonInlineCharsLatin1; + const char16_t* nonInlineCharsTwoByte; diff --git a/experimental/firefox-esr/fix-arm-atomics-grsec.patch b/experimental/firefox-esr/fix-arm-atomics-grsec.patch deleted file mode 100644 index 0eb58f093..000000000 --- a/experimental/firefox-esr/fix-arm-atomics-grsec.patch +++ /dev/null @@ -1,306 +0,0 @@ ---- mozilla-release/ipc/chromium/src/base/atomicops_internals_arm_gcc.h.orig -+++ mozilla-release/ipc/chromium/src/base/atomicops_internals_arm_gcc.h -@@ -12,43 +35,194 @@ - namespace base { - namespace subtle { - --// 0xffff0fc0 is the hard coded address of a function provided by --// the kernel which implements an atomic compare-exchange. On older --// ARM architecture revisions (pre-v6) this may be implemented using --// a syscall. This address is stable, and in active use (hard coded) --// by at least glibc-2.7 and the Android C library. --typedef Atomic32 (*LinuxKernelCmpxchgFunc)(Atomic32 old_value, -- Atomic32 new_value, -- volatile Atomic32* ptr); --LinuxKernelCmpxchgFunc pLinuxKernelCmpxchg __attribute__((weak)) = -- (LinuxKernelCmpxchgFunc) 0xffff0fc0; -+// Memory barriers on ARM are funky, but the kernel is here to help: -+// -+// * ARMv5 didn't support SMP, there is no memory barrier instruction at -+// all on this architecture, or when targeting its machine code. -+// -+// * Some ARMv6 CPUs support SMP. A full memory barrier can be produced by -+// writing a random value to a very specific coprocessor register. -+// -+// * On ARMv7, the "dmb" instruction is used to perform a full memory -+// barrier (though writing to the co-processor will still work). -+// However, on single core devices (e.g. Nexus One, or Nexus S), -+// this instruction will take up to 200 ns, which is huge, even though -+// it's completely un-needed on these devices. -+// -+// * There is no easy way to determine at runtime if the device is -+// single or multi-core. However, the kernel provides a useful helper -+// function at a fixed memory address (0xffff0fa0), which will always -+// perform a memory barrier in the most efficient way. I.e. on single -+// core devices, this is an empty function that exits immediately. -+// On multi-core devices, it implements a full memory barrier. -+// -+// * This source could be compiled to ARMv5 machine code that runs on a -+// multi-core ARMv6 or ARMv7 device. In this case, memory barriers -+// are needed for correct execution. Always call the kernel helper, even -+// when targeting ARMv5TE. -+// - --typedef void (*LinuxKernelMemoryBarrierFunc)(void); --LinuxKernelMemoryBarrierFunc pLinuxKernelMemoryBarrier __attribute__((weak)) = -- (LinuxKernelMemoryBarrierFunc) 0xffff0fa0; -+inline void MemoryBarrier() { -+#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \ -+ defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) -+ __asm__ __volatile__("dmb ish" ::: "memory"); -+#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \ -+ defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \ -+ defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) -+ __asm__ __volatile__("mcr p15,0,r0,c7,c10,5" ::: "memory"); -+#elif defined(__linux__) || defined(__ANDROID__) -+ // Note: This is a function call, which is also an implicit compiler barrier. -+ typedef void (*KernelMemoryBarrierFunc)(); -+ ((KernelMemoryBarrierFunc)0xffff0fa0)(); -+#error MemoryBarrier() is not implemented on this platform. -+#endif -+} - -+// An ARM toolchain would only define one of these depending on which -+// variant of the target architecture is being used. This tests against -+// any known ARMv6 or ARMv7 variant, where it is possible to directly -+// use ldrex/strex instructions to implement fast atomic operations. -+#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \ -+ defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || \ -+ defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \ -+ defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \ -+ defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) - - inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr, - Atomic32 old_value, - Atomic32 new_value) { -- Atomic32 prev_value = *ptr; -+ Atomic32 prev_value; -+ int reloop; - do { -- if (!pLinuxKernelCmpxchg(old_value, new_value, -- const_cast<Atomic32*>(ptr))) { -- return old_value; -- } -- prev_value = *ptr; -- } while (prev_value == old_value); -+ // The following is equivalent to: -+ // -+ // prev_value = LDREX(ptr) -+ // reloop = 0 -+ // if (prev_value != old_value) -+ // reloop = STREX(ptr, new_value) -+ __asm__ __volatile__(" ldrex %0, [%3]\n" -+ " mov %1, #0\n" -+ " cmp %0, %4\n" -+#ifdef __thumb2__ -+ " it eq\n" -+#endif -+ " strexeq %1, %5, [%3]\n" -+ : "=&r"(prev_value), "=&r"(reloop), "+m"(*ptr) -+ : "r"(ptr), "r"(old_value), "r"(new_value) -+ : "cc", "memory"); -+ } while (reloop != 0); - return prev_value; - } - -+inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr, -+ Atomic32 old_value, -+ Atomic32 new_value) { -+ Atomic32 result = NoBarrier_CompareAndSwap(ptr, old_value, new_value); -+ MemoryBarrier(); -+ return result; -+} -+ -+inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr, -+ Atomic32 old_value, -+ Atomic32 new_value) { -+ MemoryBarrier(); -+ return NoBarrier_CompareAndSwap(ptr, old_value, new_value); -+} -+ -+inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr, -+ Atomic32 increment) { -+ Atomic32 value; -+ int reloop; -+ do { -+ // Equivalent to: -+ // -+ // value = LDREX(ptr) -+ // value += increment -+ // reloop = STREX(ptr, value) -+ // -+ __asm__ __volatile__(" ldrex %0, [%3]\n" -+ " add %0, %0, %4\n" -+ " strex %1, %0, [%3]\n" -+ : "=&r"(value), "=&r"(reloop), "+m"(*ptr) -+ : "r"(ptr), "r"(increment) -+ : "cc", "memory"); -+ } while (reloop); -+ return value; -+} -+ -+inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr, -+ Atomic32 increment) { -+ // TODO(digit): Investigate if it's possible to implement this with -+ // a single MemoryBarrier() operation between the LDREX and STREX. -+ // See http://crbug.com/246514 -+ MemoryBarrier(); -+ Atomic32 result = NoBarrier_AtomicIncrement(ptr, increment); -+ MemoryBarrier(); -+ return result; -+} -+ - inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr, - Atomic32 new_value) { - Atomic32 old_value; -+ int reloop; - do { -+ // old_value = LDREX(ptr) -+ // reloop = STREX(ptr, new_value) -+ __asm__ __volatile__(" ldrex %0, [%3]\n" -+ " strex %1, %4, [%3]\n" -+ : "=&r"(old_value), "=&r"(reloop), "+m"(*ptr) -+ : "r"(ptr), "r"(new_value) -+ : "cc", "memory"); -+ } while (reloop != 0); -+ return old_value; -+} -+ -+// This tests against any known ARMv5 variant. -+#elif defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || \ -+ defined(__ARM_ARCH_5TE__) || defined(__ARM_ARCH_5TEJ__) -+ -+// The kernel also provides a helper function to perform an atomic -+// compare-and-swap operation at the hard-wired address 0xffff0fc0. -+// On ARMv5, this is implemented by a special code path that the kernel -+// detects and treats specially when thread pre-emption happens. -+// On ARMv6 and higher, it uses LDREX/STREX instructions instead. -+// -+// Note that this always perform a full memory barrier, there is no -+// need to add calls MemoryBarrier() before or after it. It also -+// returns 0 on success, and 1 on exit. -+// -+// Available and reliable since Linux 2.6.24. Both Android and ChromeOS -+// use newer kernel revisions, so this should not be a concern. -+namespace { -+ -+inline int LinuxKernelCmpxchg(Atomic32 old_value, -+ Atomic32 new_value, -+ volatile Atomic32* ptr) { -+ typedef int (*KernelCmpxchgFunc)(Atomic32, Atomic32, volatile Atomic32*); -+ return ((KernelCmpxchgFunc)0xffff0fc0)(old_value, new_value, ptr); -+} -+ -+} // namespace -+ -+inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr, -+ Atomic32 old_value, -+ Atomic32 new_value) { -+ Atomic32 prev_value; -+ for (;;) { -+ prev_value = *ptr; -+ if (prev_value != old_value) -+ return prev_value; -+ if (!LinuxKernelCmpxchg(old_value, new_value, ptr)) -+ return old_value; -+ } -+} -+ -+inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr, -+ Atomic32 new_value) { -+ Atomic32 old_value; -+ do { - old_value = *ptr; -- } while (pLinuxKernelCmpxchg(old_value, new_value, -- const_cast<Atomic32*>(ptr))); -+ } while (LinuxKernelCmpxchg(old_value, new_value, ptr)); - return old_value; - } - -@@ -63,36 +237,57 @@ - // Atomic exchange the old value with an incremented one. - Atomic32 old_value = *ptr; - Atomic32 new_value = old_value + increment; -- if (pLinuxKernelCmpxchg(old_value, new_value, -- const_cast<Atomic32*>(ptr)) == 0) { -+ if (!LinuxKernelCmpxchg(old_value, new_value, ptr)) { - // The exchange took place as expected. - return new_value; - } - // Otherwise, *ptr changed mid-loop and we need to retry. - } -- - } - - inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr, - Atomic32 old_value, - Atomic32 new_value) { -- return NoBarrier_CompareAndSwap(ptr, old_value, new_value); -+ Atomic32 prev_value; -+ for (;;) { -+ prev_value = *ptr; -+ if (prev_value != old_value) { -+ // Always ensure acquire semantics. -+ MemoryBarrier(); -+ return prev_value; -+ } -+ if (!LinuxKernelCmpxchg(old_value, new_value, ptr)) -+ return old_value; -+ } - } - - inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr, - Atomic32 old_value, - Atomic32 new_value) { -- return NoBarrier_CompareAndSwap(ptr, old_value, new_value); -+ // This could be implemented as: -+ // MemoryBarrier(); -+ // return NoBarrier_CompareAndSwap(); -+ // -+ // But would use 3 barriers per succesful CAS. To save performance, -+ // use Acquire_CompareAndSwap(). Its implementation guarantees that: -+ // - A succesful swap uses only 2 barriers (in the kernel helper). -+ // - An early return due to (prev_value != old_value) performs -+ // a memory barrier with no store, which is equivalent to the -+ // generic implementation above. -+ return Acquire_CompareAndSwap(ptr, old_value, new_value); - } - -+#else -+# error "Your CPU's ARM architecture is not supported yet" -+#endif -+ -+// NOTE: Atomicity of the following load and store operations is only -+// guaranteed in case of 32-bit alignement of |ptr| values. -+ - inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) { - *ptr = value; - } - --inline void MemoryBarrier() { -- pLinuxKernelMemoryBarrier(); --} -- - inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) { - *ptr = value; - MemoryBarrier(); -@@ -103,9 +298,7 @@ - *ptr = value; - } - --inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) { -- return *ptr; --} -+inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) { return *ptr; } - - inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) { - Atomic32 value = *ptr; -@@ -118,7 +311,6 @@ - return *ptr; - } - --} // namespace base::subtle --} // namespace base -+} } // namespace base::subtle - - #endif // BASE_ATOMICOPS_INTERNALS_ARM_GCC_H_ diff --git a/experimental/firefox-esr/shut-up-warning.patch b/experimental/firefox-esr/shut-up-warning.patch new file mode 100644 index 000000000..ffba50436 --- /dev/null +++ b/experimental/firefox-esr/shut-up-warning.patch @@ -0,0 +1,11 @@ +--- firefox-52.9.0esr/gfx/2d/HelpersCairo.h.old 2017-04-11 02:13:04.000000000 +0000 ++++ firefox-52.9.0esr/gfx/2d/HelpersCairo.h 2018-12-08 18:45:01.880000000 +0000 +@@ -160,7 +160,7 @@ + case SurfaceFormat::R5G6B5_UINT16: + return CAIRO_FORMAT_RGB16_565; + default: +- gfxCriticalError() << "Unknown image format " << (int)format; ++ //gfxCriticalError() << "Unknown image format " << (int)format; + return CAIRO_FORMAT_ARGB32; + } + } diff --git a/experimental/firefox-esr/stackwalk-x86-ppc.patch b/experimental/firefox-esr/stackwalk-x86-ppc.patch index 5a4189847..3659ef8d2 100644 --- a/experimental/firefox-esr/stackwalk-x86-ppc.patch +++ b/experimental/firefox-esr/stackwalk-x86-ppc.patch @@ -4,13 +4,13 @@ #define MOZ_STACKWALK_SUPPORTS_MACOSX 0 #endif --#if (defined(linux) && \ +-#if (defined(linux) && \ - ((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \ - defined(HAVE__UNWIND_BACKTRACE))) -#define MOZ_STACKWALK_SUPPORTS_LINUX 1 -#else #define MOZ_STACKWALK_SUPPORTS_LINUX 0 -#endif - + #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) #define HAVE___LIBC_STACK_END 1 |