kumquat-buildroot/package/sdl_gfx/sdl_gfx.mk
Thomas Petazzoni d3eced2687 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

  http://autobuild.buildroot.org/results/b9efc611f5da487079b6be37bb7a41a3198d63b9/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-10-14 20:51:35 +02:00

25 lines
736 B
Makefile

#############################################################
#
# SDL_gfx addon for SDL
#
#############################################################
SDL_GFX_VERSION = 2.0.19
SDL_GFX_SOURCE = SDL_gfx-$(SDL_GFX_VERSION).tar.gz
SDL_GFX_SITE = http://www.ferzkopp.net/Software/SDL_gfx-2.0/
SDL_GFX_INSTALL_STAGING = YES
SDL_GFX_DEPENDENCIES = sdl
SDL_GFX_CONF_OPT = \
--with-sdl-prefix=$(STAGING_DIR)/usr \
--disable-sdltest \
--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
else
SDL_GFX_CONF_OPT += --disable-mmx
endif
$(eval $(autotools-package))