Accepting request 1115612 from mozilla:Factory

OBS-URL: https://build.opensuse.org/request/show/1115612
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/seamonkey?expand=0&rev=26
This commit is contained in:
Ana Guerrero 2023-10-05 18:03:50 +00:00 committed by Git OBS Bridge
commit 0475060287
4 changed files with 215 additions and 1 deletions

33
mozilla-bmo531915.patch Normal file
View File

@ -0,0 +1,33 @@
# HG changeset patch
# User Wolfgang Rosenauer <wr@rosenauer.org>
# Parent fa8a5832a374ccd7af5db927b992b5d9f15273ef
diff --git a/modules/fdlibm/src/math_private.h b/modules/fdlibm/src/math_private.h
--- a/modules/fdlibm/src/math_private.h
+++ b/modules/fdlibm/src/math_private.h
@@ -25,19 +25,24 @@
#include "fdlibm.h"
/*
* Emulate FreeBSD internal double types.
* Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
*/
+#ifdef __i386__
+typedef long double __double_t;
+typedef long double __float_t;
+#else
typedef double __double_t;
+typedef float __float_t;
+#endif
typedef __double_t double_t;
-typedef float __float_t;
/*
* The original fdlibm code used statements like:
* n0 = ((*(int*)&one)>>29)^1; * index of high word *
* ix0 = *(n0+(int*)&x); * high word of x *
* ix1 = *((1-n0)+(int*)&x); * low word of x *
* to dig two 32 bit words out of the 64 bit IEEE floating point
* value. That is non-ANSI, and, moreover, the gcc instruction

166
seamonkey-binutils.patch Normal file
View File

@ -0,0 +1,166 @@
diff --git a/media/ffvpx/1846703.patch b/media/ffvpx/1846703.patch
new file mode 100644
--- /dev/null
+++ b/media/ffvpx/1846703.patch
@@ -0,0 +1,76 @@
+From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001
+From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
+Date: Sun, 16 Jul 2023 18:18:02 +0300
+Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift
+ instructions within inline assembly
+
+Fixes assembling with binutil as >= 2.41
+
+Signed-off-by: James Almer <jamrial@gmail.com>
+---
+ libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++---
+ 1 file changed, 23 insertions(+), 3 deletions(-)
+
+diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
+index 6298f5ed19..ca7e2dffc1 100644
+--- a/libavcodec/x86/mathops.h
++++ b/libavcodec/x86/mathops.h
+@@ -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 @@ __asm__ volatile(\
+ // 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;
+ }
+
+--
+2.30.2
+
diff -ruN seamonkey-2.53.17.1.orig/media/ffvpx/README_MOZILLA seamonkey-2.53.17.1/media/ffvpx/README_MOZILLA
--- seamonkey-2.53.17.1.orig/media/ffvpx/README_MOZILLA 2021-05-25 20:33:38.000000000 +0200
+++ seamonkey-2.53.17.1/media/ffvpx/README_MOZILLA 2023-10-04 10:18:51.211608861 +0200
@@ -1,6 +1,13 @@
This directory contains files used in gecko builds from FFmpeg
(http://ffmpeg.org). The current files are from FFmpeg as of
revision n4.0.2-6-g2be51cbeea
+
+This copy has a single patch backported from a later revision to fix the build with recent binutils:
+
+http://git.videolan.org/?p=ffmpeg.git;a=patch;h=effadce6c756247ea8bae32dc13bb3e6f464f0eb
+that is available as `1846703.patch` in this directory. As usual this has other
+changes that don't come from upstream, in `changes.patch`
+
All source files match their path from the library's source archive.
Currently, we only use the vp8 and vp9 portion of the library, and only on x86
diff --git a/media/ffvpx/libavcodec/x86/mathops.h b/media/ffvpx/libavcodec/x86/mathops.h
--- a/media/ffvpx/libavcodec/x86/mathops.h
+++ b/media/ffvpx/libavcodec/x86/mathops.h
@@ -33,16 +33,24 @@
#define MULL MULL
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;
}
#define MULH MULH
static av_always_inline av_const int MULH(int a, int b)
@@ -111,23 +119,35 @@
: "+a"(level), "=&d"(mask))
// 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;
}
#endif /* HAVE_INLINE_ASM */
#endif /* AVCODEC_X86_MATHOPS_H */

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed Oct 04 08:21:55 UTC 2023 - Tristan Miller <psychonaut@nothingisreal.com>
- add seamonkey-binutils.patch to allow building with binutils >= 2.41:
https://bugzilla.mozilla.org/show_bug.cgi?id=1856238
https://bugzilla.mozilla.org/show_bug.cgi?id=1846703
- add mozilla-bmo531915.patch to fix builds for x86:
https://bugzilla.mozilla.org/show_bug.cgi?id=531915
- request inclusion in Leap 15.4 and 15.5:
https://bugzilla.opensuse.org/show_bug.cgi?id=1215944
-------------------------------------------------------------------
Thu Sep 28 20:29:03 UTC 2023 - Bernhard Wiedemann <bwiedemann@suse.com>
@ -21,7 +32,7 @@ Thu Sep 21 15:58:45 UTC 2023 - Tristan Miller <psychonaut@nothingisreal.com>
subsequent 2.53.x beta and release versions as fast as we are able
to.
- request inclusion in Leap 15.4 and 15.5:
https://bugzilla.opensuse.org/show_bug.cgi?id=
https://bugzilla.opensuse.org/show_bug.cgi?id=1215585
-------------------------------------------------------------------
Fri Aug 04 13:04:12 UTC 2023 - Tristan Miller <psychonaut@nothingisreal.com>

View File

@ -89,10 +89,12 @@ Source7: seamonkey-rpmlintrc
Source11: seamonkey-appdata.tar.bz2
Source12: seamonkey-GNUmakefile
Patch1: mozilla-nongnome-proxies.patch
Patch2: seamonkey-binutils.patch
Patch3: mozilla-ntlm-full-path.patch
Patch4: seamonkey-lto.patch
Patch5: seamonkey-man-page.patch
Patch6: reproducible.patch
Patch7: mozilla-bmo531915.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: /bin/sh coreutils
Provides: seamonkey-mail = %{version}
@ -221,10 +223,12 @@ cd mozilla
cp %{SOURCE12} GNUmakefile
%patch1 -p1
%patch2 -p1
%patch3 -p2
%patch4 -p1
%patch5 -p0
%patch6 -p1
%patch7 -p1
cat << EOF > .mozconfig
mk_add_options MOZILLA_OFFICIAL=1