Skip to content

Commit

Permalink
[sailfishos][ogg] Restore thumb disabling fix. Fixes JB#51837
Browse files Browse the repository at this point in the history
Also backport a patch from esr68 that causes a build failure in non-Android ARM builds with thumb disabled.
  • Loading branch information
abranson committed Nov 9, 2020
1 parent 210580e commit 2c2b83f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
@@ -0,0 +1,28 @@
From ef1f805ffd5ea30a7d33684e01f3a5ef0bc1f9fa Mon, 9 Nov 2020 11:58:19 +0100
From: Mike Hommey <mh+mozilla@glandium.org>
Date: Mon, 9 Nov 2020 11:56:48 +0100
Subject: [PATCH] Bug 1434526 - Make MOZ_SIGNAL_TRAMPOLINE Android-only. r=gsvelto


Bug 1463035 exists to remove it entirely, because as mentioned in bug
1238661 comment 4, we don't actually need this workaround anymore. But
that bug has been blocked for a while because the Android emulator
images we use for testing, for some reason, use a kernel older than any
real device using the same version of Android would use.

Let's however fix the problems it causes with GCC on non-Android ARM
Linux by making it Android-only, rather than removing it entirely.

diff --git a/mfbt/LinuxSignal.h b/mfbt/LinuxSignal.h
index 112b6a1..7decd95 100644
--- a/mfbt/LinuxSignal.h
+++ b/mfbt/LinuxSignal.h
@@ -7,7 +7,7 @@

namespace mozilla {

-#if defined(__arm__)
+#if defined(__arm__) && defined(__ANDROID__)

// 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
6 changes: 5 additions & 1 deletion rpm/xulrunner-qt5.spec
Expand Up @@ -88,6 +88,7 @@ Patch42: 0042-sailfishos-gecko-Adjust-audio-control-dimensions.-Co.patch
Patch43: 0043-sailfishos-gecko-Prioritize-loading-of-extension-ver.patch
Patch44: 0044-sailfishos-gecko-Apply-UA-override-for-window.naviga.patch
Patch45: 0045-sailfishos-media-Ensure-audio-continues-when-screen-.patch
Patch46: 0046-sailfishos-backport--Make-MOZSIGNALTRAMPOLINE-Andro-.patch

BuildRequires: rust
BuildRequires: rust-std-static
Expand Down Expand Up @@ -198,7 +199,10 @@ source "%BUILD_DIR"/rpm-shared.env
# hack for when not using virtualenv
ln -sf "%BUILD_DIR"/config.status $PWD/build/config.status

printf "#\n# Added by xulrunner-qt.spec:\n#" >> "$MOZCONFIG"
%ifarch %arm
# Do not build as thumb since it breaks video decoding.
echo "ac_add_options --with-thumb=no" >> "$MOZCONFIG"
%endif

echo "mk_add_options MOZ_OBJDIR='%BUILD_DIR'" >> "$MOZCONFIG"
# XXX: gold crashes when building gecko for both i486 and x86_64
Expand Down

0 comments on commit 2c2b83f

Please sign in to comment.