summaryrefslogtreecommitdiff
path: root/libre/iceweasel
diff options
context:
space:
mode:
authorAndreas Grapentin <andreas@grapentin.org>2019-03-01 01:37:35 +0100
committerAndreas Grapentin <andreas@grapentin.org>2019-03-01 01:37:57 +0100
commitf526dd43fb4c7381ff0a0dec0878716e0db54f49 (patch)
tree199ee6c9ae1227d79e46a62d616867d6649f33f6 /libre/iceweasel
parent23e485eecea92af2d46a7b6417038857abca1531 (diff)
downloadabslibre-f526dd43fb4c7381ff0a0dec0878716e0db54f49.tar.gz
abslibre-f526dd43fb4c7381ff0a0dec0878716e0db54f49.tar.bz2
abslibre-f526dd43fb4c7381ff0a0dec0878716e0db54f49.zip
libre/iceweasel: updated for arm
Diffstat (limited to 'libre/iceweasel')
-rw-r--r--libre/iceweasel/PKGBUILD31
-rw-r--r--libre/iceweasel/mozilla-1463035.patch90
2 files changed, 118 insertions, 3 deletions
diff --git a/libre/iceweasel/PKGBUILD b/libre/iceweasel/PKGBUILD
index 55bcbc971..e85ddc226 100644
--- a/libre/iceweasel/PKGBUILD
+++ b/libre/iceweasel/PKGBUILD
@@ -66,14 +66,16 @@ source=("https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox
$pkgname.desktop
https://repo.parabola.nu/other/iceweasel/${pkgname}_${_brandingver}-${_brandingrel}.branding.tar.xz{,.sig}
libre-searchengines.patch
- libre.patch)
+ libre.patch
+ mozilla-1463035.patch)
sha256sums=('67e517f6d1ea8aa5c8f32404b8756f3205c3550917a91a19b0a0edccc656a3cc'
'SKIP'
'ed350ef2f528b999a621f7080fa80948be6b351e67ce32529fb32bcf47bb21fa'
'4e4d52addfb0de4b4439e959e5c35194e35a6840a21dcf6b20c46604ae7f6482'
'SKIP'
'871222c88dfd240b1805b28c98ca7431bd2b87be1ff4dbb06caa6407b106b803'
- '4a4667d99ab50b1990de6833e9647ddd428d9206e422c7cc3754d4f80aeb8038')
+ '4a4667d99ab50b1990de6833e9647ddd428d9206e422c7cc3754d4f80aeb8038'
+ '8ed5baf2c10665cf49b823e35a4be9c495c8e87066a8c8357a996ea1762b013a')
validpgpkeys=('14F26682D0916CDD81E37B6D61B7B526D98F0353' # Mozilla Software Releases
'BFA8008A8265677063B11BF47171986E4B745536') # Andreas Grapentin
@@ -126,11 +128,28 @@ ac_add_options --disable-eme
END
if [[ $CARCH = arm* ]]; then
+ msg "disabling LTO for armv7h build (phase 1/2)"
+ cat >> .mozconfig <<END
+ac_add_options --disable-lto
+export CC=gcc
+export CXX=g++
+export AR=gcc-ar
+export NM=gcc-nm
+export RANLIB=gcc-ranlib
+END
sed -i '/--enable-linker=gold/d' .mozconfig
+ sed -i '/--enable-rust-simd/d' .mozconfig
+ sed -i '/export MOZ_PGO/d' .mozconfig
+
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1463035
+ patch -Np1 -i "$srcdir"/mozilla-1463035.patch
+
cat >> .mozconfig <<END
ac_add_options --enable-optimize="-g -O2 -fno-schedule-insns"
+ac_add_options --disable-webrtc
+ac_add_options --disable-av1
END
- fi # end [[ $CARCH = arm* ]]
+ fi
if [[ $CARCH = i686 ]]; then
msg "disabling LTO for i686 build (phase 1/2)"
@@ -199,6 +218,12 @@ build() {
export MOZ_NOSPAM=1
export MOZBUILD_STATE_PATH="$srcdir/mozbuild"
+ if [[ $CARCH = armv7h ]]; then
+ msg "disabling LTO for armv7h build (phase 2/2)"
+ export RUSTFLAGS+=" -Cdebuginfo=0 -Clto=off"
+ export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
+ fi
+
if [[ $CARCH = i686 ]]; then
msg "disabling LTO for i686 build (phase 2/2)"
export RUSTFLAGS+=" -Cdebuginfo=0 -Clto=off"
diff --git a/libre/iceweasel/mozilla-1463035.patch b/libre/iceweasel/mozilla-1463035.patch
new file mode 100644
index 000000000..2e711b17e
--- /dev/null
+++ b/libre/iceweasel/mozilla-1463035.patch
@@ -0,0 +1,90 @@
+
+# HG changeset patch
+# User Mike Hommey <mh+mozilla@glandium.org>
+# Date 1526871862 -32400
+# Node ID 98e368b5c4beb0a183b1260236f47e0c5937d9a8
+# Parent 649acbb993c3e469380692e22f276e23707606de
+Bug 1463035 - Remove MOZ_SIGNAL_TRAMPOLINE. r=jchen
+
+For some reason, GNU as is not happy with the assembly generated after
+bug 1238661 anymore on Debian armel.
+
+OTOH, as mentioned in bug 1238661 comment 4, we actually don't need this
+workaround anymore, so let's just kill it.
+
+diff -rupN firefox-65.0.1/mfbt/LinuxSignal.h firefox-65.0.1.new/mfbt/LinuxSignal.h
+--- firefox-65.0.1/mfbt/LinuxSignal.h 2019-02-12 02:56:57.000000000 +0100
++++ firefox-65.0.1.new/mfbt/LinuxSignal.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,38 +0,0 @@
+-/* 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/. */
+-
+-#ifndef mozilla_LinuxSignal_h
+-#define mozilla_LinuxSignal_h
+-
+-namespace mozilla {
+-
+-#if defined(__arm__)
+-
+-// Some (old) Linux kernels on ARM have a bug where a signal handler
+-// can be called without clearing the IT bits in CPSR first. The result
+-// is that the first few instructions of the handler could be skipped,
+-// ultimately resulting in crashes. To workaround this bug, the handler
+-// on ARM is a trampoline that starts with enough NOP instructions, so
+-// that even if the IT bits are not cleared, only the NOP instructions
+-// will be skipped over.
+-
+-template <void (*H)(int, siginfo_t*, void*)>
+-__attribute__((naked)) void SignalTrampoline(int aSignal, siginfo_t* aInfo,
+- void* aContext) {
+- asm volatile("nop; nop; nop; nop" : : : "memory");
+-
+- asm volatile("b %0" : : "X"(H) : "memory");
+-}
+-
+-#define MOZ_SIGNAL_TRAMPOLINE(h) (mozilla::SignalTrampoline<h>)
+-
+-#else // __arm__
+-
+-#define MOZ_SIGNAL_TRAMPOLINE(h) (h)
+-
+-#endif // __arm__
+-
+-} // namespace mozilla
+-
+-#endif // mozilla_LinuxSignal_h
+diff -rupN firefox-65.0.1/mfbt/moz.build firefox-65.0.1.new/mfbt/moz.build
+--- firefox-65.0.1/mfbt/moz.build 2019-02-12 02:56:57.000000000 +0100
++++ firefox-65.0.1.new/mfbt/moz.build 2019-02-27 07:45:26.769777002 +0100
+@@ -129,10 +129,6 @@ if CONFIG['OS_ARCH'] == 'WINNT':
+ EXPORTS.mozilla += [
+ 'WindowsVersion.h',
+ ]
+-elif CONFIG['OS_ARCH'] == 'Linux':
+- EXPORTS.mozilla += [
+- 'LinuxSignal.h',
+- ]
+
+ UNIFIED_SOURCES += [
+ 'Assertions.cpp',
+diff -rupN firefox-65.0.1/tools/profiler/core/platform-linux-android.cpp firefox-65.0.1.new/tools/profiler/core/platform-linux-android.cpp
+--- firefox-65.0.1/tools/profiler/core/platform-linux-android.cpp 2019-02-12 02:57:01.000000000 +0100
++++ firefox-65.0.1.new/tools/profiler/core/platform-linux-android.cpp 2019-02-27 07:48:30.537878312 +0100
+@@ -60,7 +60,6 @@
+ #include <stdarg.h>
+
+ #include "prenv.h"
+-#include "mozilla/LinuxSignal.h"
+ #include "mozilla/PodOperations.h"
+ #include "mozilla/DebugOnly.h"
+
+@@ -253,7 +252,7 @@ Sampler::Sampler(PSLockRef aLock)
+
+ // Request profiling signals.
+ struct sigaction sa;
+- sa.sa_sigaction = MOZ_SIGNAL_TRAMPOLINE(SigprofHandler);
++ sa.sa_sigaction = SigprofHandler;
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = SA_RESTART | SA_SIGINFO;
+ if (sigaction(SIGPROF, &sa, &mOldSigprofHandler) != 0) {