From patchwork Sun Oct 14 18:47:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 191378 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 843272C0097 for ; Mon, 15 Oct 2012 05:48:16 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2441126838; Sun, 14 Oct 2012 18:48:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FFtTkEwVCOkQ; Sun, 14 Oct 2012 18:48:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 8BB6925180; Sun, 14 Oct 2012 18:48:13 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id D416B8F74A for ; Sun, 14 Oct 2012 18:48:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 3B2EDA021B for ; Sun, 14 Oct 2012 18:48:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6vWrNpArChlx for ; Sun, 14 Oct 2012 18:48:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (mail.free-electrons.com [88.190.12.23]) by hemlock.osuosl.org (Postfix) with ESMTP id E8A83A0127 for ; Sun, 14 Oct 2012 18:48:08 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id C48B817B; Sun, 14 Oct 2012 20:47:45 +0200 (CEST) Received: from localhost (humanoidz.org [82.247.183.72]) by mail.free-electrons.com (Postfix) with ESMTPSA id 86DF9147 for ; Sun, 14 Oct 2012 20:47:36 +0200 (CEST) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Sun, 14 Oct 2012 20:47:56 +0200 Message-Id: <1350240476-22608-1-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.7.9.5 Subject: [Buildroot] [PATCH] sdl_gfx: don't use --enable-mmx on x86_64 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net 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 --- package/sdl_gfx/sdl_gfx.mk | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/package/sdl_gfx/sdl_gfx.mk b/package/sdl_gfx/sdl_gfx.mk index e3ff630..c1c7f91 100644 --- a/package/sdl_gfx/sdl_gfx.mk +++ b/package/sdl_gfx/sdl_gfx.mk @@ -11,7 +11,14 @@ SDL_GFX_DEPENDENCIES = sdl SDL_GFX_CONF_OPT = \ --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 +else +SDL_GFX_CONF_OPT += --disable-mmx +endif $(eval $(autotools-package))