SDL/src
Sam Lantinga 741f1ec0c4 Fixed bug #1111
kwm@rainbow-runner.nl      2011-01-30 06:28:27 PST

Created attachment 562 [details]
Build fix with clang.

When building sdl 1.2.14 with the Clang compiler http://clang.llvm.org .
The build fails in src/video/mmx.h with the following error:

--------------------------------------------------
./src/video/SDL_RLEaccel.c:831:5: error: invalid operand for instruction
    CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
    ^
./src/video/SDL_RLEaccel.c:831:17: note: instantiated from:
    CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
                ^
./src/video/SDL_RLEaccel.c:831:5: note: instantiated from:
    CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
    ^
./src/video/SDL_RLEaccel.c:647:23: note: instantiated from:
                                blitter(2, Uint8, ALPHA_BLIT16_565MMX); \
                                                  ^
./src/video/SDL_RLEaccel.c:282:4: note: instantiated from:
          movq_r2m(mm3, *dstp);                         \
          ^
In file included from ./src/video/SDL_RLEaccel.c:99:
./src/video/mmx.h:379:28: note: instantiated from:
#define movq_r2m(reg, var)      mmx_r2m(movq, reg, var)
                                ^
<scratch space>:192:1: note: instantiated from:
"movq"
^
<inline asm>:1:2: note: instantiated into assembly here
        movq %mm3, %dx
        ^
--------------------------------------------------

According to the clang developers this is a invalid inline assembly.
Using the attached patch from the last commit in the below bug report fixes the
compile.
More details from: http://llvm.org/bugs/show_bug.cgi?id=6730
2011-01-30 13:42:05 -08:00
..
atomic More fixes for compilation on Visual Studio 2011-01-25 18:02:41 -08:00
audio Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share. 2011-01-24 21:20:30 -08:00
core Fixed Android build 2011-01-24 21:31:32 -08:00
cpuinfo Added API function to get CPU cache line size. 2011-01-27 20:46:45 -08:00
events Fixed bug #1056 (Frequent crashes in Touch events by simply touching the screen) 2011-01-28 10:21:58 -08:00
file Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share. 2011-01-24 21:20:30 -08:00
haptic Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share. 2011-01-24 21:20:30 -08:00
joystick Removed completely non-portable event thread hack. 2011-01-27 22:44:08 -08:00
libm Fixed compiling on Windows Mobile SDK 5.0 with Visual Studio 2008 2011-01-24 15:46:11 -08:00
loadso Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share. 2011-01-24 21:20:30 -08:00
main Fixed bug #925 2011-01-20 18:04:05 -08:00
power Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share. 2011-01-24 21:20:30 -08:00
stdlib Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share. 2011-01-24 21:20:30 -08:00
thread Improved condition variable documentation 2011-01-27 10:40:17 -08:00
timer Added cache line size info in SDL_cpuinfo.h 2011-01-27 16:46:15 -08:00
video Fixed bug #1111 2011-01-30 13:42:05 -08:00
SDL_assert_c.h Mostly cleaned up warnings with -Wmissing-prototypes 2010-06-26 08:56:48 -07:00
SDL_assert.c Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share. 2011-01-24 21:20:30 -08:00
SDL_compat.c Improved timer implementation 2011-01-27 14:45:06 -08:00
SDL_error_c.h Mostly cleaned up warnings with -Wmissing-prototypes 2010-06-26 08:56:48 -07:00
SDL_error.c Added an extra line for consistency 2011-01-12 21:21:08 -08:00
SDL_fatal.c Fixed bug #926 2010-01-24 21:10:53 +00:00
SDL_fatal.h Fixed bug #926 2010-01-24 21:10:53 +00:00
SDL.c Removed completely non-portable event thread hack. 2011-01-27 22:44:08 -08:00