summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Booth <mbooth@redhat.com>2011-04-07 15:30:54 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-04-11 11:11:06 +0100
commitc018c39cc9dfe2d7bf923a87d5c71e96654499ba (patch)
tree768f189363e31d36738902ea7e3cefda07b0ba00
parent57261c712d7012e858f93d040938750866bd6ae0 (diff)
downloadlibguestfs-c018c39cc9dfe2d7bf923a87d5c71e96654499ba.tar.gz
libguestfs-c018c39cc9dfe2d7bf923a87d5c71e96654499ba.tar.xz
libguestfs-c018c39cc9dfe2d7bf923a87d5c71e96654499ba.zip
Compile rpcgen-generated files with -fno-strict-aliasing
rpcgen generates source which can't be safely compiled with strict-aliasing enabled. (cherry picked from commit 3a84e0784e1e3ab7b56850d0f8c9aa42f1ae3da1)
-rw-r--r--daemon/Makefile.am11
-rw-r--r--fish/Makefile.am8
-rw-r--r--src/Makefile.am11
3 files changed, 13 insertions, 17 deletions
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index ee1959f5..8fb070f6 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -45,13 +45,12 @@ BUILT_SOURCES = \
EXTRA_DIST = $(BUILT_SOURCES) \
.gitignore
-# This convenience library is solely to avoid compiler warnings
-# in its generated sources.
noinst_LIBRARIES = libprotocol.a
-libprotocol_a_SOURCES = \
- guestfs_protocol.c \
- guestfs_protocol.h
-libprotocol_a_CFLAGS =
+
+# This convenience library is solely to compile its generated sources with
+# custom flags.
+libprotocol_a_SOURCES = guestfs_protocol.c guestfs_protocol.h
+libprotocol_a_CFLAGS = -Wall -Wno-unused -fno-strict-aliasing
guestfs_protocol.c: $(libsrcdir)/guestfs_protocol.c
rm -f $@
diff --git a/fish/Makefile.am b/fish/Makefile.am
index 66596ef4..30f246da 100644
--- a/fish/Makefile.am
+++ b/fish/Makefile.am
@@ -89,10 +89,10 @@ guestfish_SOURCES = \
tilde.c \
time.c
-# This convenience library is solely to avoid compiler warnings
-# in its generated sources.
-librc_protocol_la_SOURCES = rc_protocol.c
-librc_protocol_la_CFLAGS = -Wall -Wno-unused
+# This convenience library is solely to compile its generated sources with
+# custom flags.
+librc_protocol_la_SOURCES = rc_protocol.c rc_protocol.h
+librc_protocol_la_CFLAGS = -Wall -Wno-unused -fno-strict-aliasing
# Build the command lookup perfect hash code. The generated code has
# lots of warnings so we must compile it in a separate mini-library.
diff --git a/src/Makefile.am b/src/Makefile.am
index 2b9c49ba..38e3f037 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -52,13 +52,10 @@ include_HEADERS = guestfs.h
lib_LTLIBRARIES = libguestfs.la
-# This convenience library is solely to avoid compiler warnings
-# in its generated sources.
-libprotocol_la_SOURCES = \
- guestfs_protocol.c \
- guestfs_protocol.h
-
-libprotocol_la_CFLAGS =
+# This convenience library is solely to compile its generated sources with
+# custom flags.
+libprotocol_la_SOURCES = guestfs_protocol.c guestfs_protocol.h
+libprotocol_la_CFLAGS = -Wall -Wno-unused -fno-strict-aliasing
# Build the errnostring perfect hash code. The generated code has lots
# of warnings so we must compile it in a separate mini-library.