summaryrefslogtreecommitdiff
path: root/user/thunderbird
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/thunderbird
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/thunderbird')
-rw-r--r--user/thunderbird/APKBUILD2
-rw-r--r--user/thunderbird/BTS-1074.patch62
2 files changed, 64 insertions, 0 deletions
diff --git a/user/thunderbird/APKBUILD b/user/thunderbird/APKBUILD
index 7b970d145..78ee2c13e 100644
--- a/user/thunderbird/APKBUILD
+++ b/user/thunderbird/APKBUILD
@@ -27,6 +27,7 @@ source="https://archive.mozilla.org/pub/thunderbird/releases/$pkgver/source/thun
mozconfig
bad-google-code.patch
+ BTS-1074.patch
fix-mutex-build.patch
fix-seccomp-bpf.patch
gcc89074.patch
@@ -150,6 +151,7 @@ package() {
sha512sums="e73d3db4333ad659ec1ab249bd261e8c28301c125d0c39b473c83f8fccace6d4916a2bfef14fc20c065055ff6bbd3ca618b5aab178241b53509543640dcd541a thunderbird-91.13.0.source.tar.xz
afc87cdd19500f8b6b0bedabe98339cca9e6af86edb45e673c6ee0a49bdb3a48b1816f6f5f8790cab86cca428ab7f142cbeb6462079fe293f5f13563a7761896 mozconfig
ace7492f4fb0523c7340fdc09c831906f74fddad93822aff367135538dacd3f56288b907f5a04f53f94c76e722ba0bab73e28d83ec12d3e672554712e6b08613 bad-google-code.patch
+df76bae9deaaae98afa9e1e853de5d41a4f84db65057bfe70de3ae172515bdef58a5f9ee0b2303493dc67e9a6aad54af4c9931166de1144737a5867f24b51a4f BTS-1074.patch
c0b2bf43206c2a5154e560ef30189a1062ae856861b39f52ce69002390ff9972d43e387bfd2bf8d2ab3cac621987bc042c8c0a8b4cf90ae05717ca7705271880 fix-mutex-build.patch
70863b985427b9653ce5e28d6064f078fb6d4ccf43dd1b68e72f97f44868fc0ce063161c39a4e77a0a1a207b7365d5dc7a7ca5e68c726825eba814f2b93e2f5d fix-seccomp-bpf.patch
6eb7fb134760f5d232710c56f18f14de4f533e41e269531edd01f5650f6d641513e34a8d2294af5ad6fd184736f674c734efb4cc003636a75e14a8fdba2fe3b0 gcc89074.patch
diff --git a/user/thunderbird/BTS-1074.patch b/user/thunderbird/BTS-1074.patch
new file mode 100644
index 000000000..ac851038d
--- /dev/null
+++ b/user/thunderbird/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 Thunderbird to not use them.
+
+--- thunderbird-91.13.0/media/ffvpx/libavcodec/x86/mathops.h.old 2023-10-03 22:15:24.440738743 -0500
++++ thunderbird-91.13.0/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;
+ }
+