[PATCH] acpica: add -fno-strict-aliasing to ignore type punning warnings (LP: #971886)
Colin King
colin.king at canonical.com
Wed Apr 18 12:46:37 UTC 2012
From: Colin Ian King <colin.king at canonical.com>
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 <colin.king at canonical.com>
---
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
--
1.7.9.5
More information about the fwts-devel
mailing list