Hi.
I am trying to compile SDL 1.2.6 (or SDL CVS) version with GCC 3.3.1 and
this does not work well. The following verion of GCC and NASM are present
on my system:
gcc version 3.3.1 20030814 (Red Hat Linux 3.3.1-2)
NASM version 0.98.35 compiled on Jul 29 2003
I did a ./configure --disable-debug --enable-nasm and the make on SDL 1.2.6
and GCC then produces this error:
gcc -DPACKAGE=“SDL” -DVERSION=“1.2.6” -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1
-I. -I. -march=c3 -mmmx -m3dnow -Os -falign-loops=0 -falign-functions=0
-falign-jumps=0 -fomit-frame-pointer -fexpensive-optimizations -march=pentium
-mcpu=pentiumpro -Wall -DENABLE_DUMMYVIDEO -DDISKAUD_SUPPORT -DUSE_DLOPEN
-DUSE_ASMBLIT -I./hermes -I…/…/src/hermes -DOSS_SUPPORT -DALSA_SUPPORT
-I/usr/X11R6/include -DENABLE_X11 -DXTHREADS -I./include -I./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
-DPTHREAD_NO_RECURSIVE_MUTEX -I…/…/include -I…/…/include/SDL -I…/…/src
-I…/…/src/linux -I…/…/src/main -I…/…/src/audio -I…/…/src/video
-I…/…/src/video/XFree86/extensions -I…/…/src/events -I…/…/src/joystick
-I…/…/src/cdrom -I…/…/src/thread -I…/…/src/timer -I…/…/src/endian
-I…/…/src/file -c SDL_RLEaccel.c -fPIC -DPIC -o .libs/SDL_RLEaccel.lo
SDL_RLEaccel.c: In function RLEClipBlit': SDL_RLEaccel.c:845: error: invalid
asm’: invalid expression as operand
SDL_RLEaccel.c:845: error: invalid asm': invalid expression as operand SDL_RLEaccel.c:845: error: invalid
asm’: invalid expression as operand
(There is also another unrelated “problem” here and that is that the configure
script totally ignores my CFLAGS and gladly adds -march=pentium
-mcpu=pentiumpro)
I have tracked this down to problems in the src/video/mmx.h file and the
constraints used when building the inline assembly. The file uses
"X" and “=X” for constraints but, according to the GCC manual this should
be one of the following when using MMX / SSE registers:
x xmm SSE register
y MMX register
See here
http://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/Machine-Constraints.html#Machine%20Constraints
and here for a bug-report on a similar issue:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7267
I am not that fluent in AT&T syntax and inline assembly GCC style to fix this.
I did try to replace a few of the =X with =y and it reduced the number of
errors down to one.
Is there any way I can force gcc to pinpoint exactly where on a line it goes
wrong? The problem is that the macros used expand to a single very long line
and gcc does not provide enough information for me to find which part of
the line that holds the error.
Thanks in advance.–
John Eckerdal