From e7f9cb11b3ebef807c7fe3945d9abf12aa5a5379 Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Thu, 24 Jun 2004 11:16:09 +0000 Subject: [PATCH] Stefan Fiedler: patch ffmpeg to compile with gcc 3.4 [2004061616502315293] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@3366 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/rene/ffmpeg/gcc34.patch | 81 +++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 package/rene/ffmpeg/gcc34.patch diff --git a/package/rene/ffmpeg/gcc34.patch b/package/rene/ffmpeg/gcc34.patch new file mode 100644 index 000000000..181428166 --- /dev/null +++ b/package/rene/ffmpeg/gcc34.patch @@ -0,0 +1,81 @@ +add the attribute used to some variables, so gcc 3.4 does not remove them; +gcc 3.2.3 ignores the attribute. + +diff -dur ffmpeg-0.4.8/libavcodec/i386/dsputil_mmx.c ffmpeg-0.4.8-patch/libavcodec/i386/dsputil_mmx.c +--- ffmpeg-0.4.8/libavcodec/i386/dsputil_mmx.c 2003-09-28 17:26:40.000000000 +0200 ++++ ffmpeg-0.4.8-patch/libavcodec/i386/dsputil_mmx.c 2004-06-14 17:17:20.000000000 +0200 +@@ -29,8 +29,8 @@ + static const uint64_t mm_wone __attribute__ ((aligned(8))) = 0x0001000100010001ULL; + static const uint64_t mm_wtwo __attribute__ ((aligned(8))) = 0x0002000200020002ULL; + +-static const uint64_t ff_pw_20 __attribute__ ((aligned(8))) = 0x0014001400140014ULL; +-static const uint64_t ff_pw_3 __attribute__ ((aligned(8))) = 0x0003000300030003ULL; ++static const uint64_t ff_pw_20 __attribute__ ((used)) __attribute__ ((aligned(8))) = 0x0014001400140014ULL; ++static const uint64_t ff_pw_3 __attribute__ ((used)) __attribute__ ((aligned(8))) = 0x0003000300030003ULL; + static const uint64_t ff_pw_16 __attribute__ ((aligned(8))) = 0x0010001000100010ULL; + static const uint64_t ff_pw_15 __attribute__ ((aligned(8))) = 0x000F000F000F000FULL; + +Nur in ffmpeg-0.4.8-patch/libavcodec/i386: dsputil_mmx.c~. +diff -dur ffmpeg-0.4.8/libavcodec/i386/motion_est_mmx.c ffmpeg-0.4.8-patch/libavcodec/i386/motion_est_mmx.c +--- ffmpeg-0.4.8/libavcodec/i386/motion_est_mmx.c 2003-09-28 17:26:40.000000000 +0200 ++++ ffmpeg-0.4.8-patch/libavcodec/i386/motion_est_mmx.c 2004-06-14 17:13:55.000000000 +0200 +@@ -26,7 +26,7 @@ + 0x0002000200020002, + }; + +-static __attribute__ ((aligned(8), unused)) uint64_t bone= 0x0101010101010101LL; ++static __attribute__ ((used)) __attribute__ ((aligned(8), unused)) uint64_t bone= 0x0101010101010101LL; + + static inline void sad8_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h) + { +Nur in ffmpeg-0.4.8-patch/libavcodec/i386: motion_est_mmx.c~. +diff -dur ffmpeg-0.4.8/libavcodec/i386/simple_idct_mmx.c ffmpeg-0.4.8-patch/libavcodec/i386/simple_idct_mmx.c +--- ffmpeg-0.4.8/libavcodec/i386/simple_idct_mmx.c 2003-09-28 17:26:40.000000000 +0200 ++++ ffmpeg-0.4.8-patch/libavcodec/i386/simple_idct_mmx.c 2004-06-14 17:17:47.000000000 +0200 +@@ -45,8 +45,8 @@ + #define ROW_SHIFT 11 + #define COL_SHIFT 20 // 6 + +-static const uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000ULL; +-static const uint64_t __attribute__((aligned(8))) d40000= 0x0000000000040000ULL; ++static const uint64_t __attribute__ ((used)) __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000ULL; ++static const uint64_t __attribute__ ((used)) __attribute__((aligned(8))) d40000= 0x0000000000040000ULL; + + static const int16_t __attribute__((aligned(8))) coeffs[]= { + 1<<(ROW_SHIFT-1), 0, 1<<(ROW_SHIFT-1), 0, +Nur in ffmpeg-0.4.8-patch/libavcodec/i386: simple_idct_mmx.c~. +diff -dur ffmpeg-0.4.8/libavcodec/liba52/resample_mmx.c ffmpeg-0.4.8-patch/libavcodec/liba52/resample_mmx.c +--- ffmpeg-0.4.8/libavcodec/liba52/resample_mmx.c 2003-09-28 17:26:40.000000000 +0200 ++++ ffmpeg-0.4.8-patch/libavcodec/liba52/resample_mmx.c 2004-06-14 16:53:43.000000000 +0200 +@@ -7,10 +7,11 @@ + and it would mean (C / MMX2 / MMX / 3DNOW) versions + */ + +-static uint64_t __attribute__((aligned(8))) magicF2W= 0x43c0000043c00000LL; +-static uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000LL; +-static uint64_t __attribute__((aligned(8))) wm0101= 0x0000FFFF0000FFFFLL; +-static uint64_t __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL; ++static uint64_t __attribute__((used)) __attribute__((aligned(8))) magicF2W= 0x43c0000043c00000LL; ++static uint64_t __attribute__((used)) __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000LL; ++static uint64_t __attribute__((used)) __attribute__((aligned(8))) wm0101= 0x0000FFFF0000FFFFLL; ++static uint64_t __attribute__((used)) __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL; ++ + + static int a52_resample_MONO_to_5_MMX(float * _f, int16_t * s16){ + int32_t * f = (int32_t *) _f; +Nur in ffmpeg-0.4.8-patch/libavcodec/liba52: resample_mmx.c~. +diff -dur ffmpeg-0.4.8/libavcodec/libpostproc/postprocess.c ffmpeg-0.4.8-patch/libavcodec/libpostproc/postprocess.c +--- ffmpeg-0.4.8/libavcodec/libpostproc/postprocess.c 2003-09-28 17:26:40.000000000 +0200 ++++ ffmpeg-0.4.8-patch/libavcodec/libpostproc/postprocess.c 2004-06-14 17:15:07.000000000 +0200 +@@ -104,8 +104,8 @@ + //#define NUM_BLOCKS_AT_ONCE 16 //not used yet + + #ifdef ARCH_X86 +-static uint64_t __attribute__((aligned(8))) w05= 0x0005000500050005LL; +-static uint64_t __attribute__((aligned(8))) w20= 0x0020002000200020LL; ++static uint64_t __attribute__ ((used)) __attribute__((aligned(8))) w05= 0x0005000500050005LL; ++static uint64_t __attribute__ ((used)) __attribute__((aligned(8))) w20= 0x0020002000200020LL; + static uint64_t __attribute__((aligned(8))) b00= 0x0000000000000000LL; + static uint64_t __attribute__((aligned(8))) b01= 0x0101010101010101LL; + static uint64_t __attribute__((aligned(8))) b02= 0x0202020202020202LL; +Nur in ffmpeg-0.4.8-patch/libavcodec/libpostproc: postprocess.c~.