Package: libsdl1.2 Severity: important Version: 1.2.7+1.2.8cvs20041007-3 Tags: patch
>From my build log: ... mkdir .libs x86_64-linux-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL\" -DVERSION=\"1.2.8\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_LIBASOUND=1 -I. -I../../../SDL-1.2.7+1.2.8cvs20041007/src/endian -g -O2 -Wall -DENABLE_DUMMYVIDEO -DDISKAUD_SUPPORT -DUSE_DLOPEN -DALSA_SUPPORT -DALSA_DYNAMIC=libasound.so.2 -DUSE_DLVSYM -DENABLE_X11 -DXTHREADS -I../SDL-1.2.7+1.2.8cvs20041007/include -I../SDL-1.2.7+1.2.8cvs20041007/src/video -DXFREE86_VM -DXFREE86_VMGAMMA -DXFREE86_DGAMOUSE -DDEFAULT_DGAMOUSE -DXFREE86_XV -DHAVE_XINERAMA -Isrc/video -DENABLE_DGA -DENABLE_FBCON -DHAVE_OPENGL -DUSE_INPUT_EVENTS -D_REENTRANT -DSDL_USE_PTHREADS -DHAVE_SIGACTION -I../../../SDL-1.2.7+1.2.8cvs20041007/include -I../../../SDL-1.2.7+1.2.8cvs20041007/include/SDL -I../../../SDL-1.2.7+1.2.8cvs20041007/src -I../../../SDL-1.2.7+1.2.8cvs20041007/src/main/linux -I../../../SDL-1.2.7+1.2.8cvs20041007/src/audio -I../../../SDL-1.2.7+1.2.8cvs20041007/src/video -I../../../SDL-1.2.7+1.2.8cvs20041007/src/video/XFree86/extensions -I../../../SDL-1.2.7+1.2.8cvs20041007/src/events -I../../../SDL-1.2.7+1.2.8cvs20041007/src/joystick -I../../../SDL-1.2.7+1.2.8cvs20041007/src/cdrom -I../../../SDL-1.2.7+1.2.8cvs20041007/src/thread -I../../../SDL-1.2.7+1.2.8cvs20041007/src/timer -I../../../SDL-1.2.7+1.2.8cvs20041007/src/endian -I../../../SDL-1.2.7+1.2.8cvs20041007/src/file -I../../src/thread -MT SDL_endian.lo -MD -MP -MF .deps/SDL_endian.Tpo -c ../../../SDL-1.2.7+1.2.8cvs20041007/src/endian/SDL_endian.c -fPIC -DPIC -o .libs/SDL_endian.o /tmp/ccvmBGpy.s: Assembler messages: /tmp/ccvmBGpy.s:222: Error: suffix or operands invalid for `xchg' make[3]: *** [SDL_endian.lo] Error 1 make[3]: Leaving directory `/tmp/buildd/libsdl1.2-1.2.7+1.2.8cvs20041007/build-tree/alsa/src/endian' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/tmp/buildd/libsdl1.2-1.2.7+1.2.8cvs20041007/build-tree/alsa/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/buildd/libsdl1.2-1.2.7+1.2.8cvs20041007/build-tree/alsa' make: *** [debian/stampdir/build] Error 2 Examining the asm reveals that it's trying to 'xchgb %sil,%si'. According to the gcc-3.4 info file (and it appears gcc-3.3 supports this too), you should use "Q" instead of "q" for the constraint if the upper half will be used. Correcting this (see the patch I'm attaching) allows the package to compile. -- System Information: Debian Release: 3.1 Architecture: amd64 (x86_64) Kernel: Linux 2.6.9-9-amd64-k8 Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8) -- Daniel Schepler "Please don't disillusion me. I [EMAIL PROTECTED] haven't had breakfast yet." -- Orson Scott Card
diff -urN libsdl1.2-1.2.7+1.2.8cvs20041007.old/debian/patches/004_amd64_asm_fix.diff libsdl1.2-1.2.7+1.2.8cvs20041007/debian/patches/004_amd64_asm_fix.diff --- libsdl1.2-1.2.7+1.2.8cvs20041007.old/debian/patches/004_amd64_asm_fix.diff 1970-01-01 00:00:00.000000000 +0000 +++ libsdl1.2-1.2.7+1.2.8cvs20041007/debian/patches/004_amd64_asm_fix.diff 2005-01-13 00:24:35.000000000 +0000 @@ -0,0 +1,11 @@ +--- SDL-1.2.7+1.2.8cvs20041007.orig/include/SDL_endian.h 2004-02-26 14:26:07.000000000 +0000 ++++ SDL-1.2.7+1.2.8cvs20041007/include/SDL_endian.h 2005-01-13 00:23:35.304661645 +0000 +@@ -68,7 +68,7 @@ + #elif defined(__GNUC__) && defined(__x86_64__) + static __inline__ Uint16 SDL_Swap16(Uint16 x) + { +- __asm__("xchgb %b0,%h0" : "=q" (x) : "0" (x)); ++ __asm__("xchgb %b0,%h0" : "=Q" (x) : "0" (x)); + return x; + } + #elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))