From 36a0b79552ac8b46af7fec55254b22391f5cbdfe Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Fri, 4 Nov 2005 17:34:23 +0000 Subject: [PATCH] Stefan Fiedler: libsdl_gfx: patch for gcc40 Index: package/kasc/libsdl_gfx/gcc40.patch =================================================================== [2005102619070624275] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@6588 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/kasc/libsdl_gfx/gcc40.patch | 251 ++++++++++++++++++++++++++++ 1 file changed, 251 insertions(+) create mode 100644 package/kasc/libsdl_gfx/gcc40.patch diff --git a/package/kasc/libsdl_gfx/gcc40.patch b/package/kasc/libsdl_gfx/gcc40.patch new file mode 100644 index 000000000..0ff991c6a --- /dev/null +++ b/package/kasc/libsdl_gfx/gcc40.patch @@ -0,0 +1,251 @@ +this fixes double use of asm labels: + +{standard input}: Assembler messages: +{standard input}:4361: Error: symbol `.L1010' is already defined + +diff -dur SDL_gfx-2.0.13/SDL_imageFilter.c src.libsdl_gfx.1130183692.7713.3446622608/SDL_gfx-2.0.13/SDL_imageFilter.c +--- SDL_gfx-2.0.13/SDL_imageFilter.c 2004-11-29 20:53:35.000000000 +0100 ++++ src.libsdl_gfx.1130183692.7713.3446622608/SDL_gfx-2.0.13/SDL_imageFilter.c 2005-10-25 00:21:23.000000000 +0200 +@@ -71,7 +71,7 @@ + // ------------------------------------------------------------------------------------ + + // SDL_imageFilterAdd: D = saturation255(S1 + S2) +-int SDL_imageFilterAddMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) ++static int SDL_imageFilterAddMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) + { + #ifdef USE_MMX + asm volatile +@@ -145,7 +145,7 @@ + } + + // SDL_imageFilterMean: D = S1/2 + S2/2 +-int SDL_imageFilterMeanMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length, ++static int SDL_imageFilterMeanMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length, + unsigned char *Mask) + { + #ifdef USE_MMX +@@ -231,7 +234,7 @@ + } + + // SDL_imageFilterSub: D = saturation0(S1 - S2) +-int SDL_imageFilterSubMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) ++static int SDL_imageFilterSubMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) + { + #ifdef USE_MMX + asm volatile +@@ -303,7 +306,7 @@ + } + + // SDL_imageFilterAbsDiff: D = | S1 - S2 | +-int SDL_imageFilterAbsDiffMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) ++static int SDL_imageFilterAbsDiffMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) + { + #ifdef USE_MMX + asm volatile +@@ -377,7 +380,7 @@ + } + + // SDL_imageFilterMult: D = saturation255(S1 * S2) +-int SDL_imageFilterMultMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) ++static int SDL_imageFilterMultMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) + { + #ifdef USE_MMX + asm volatile +@@ -472,7 +475,7 @@ + } + + // SDL_imageFilterMultNor: D = S1 * S2 (non-MMX) +-int SDL_imageFilterMultNorASM(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) ++static int SDL_imageFilterMultNorASM(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) + { + #ifdef USE_MMX + asm volatile +@@ -538,7 +541,7 @@ + } + + // SDL_imageFilterMultDivby2: D = saturation255(S1/2 * S2) +-int SDL_imageFilterMultDivby2MMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) ++static int SDL_imageFilterMultDivby2MMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) + { + #ifdef USE_MMX + asm volatile +@@ -623,7 +626,7 @@ + } + + // SDL_imageFilterMultDivby4: D = saturation255(S1/2 * S2/2) +-int SDL_imageFilterMultDivby4MMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) ++static int SDL_imageFilterMultDivby4MMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) + { + #ifdef USE_MMX + asm volatile +@@ -710,7 +713,7 @@ + } + + // SDL_imageFilterBitAnd: D = S1 & S2 +-int SDL_imageFilterBitAndMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) ++static int SDL_imageFilterBitAndMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) + { + #ifdef USE_MMX + asm volatile +@@ -782,7 +785,7 @@ + } + + // SDL_imageFilterBitOr: D = S1 | S2 +-int SDL_imageFilterBitOrMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) ++static int SDL_imageFilterBitOrMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) + { + #ifdef USE_MMX + asm volatile +@@ -851,7 +854,7 @@ + } + + // SDL_imageFilterDiv: D = S1 / S2 (non-MMX) +-int SDL_imageFilterDivASM(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) ++static int SDL_imageFilterDivASM(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, int length) + { + #ifdef USE_MMX + asm volatile +@@ -897,7 +900,7 @@ + // ------------------------------------------------------------------------------------ + + // SDL_imageFilterBitNegation: D = !S +-int SDL_imageFilterBitNegationMMX(unsigned char *Src1, unsigned char *Dest, int length) ++static int SDL_imageFilterBitNegationMMX(unsigned char *Src1, unsigned char *Dest, int length) + { + #ifdef USE_MMX + asm volatile +@@ -961,7 +964,7 @@ + } + + // SDL_imageFilterAddByteMMX: D = saturation255(S + C) +-int SDL_imageFilterAddByteMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char C) ++static int SDL_imageFilterAddByteMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char C) + { + #ifdef USE_MMX + asm volatile +@@ -1043,7 +1046,7 @@ + } + + // SDL_imageFilterAddUintMMX: D = saturation255((S + (uint)C), Cs=swap_32(C) +-int SDL_imageFilterAddUintMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned int C, unsigned int Cs) ++static int SDL_imageFilterAddUintMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned int C, unsigned int Cs) + { + #ifdef USE_MMX + asm volatile +@@ -1132,7 +1135,7 @@ + + + // SDL_imageFilterAddByteToHalfMMX: D = saturation255(S/2 + C) +-int SDL_imageFilterAddByteToHalfMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char C, ++static int SDL_imageFilterAddByteToHalfMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char C, + unsigned char *Mask) + { + #ifdef USE_MMX +@@ -1224,7 +1227,7 @@ + } + + // SDL_imageFilterSubByteMMX: D = saturation0(S - C) +-int SDL_imageFilterSubByteMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char C) ++static int SDL_imageFilterSubByteMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char C) + { + #ifdef USE_MMX + asm volatile +@@ -1306,7 +1309,7 @@ + } + + // SDL_imageFilterSubUintMMX: D = saturation0(S - (uint)C), Cs=swap_32(C) +-int SDL_imageFilterSubUintMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned int C, unsigned int Cs) ++static int SDL_imageFilterSubUintMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned int C, unsigned int Cs) + { + #ifdef USE_MMX + asm volatile +@@ -1394,7 +1397,7 @@ + + + // SDL_imageFilterShiftRightMMX: D = saturation0(S >> N) +-int SDL_imageFilterShiftRightMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char N, ++static int SDL_imageFilterShiftRightMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char N, + unsigned char *Mask) + { + #ifdef USE_MMX +@@ -1485,7 +1488,7 @@ + } + + // SDL_imageFilterShiftRightUintMMX: D = Saturation0(S >> N) +-int SDL_imageFilterShiftRightUintMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char N) ++static int SDL_imageFilterShiftRightUintMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char N) + { + #ifdef USE_MMX + asm volatile +@@ -1561,7 +1564,7 @@ + } + + // SDL_imageFilterMultByByteMMX: D = saturation255(S * C) +-int SDL_imageFilterMultByByteMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char C) ++static int SDL_imageFilterMultByByteMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char C) + { + #ifdef USE_MMX + asm volatile +@@ -1672,7 +1675,7 @@ + } + + // SDL_imageFilterShiftRightAndMultByByteMMX: D = saturation255((S >> N) * C) +-int SDL_imageFilterShiftRightAndMultByByteMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char N, ++static int SDL_imageFilterShiftRightAndMultByByteMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char N, + unsigned char C) + { + #ifdef USE_MMX +@@ -1773,7 +1776,7 @@ + } + + // SDL_imageFilterShiftLeftByteMMX: D = (S << N) +-int SDL_imageFilterShiftLeftByteMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char N, ++static int SDL_imageFilterShiftLeftByteMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char N, + unsigned char *Mask) + { + #ifdef USE_MMX +@@ -1860,7 +1863,7 @@ + } + + // SDL_imageFilterShiftLeftUintMMX: D = (S << N) +-int SDL_imageFilterShiftLeftUintMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char N) ++static int SDL_imageFilterShiftLeftUintMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char N) + { + #ifdef USE_MMX + asm volatile +@@ -1936,7 +1939,7 @@ + } + + // SDL_imageFilterShiftLeftMMX: D = saturation255(S << N) +-int SDL_imageFilterShiftLeftMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char N) ++static int SDL_imageFilterShiftLeftMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char N) + { + #ifdef USE_MMX + asm volatile +@@ -2041,7 +2044,7 @@ + } + + // SDL_imageFilterBinarizeUsingThresholdMMX: D = (S >= T) ? 255:0 +-int SDL_imageFilterBinarizeUsingThresholdMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char T) ++static int SDL_imageFilterBinarizeUsingThresholdMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char T) + { + #ifdef USE_MMX + asm volatile +@@ -2122,7 +2125,7 @@ + } + + // SDL_imageFilterClipToRangeMMX: D = (S >= Tmin) & (S <= Tmax) S:Tmin | Tmax +-int SDL_imageFilterClipToRangeMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char Tmin, ++static int SDL_imageFilterClipToRangeMMX(unsigned char *Src1, unsigned char *Dest, int length, unsigned char Tmin, + unsigned char Tmax) + { + #ifdef USE_MMX +@@ -2222,7 +2225,7 @@ + } + + // SDL_imageFilterNormalizeLinearMMX: D = saturation255((Nmax - Nmin)/(Cmax - Cmin)*(S - Cmin) + Nmin) +-int SDL_imageFilterNormalizeLinearMMX(unsigned char *Src1, unsigned char *Dest, int length, int Cmin, int Cmax, ++static int SDL_imageFilterNormalizeLinearMMX(unsigned char *Src1, unsigned char *Dest, int length, int Cmin, int Cmax, + int Nmin, int Nmax) + { + #ifdef USE_MMX