From patchwork Wed Apr 18 12:46:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: acpica: add -fno-strict-aliasing to ignore type punning warnings (LP: #971886) Date: Wed, 18 Apr 2012 02:46:37 -0000 From: Colin King X-Patchwork-Id: 153492 Message-Id: <1334753197-23202-1-git-send-email-colin.king@canonical.com> To: fwts-devel@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