fixed blindcoder/libsdl for gcc 3.3.3 and below git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@2396 c5f82cb5-29bc-0310-9cd0-bff59a50e3bcrocklinux
@ -0,0 +1,19 @@ |
|||||
|
--- SDL-1.2.6/configure 2003-08-30 21:13:23.000000000 +0200
|
||||
|
+++ SDL-1.2.6-rock/configure 2004-02-23 18:47:28.000000000 +0100
|
||||
|
@@ -3595,6 +3595,7 @@
|
||||
|
else |
||||
|
ARTSC_CFLAGS=`$ARTSCCONFIG --cflags` |
||||
|
ARTSC_LIBS=`$ARTSCCONFIG --libs` |
||||
|
+ ARTSC_PREFIX=`$ARTSCCONFIG --arts-prefix`
|
||||
|
echo $ac_n "checking for aRts development environment""... $ac_c" 1>&6 |
||||
|
echo "configure:3600: checking for aRts development environment" >&5 |
||||
|
audio_arts=no |
||||
|
@@ -3633,7 +3634,7 @@
|
||||
|
enable_arts_shared=yes |
||||
|
fi |
||||
|
|
||||
|
- arts_lib_spec=`echo $ARTSC_LIBS | sed 's/.*-L\([^ ]*\).*/\1\/libartsc.so.*/'`
|
||||
|
+ arts_lib_spec="$ARTSC_PREFIX/lib/libartsc.so.*"
|
||||
|
arts_lib=`ls $arts_lib_spec | head -1 | sed 's/.*\/\(.*\)/\1/'` |
||||
|
echo "-- $arts_lib_spec -> $arts_lib" |
||||
|
if test x$enable_dlopen != xyes && \ |
||||
@ -0,0 +1,74 @@ |
|||||
|
gcc 3.3 is a bit too smart here, It optimizes these variables away. However |
||||
|
movd to a mmx register only works from reg or mem. |
||||
|
-jsaw |
||||
|
|
||||
|
--- SDL-1.2.6/src/video/SDL_RLEaccel.c 2003-08-30 21:13:06.000000000 +0200
|
||||
|
+++ SDL-1.2.6-rock/src/video/SDL_RLEaccel.c 2004-02-23 18:11:50.000000000 +0100
|
||||
|
@@ -143,7 +143,7 @@
|
||||
|
do { \ |
||||
|
Uint32 *srcp = (Uint32 *)(from); \ |
||||
|
Uint32 *dstp = (Uint32 *)(to); \ |
||||
|
- int i = 0x00FF00FF; \
|
||||
|
+ volatile int i = 0x00FF00FF; \
|
||||
|
movd_m2r(*(&i), mm3); \ |
||||
|
punpckldq_r2r(mm3, mm3); \ |
||||
|
i = 0xFF000000; \ |
||||
|
@@ -213,10 +213,11 @@
|
||||
|
|
||||
|
#define ALPHA_BLIT16_565MMX(to, from, length, bpp, alpha) \ |
||||
|
do { \ |
||||
|
- int i, n = 0; \
|
||||
|
+ volatile int i; \
|
||||
|
+ int n = 0; \
|
||||
|
Uint16 *srcp = (Uint16 *)(from); \ |
||||
|
Uint16 *dstp = (Uint16 *)(to); \ |
||||
|
- Uint32 ALPHA = 0xF800; \
|
||||
|
+ volatile Uint32 ALPHA = 0xF800; \
|
||||
|
movd_m2r(*(&ALPHA), mm1); \ |
||||
|
punpcklwd_r2r(mm1, mm1); \ |
||||
|
punpcklwd_r2r(mm1, mm1); \ |
||||
|
@@ -229,7 +230,7 @@
|
||||
|
punpcklwd_r2r(mm7, mm7); \ |
||||
|
punpcklwd_r2r(mm7, mm7); \ |
||||
|
alpha &= ~(1+2+4); \ |
||||
|
- i = (Uint32)alpha | (Uint32)alpha << 16; \
|
||||
|
+ *(&i) = (Uint32)alpha | (Uint32)alpha << 16; \
|
||||
|
movd_m2r(*(&i), mm0); \ |
||||
|
punpckldq_r2r(mm0, mm0); \ |
||||
|
ALPHA = alpha >> 3; \ |
||||
|
@@ -303,10 +304,11 @@
|
||||
|
|
||||
|
#define ALPHA_BLIT16_555MMX(to, from, length, bpp, alpha) \ |
||||
|
do { \ |
||||
|
- int i, n = 0; \
|
||||
|
+ volatile int i; \
|
||||
|
+ int n = 0; \
|
||||
|
Uint16 *srcp = (Uint16 *)(from); \ |
||||
|
Uint16 *dstp = (Uint16 *)(to); \ |
||||
|
- Uint32 ALPHA = 0x7C00; \
|
||||
|
+ volatile Uint32 ALPHA = 0x7C00; \
|
||||
|
movd_m2r(*(&ALPHA), mm1); \ |
||||
|
punpcklwd_r2r(mm1, mm1); \ |
||||
|
punpcklwd_r2r(mm1, mm1); \ |
||||
|
@@ -319,10 +321,10 @@
|
||||
|
punpcklwd_r2r(mm7, mm7); \ |
||||
|
punpcklwd_r2r(mm7, mm7); \ |
||||
|
alpha &= ~(1+2+4); \ |
||||
|
- i = (Uint32)alpha | (Uint32)alpha << 16; \
|
||||
|
+ *(&i) = (Uint32)alpha | (Uint32)alpha << 16; \
|
||||
|
movd_m2r(*(&i), mm0); \ |
||||
|
punpckldq_r2r(mm0, mm0); \ |
||||
|
- i = ((int)(length) & 3); \
|
||||
|
+ i = ((int)(length) & 3); \
|
||||
|
ALPHA = alpha >> 3; \ |
||||
|
for(; i > 0; --i) { \ |
||||
|
Uint32 s = *srcp++; \ |
||||
|
@@ -524,7 +526,7 @@
|
||||
|
do { \ |
||||
|
Uint32 *srcp = (Uint32 *)(from); \ |
||||
|
Uint32 *dstp = (Uint32 *)(to); \ |
||||
|
- int i = 0x00fefefe; \
|
||||
|
+ volatile int i = 0x00fefefe; \
|
||||
|
movd_m2r(*(&i), mm4); \ |
||||
|
punpckldq_r2r(mm4, mm4); \ |
||||
|
i = 0x00010101; \ |
||||