diff options
authorThomas Petazzoni <>2012-10-14 08:47:56 (GMT)
committer Peter Korsgaard <>2012-10-14 18:51:35 (GMT)
commitd3eced2687b68659716c7f4729e4bd31674934f7 (patch)
parent85280ef82936257456449f189d2ea4b484a8f269 (diff)
sdl_gfx: don't use --enable-mmx on x86_64
Even though the MMX instructions are available on x86_64 processors, the MMX code in sdl_gfx is written in IA32-specific assembly code, and therefore does not build on x86_64. It generates the following build issues: SDL_imageFilter.c: Assembler messages: SDL_imageFilter.c:34: Error: `pusha' is not supported in 64-bit mode SDL_imageFilter.c:38: Error: `popa' is not supported in 64-bit mode SDL_imageFilter.c:77: Error: `pusha' is not supported in 64-bit mode SDL_imageFilter.c:93: Error: `popa' is not supported in 64-bit mode [...] We fix this by only enabling MMX support in this package when the processor supports MMX *and* it is a IA32 compatible processor. Fixes Signed-off-by: Thomas Petazzoni <> Signed-off-by: Peter Korsgaard <>
1 files changed, 9 insertions, 2 deletions
diff --git a/package/sdl_gfx/ b/package/sdl_gfx/
index e3ff630..c1c7f91 100644
--- a/package/sdl_gfx/
+++ b/package/sdl_gfx/
@@ -11,7 +11,14 @@ SDL_GFX_DEPENDENCIES = sdl
--with-sdl-prefix=$(STAGING_DIR)/usr \
--disable-sdltest \
- --enable-static \
- $(if $(BR2_X86_CPU_HAS_MMX),--enable-mmx,--disable-mmx)
+ --enable-static
+# Even though x86_64 processors support MMX, the MMX-specific assembly
+# code in sdl_gfx is IA32 specific, and does not build for x86_64.
+ifeq ($(BR2_i386)$(BR2_X86_CPU_HAS_MMX),yy)
+SDL_GFX_CONF_OPT += --enable-mmx
+SDL_GFX_CONF_OPT += --disable-mmx
$(eval $(autotools-package))