From patchwork Wed Apr 18 12:46:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 153492 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id E6D4AB6EEB for ; Wed, 18 Apr 2012 22:46:47 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SKUHT-0000fo-G2 for incoming@patchwork.ozlabs.org; Wed, 18 Apr 2012 12:46:43 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SKUHN-0000dt-Qc for fwts-devel@lists.ubuntu.com; Wed, 18 Apr 2012 12:46:37 +0000 Received: from cpc19-craw6-2-0-cust5.croy.cable.virginmedia.com ([77.102.228.6] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SKUHN-0002Kl-KP for fwts-devel@lists.ubuntu.com; Wed, 18 Apr 2012 12:46:37 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH] acpica: add -fno-strict-aliasing to ignore type punning warnings (LP: #971886) Date: Wed, 18 Apr 2012 13:46:37 +0100 Message-Id: <1334753197-23202-1-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 1.7.9.5 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: fwts-devel-bounces@lists.ubuntu.com Errors-To: fwts-devel-bounces@lists.ubuntu.com From: Colin Ian King We don't have much control over the quality of code in the ACPICA core that is incorporated into fwts. When compiled on Gentoo there are a bunch of "dereferencing type-punned pointer will break strict-aliasing rules" warnings which we can't easily fix. For now, just use -fno-strict-aliasing on the ACPICA core to workaround this noise. Signed-off-by: Colin Ian King Acked-by: Keng-Yu Lin Acked-by: Alex Hung --- src/acpica/Makefile.am | 2 +- src/acpica/source/compiler/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/acpica/Makefile.am b/src/acpica/Makefile.am index 6a7b4b5..5a475e9 100644 --- a/src/acpica/Makefile.am +++ b/src/acpica/Makefile.am @@ -11,7 +11,7 @@ ACPICA_COMP = $(ACPICA_SRC)/components # # -DACPI_EXEC_APP is specific to making ACPICA for the fwts method test # -AM_CPPFLAGS = -D_LINUX -DNDEBUG -D_CONSOLE -DACPI_EXEC_APP -I$(top_srcdir)/src/lib/include -I$(ACPICA_SRC)/include -Wall +AM_CPPFLAGS = -D_LINUX -DNDEBUG -D_CONSOLE -DACPI_EXEC_APP -I$(top_srcdir)/src/lib/include -I$(ACPICA_SRC)/include -Wall -fno-strict-aliasing osunixxf_munged.c: $(ACPICA_OSL)/osunixxf.c cat $(ACPICA_OSL)/osunixxf.c | \ diff --git a/src/acpica/source/compiler/Makefile.am b/src/acpica/source/compiler/Makefile.am index 91db20b..74ae927 100644 --- a/src/acpica/source/compiler/Makefile.am +++ b/src/acpica/source/compiler/Makefile.am @@ -2,7 +2,7 @@ # We need to build this as a seperate shared library with the iasl functionality built in. We # just export the fwts_* interface. # -AM_CPPFLAGS = -Wall -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER $(CFLAGS) -I$(top_srcdir)/src/acpica/source/include +AM_CPPFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing -D_LINUX -DACPI_ASL_COMPILER $(CFLAGS) -I$(top_srcdir)/src/acpica/source/include ACPICA_COMPILER = . ACPICA_COMMON = ../common