summaryrefslogtreecommitdiff
path: root/user/firefox-esr
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2023-10-03 22:22:35 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2023-10-03 22:22:35 -0500
commit8b1357c1f79c1e1d4b59bb4ff81d600a38350c5b (patch)
tree3cb77b3ae3cbf5b3f892b5ee103929824f68316d /user/firefox-esr
parentecb6205697ebc6959489ba77d3fe5c0b0d3e2a5a (diff)
downloadpackages-8b1357c1f79c1e1d4b59bb4ff81d600a38350c5b.tar.gz
packages-8b1357c1f79c1e1d4b59bb4ff81d600a38350c5b.tar.bz2
packages-8b1357c1f79c1e1d4b59bb4ff81d600a38350c5b.tar.xz
packages-8b1357c1f79c1e1d4b59bb4ff81d600a38350c5b.zip
user/{firefox-esr,thunderbird}: Fix x86 asm in avc
Required for binutils-2.41 upgrade. See patch for details. Fixes: #1074
Diffstat (limited to 'user/firefox-esr')
-rw-r--r--user/firefox-esr/APKBUILD4
-rw-r--r--user/firefox-esr/BTS-1074.patch62
2 files changed, 65 insertions, 1 deletions
diff --git a/user/firefox-esr/APKBUILD b/user/firefox-esr/APKBUILD
index 4ab23307c..c4b881eaf 100644
--- a/user/firefox-esr/APKBUILD
+++ b/user/firefox-esr/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=firefox-esr
pkgver=91.13.0
-pkgrel=2
+pkgrel=3
pkgdesc="Firefox web browser (extended support release)"
url="https://www.mozilla.org/firefox/"
arch="all !ppc !armv7" # #837, #1015
@@ -32,6 +32,7 @@ source="https://ftp.mozilla.org/pub/firefox/releases/$_ffxver/source/firefox-$_f
mozconfig
bad-google-code.patch
+ BTS-1074.patch
fix-mutex-build.patch
fix-seccomp-bpf.patch
gcc89074.patch
@@ -153,6 +154,7 @@ package() {
sha512sums="38b4cc52de21e76d6061e6ba175e1cbfd888a16070aa951f5a44283f2db9d7e94f2504621f0da78feac6e71491a6d0e7038f63dd0ae112dcad700eb02e9aa516 firefox-91.13.0esr.source.tar.xz
86168a5e5b8aa3ea7cc0d40174baa97595c82b8e599937155fbd7761e7df7220980c74f75e96c34e5f660423e42ad67761f57b2923389be363253868bac033a9 mozconfig
ace7492f4fb0523c7340fdc09c831906f74fddad93822aff367135538dacd3f56288b907f5a04f53f94c76e722ba0bab73e28d83ec12d3e672554712e6b08613 bad-google-code.patch
+57410e4b9199f3c7db1cd4a0cf3e67cd962b585730c073edb1cadc3bcac5b0aec4e6f7efe24f3eadd1020aefef475e08e97f13dc6b6534e639f33cc6fb1abe04 BTS-1074.patch
c0b2bf43206c2a5154e560ef30189a1062ae856861b39f52ce69002390ff9972d43e387bfd2bf8d2ab3cac621987bc042c8c0a8b4cf90ae05717ca7705271880 fix-mutex-build.patch
70863b985427b9653ce5e28d6064f078fb6d4ccf43dd1b68e72f97f44868fc0ce063161c39a4e77a0a1a207b7365d5dc7a7ca5e68c726825eba814f2b93e2f5d fix-seccomp-bpf.patch
6eb7fb134760f5d232710c56f18f14de4f533e41e269531edd01f5650f6d641513e34a8d2294af5ad6fd184736f674c734efb4cc003636a75e14a8fdba2fe3b0 gcc89074.patch
diff --git a/user/firefox-esr/BTS-1074.patch b/user/firefox-esr/BTS-1074.patch
new file mode 100644
index 000000000..fdc5478b4
--- /dev/null
+++ b/user/firefox-esr/BTS-1074.patch
@@ -0,0 +1,62 @@
+gas(1) under binutils-2.41 no longer allows invalid negative shifts.
+
+This patch fixes the bundled FFmpeg in Firefox to not use them.
+
+--- a/media/ffvpx/libavcodec/x86/mathops.h.old 2023-10-03 22:15:24.440738743 -0500
++++ b/media/ffvpx/libavcodec/x86/mathops.h 2023-10-03 22:15:41.458911245 -0500
+@@ -35,12 +35,20 @@
+ static av_always_inline av_const int MULL(int a, int b, unsigned shift)
+ {
+ int rt, dummy;
++ if (__builtin_constant_p(shift))
+ __asm__ (
+ "imull %3 \n\t"
+ "shrdl %4, %%edx, %%eax \n\t"
+ :"=a"(rt), "=d"(dummy)
+- :"a"(a), "rm"(b), "ci"((uint8_t)shift)
++ :"a"(a), "rm"(b), "i"(shift & 0x1F)
+ );
++ else
++ __asm__ (
++ "imull %3 \n\t"
++ "shrdl %4, %%edx, %%eax \n\t"
++ :"=a"(rt), "=d"(dummy)
++ :"a"(a), "rm"(b), "c"((uint8_t)shift)
++ );
+ return rt;
+ }
+
+@@ -113,19 +121,31 @@
+ // avoid +32 for shift optimization (gcc should do that ...)
+ #define NEG_SSR32 NEG_SSR32
+ static inline int32_t NEG_SSR32( int32_t a, int8_t s){
++ if (__builtin_constant_p(s))
+ __asm__ ("sarl %1, %0\n\t"
+ : "+r" (a)
+- : "ic" ((uint8_t)(-s))
++ : "i" (-s & 0x1F)
+ );
++ else
++ __asm__ ("sarl %1, %0\n\t"
++ : "+r" (a)
++ : "c" ((uint8_t)(-s))
++ );
+ return a;
+ }
+
+ #define NEG_USR32 NEG_USR32
+ static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
++ if (__builtin_constant_p(s))
+ __asm__ ("shrl %1, %0\n\t"
+ : "+r" (a)
+- : "ic" ((uint8_t)(-s))
++ : "i" (-s & 0x1F)
+ );
++ else
++ __asm__ ("shrl %1, %0\n\t"
++ : "+r" (a)
++ : "c" ((uint8_t)(-s))
++ );
+ return a;
+ }
+