mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
ffmpeg: fixed GCC 13 build issue (#9767)
* ffmpeg: fixed GCC 13 build issue
This commit is contained in:
@@ -6,7 +6,7 @@ HOMEPAGE="https://ffmpeg.org/"
|
||||
COPYRIGHT="2000-2003 Fabrice Bellard
|
||||
2003-2023 the FFmpeg developers"
|
||||
LICENSE="GNU LGPL v3"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://ffmpeg.org/releases/ffmpeg-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="4974d62e7507ba3b26fa5f30af8ee36825917ddb4a1ad4118277698c1c8818cf"
|
||||
PATCHES="ffmpeg-$portVersion.patchset"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From cdd8f7ab211aef03e0aea6f9ee4bcb36ad3100c2 Mon Sep 17 00:00:00 2001
|
||||
From 396a7f950a2cac0fb7752bd2b0d7be702f1996ac Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 7 Aug 2019 16:21:12 +0300
|
||||
Subject: disable ebx on x86.
|
||||
@@ -17,10 +17,10 @@ index 5ee289f..1a6dedb 100755
|
||||
*-dos|freedos|opendos)
|
||||
if test_cpp_condition sys/version.h "defined(__DJGPP__) && __DJGPP__ == 2 && __DJGPP_MINOR__ == 5"; then
|
||||
--
|
||||
2.37.3
|
||||
2.42.0
|
||||
|
||||
|
||||
From 46e77d96555e44c8404c344ca4585dab6e5e445b Mon Sep 17 00:00:00 2001
|
||||
From 0b3c0c11bbffe70c2479b1101780e92eced62c63 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Wed, 7 Aug 2019 16:21:32 +0300
|
||||
Subject: Re-enable memalign for Haiku
|
||||
@@ -45,5 +45,77 @@ index 1a6dedb..c9d5f43 100755
|
||||
;;
|
||||
*-dos|freedos|opendos)
|
||||
--
|
||||
2.37.3
|
||||
2.42.0
|
||||
|
||||
|
||||
From 4f88c3d7ae7e326af1544ff54b219588a26edd5a Mon Sep 17 00:00:00 2001
|
||||
From: Remi Denis-Courmont <remi@remlab.net>
|
||||
Date: Sun, 16 Jul 2023 07:18:02 +0000
|
||||
Subject: Fixes assembling with binutils as >= 2.41
|
||||
|
||||
|
||||
diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
|
||||
index 6298f5e..fb822e9 100644
|
||||
--- a/libavcodec/x86/mathops.h
|
||||
+++ b/libavcodec/x86/mathops.h
|
||||
@@ -35,12 +35,19 @@
|
||||
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), "ic"((uint8_t)shift)
|
||||
return rt;
|
||||
}
|
||||
|
||||
@@ -113,20 +120,33 @@ __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)
|
||||
);
|
||||
- return a;
|
||||
+ else
|
||||
+ __asm__ ("shrl %1, %0\n\t"
|
||||
+ : "+r" (a)
|
||||
+ : "c" ((uint8_t)(-s))
|
||||
+ );
|
||||
+ return a;
|
||||
}
|
||||
|
||||
#endif /* HAVE_INLINE_ASM */
|
||||
--
|
||||
2.42.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user