From patchwork Thu Dec 1 18:33:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sergio Prado X-Patchwork-Id: 701628 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tV5XN6cvGz9vFD for ; Fri, 2 Dec 2016 05:33:56 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=e-labworks-com.20150623.gappssmtp.com header.i=@e-labworks-com.20150623.gappssmtp.com header.b="XegwaQCw"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0D3E82A285; Thu, 1 Dec 2016 18:33:54 +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 00xaAQ5kx3lx; Thu, 1 Dec 2016 18:33:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id D999E2A24B; Thu, 1 Dec 2016 18:33:51 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 7E92F1BFCA6 for ; Thu, 1 Dec 2016 18:33:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 79E7785628 for ; Thu, 1 Dec 2016 18:33:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nO23Ku3ZS_wd for ; Thu, 1 Dec 2016 18:33:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk0-f193.google.com (mail-qk0-f193.google.com [209.85.220.193]) by fraxinus.osuosl.org (Postfix) with ESMTPS id E24A5853F4 for ; Thu, 1 Dec 2016 18:33:48 +0000 (UTC) Received: by mail-qk0-f193.google.com with SMTP id h201so27398170qke.3 for ; Thu, 01 Dec 2016 10:33:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=e-labworks-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9BquIS9qmKabhlJ+9Y5/eUwvUt3hAwzpnps6hpPwdtM=; b=XegwaQCww6Zm0EMzgFfOISJpDkpmT6U6f0oroR0N5vgMYos2YY9BFpTCeEoInDsEuJ 6fPNM0fDe25Em7MXziAnAj/aM6XujibRg1/LITiBQhvxqvfX4FiKjykAMrHcZgEl/GlI hftHjCKET4AzmBny4Oh3O1ybwB9oh9EseXZg3QfscS5wgK9XZrEtpua6HHEcfBjYljOc n3XQ7XmUYbW3dbWSRzTR4YmW7E1mBIF97gasqahBiw9kNVjtVAOMIxIx0LM/Eg7PkjS/ jzQuWNrsDNFLxOAIAINFXzvW5AdzFklJfhqyOsqsBK4yxeNhzpKD4dLQioKFpI+p7aEd EywQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9BquIS9qmKabhlJ+9Y5/eUwvUt3hAwzpnps6hpPwdtM=; b=EPtEWkeWAHjsNDLW9Ng8DOnTj11YTknB5C4BHDjSbrpinxnv7aiNNKcX2bL98M6pid P8p3iPGwcu7FReBF46AtLNj1y0YTQj5Dc9bLanH2Y3iSyGpbudBDFiljzvIUt5posAYO 3b4xq7y6+ODhFzH5XCILqzKQfCqh8XGArA6eXR7po2g6H14I78GHzHs8c5zvlmeK7DIi XSvrGexXfZNacqatFkF82wz95W4coyE9GgbPQGLMZWwsdBiA/T+4FNIKo69u9kv4siyn mUkqsKnVkL1mv+d9aPqai/LsnyrECsqHCyonsKTbG75juvRzDDO74/ebPxyG7a/rNMZO 1E5g== X-Gm-Message-State: AKaTC01o7/tH/jkUOGSyxcH9pNzRCRTKVKJCRGovBjr+8eD1p7oDhGi9Wbv+Eq1xi/Gu1g== X-Received: by 10.55.19.102 with SMTP id d99mr4532550qkh.205.1480617227944; Thu, 01 Dec 2016 10:33:47 -0800 (PST) Received: from localhost.localdomain ([177.32.224.184]) by smtp.gmail.com with ESMTPSA id n31sm718298qta.28.2016.12.01.10.33.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Dec 2016 10:33:47 -0800 (PST) From: Sergio Prado To: buildroot@buildroot.org Date: Thu, 1 Dec 2016 16:33:24 -0200 Message-Id: <1480617204-25349-1-git-send-email-sergio.prado@e-labworks.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2] stella: fix bug when compiling with PPC altivec vectorization X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" PPC altivec vectorization triggers a bug when compiling with -std=c++11 because "bool" is redefined in altivec.h. src/emucore/Event.hxx:112:23: error: cannot convert ‘bool’ to ‘__vector(4) __bool int’ in assignment myKeyTable[i] = false; ^ Acording to a bug report in GCC [1], "You need to use -std=g++11 or undefine bool after the include of altivec.h as context sensitive keywords is not part of the C++11 standard". So let's compile with -std=gnu++11 by default. Tested on ARM, x86 and PPC. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58241#c3 Fixes: http://autobuild.buildroot.net/results/0970d2c8e1787ceffc46b589522e53d52675e03c http://autobuild.buildroot.net/results/ec1bc57675b6e53af0cd33d7b99cd2e3bf5d9d7e Signed-off-by: Sergio Prado --- Changes v1 -> v2: - compile with gnu++11 on all archs (suggested by Sam Bobroff) --- ...-gnu-11-standard-to-prevent-errors-on-PPC.patch | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 package/stella/0004-Use-gnu-11-standard-to-prevent-errors-on-PPC.patch diff --git a/package/stella/0004-Use-gnu-11-standard-to-prevent-errors-on-PPC.patch b/package/stella/0004-Use-gnu-11-standard-to-prevent-errors-on-PPC.patch new file mode 100644 index 000000000000..76d12a2cdd93 --- /dev/null +++ b/package/stella/0004-Use-gnu-11-standard-to-prevent-errors-on-PPC.patch @@ -0,0 +1,35 @@ +From 6946a491cae42b971aad3bc5d822e0e549eca8bd Mon Sep 17 00:00:00 2001 +From: Sergio Prado +Date: Thu, 1 Dec 2016 15:20:33 -0200 +Subject: [PATCH] Use gnu++11 standard to prevent errors on PPC. + +PPC altivec vectorization triggers a bug when compiling with -std=c++11 +because "bool" is redefined in altivec.h. + +Acording to a bug report in GCC, "You need to use -std=g++11 or +undefine bool after the include of altivec.h as context sensitive +keywords is not part of the C++11 standard". + +So let's use gnu++11 standard. + +Signed-off-by: Sergio Prado +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 6dd0129587b3..6ed50ea4c335 100644 +--- a/Makefile ++++ b/Makefile +@@ -51,7 +51,7 @@ else + endif + CXXFLAGS+= -Wall -Wextra -Wno-unused-parameter -Wno-ignored-qualifiers + ifdef HAVE_GCC +- CXXFLAGS+= -Wno-multichar -Wunused -fno-rtti -Woverloaded-virtual -Wnon-virtual-dtor -std=c++11 ++ CXXFLAGS+= -Wno-multichar -Wunused -fno-rtti -Woverloaded-virtual -Wnon-virtual-dtor -std=gnu++11 + endif + + ifdef PROFILE +-- +1.9.1 +