summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2015-06-15 16:31:44 +0200
committerVictor Toso <victortoso@redhat.com>2015-06-17 10:44:13 +0200
commitd508979b6bde816e31caaa3cf29aeeccb60e70a2 (patch)
tree46caaab639c47f34685e292d8724e0412e4e42b8
parente7f78761905b5b0f18e6a42b5e1772b6c4050313 (diff)
downloadvd_agent-master.tar.gz
vd_agent-master.tar.xz
vd_agent-master.zip
Add -fno-strict-aliasing to default CFLAGSHEADmaster
Compilation breaks with older gcc versions (gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11) on RHEL6) with the following error (due to the additional use of -Werror in the default CFLAGS) CC src/src_spice_vdagent-vdagent-x11-randr.o cc1: warnings being treated as errors src/vdagent-x11-randr.c: In function ‘vdagent_x11_randr_handle_event’: src/vdagent-x11-randr.c:499: error: dereferencing pointer ‘sce’ does break strict-aliasing rules src/vdagent-x11-randr.c:499: error: dereferencing pointer ‘sce’ does break strict-aliasing rules src/vdagent-x11-randr.c:498: note: initialized from here make: *** [src/src_spice_vdagent-vdagent-x11-randr.o] Error 1 Strict aliasing is not something we must have for the agent, and the alternative would most likely involve an anonymous union, or some casting. Given that this warning only occurs with these older compilers, better to go with a fix as non-invasive as possible. Resolves: https://bugs.freedesktop.org/show_bug.cgi?id=90981
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 37ae160..dc72bd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -130,7 +130,7 @@ fi
# If no CFLAGS are set, set some sane default CFLAGS
if test "$ac_test_CFLAGS" != set; then
- DEFAULT_CFLAGS="-Wall -Werror -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4"
+ DEFAULT_CFLAGS="-Wall -Werror -Wp,-D_FORTIFY_SOURCE=2 -fno-strict-aliasing -fstack-protector --param=ssp-buffer-size=4"
for F in $DEFAULT_CFLAGS; do
AC_MSG_CHECKING([whether $CC supports $F])
save_CFLAGS="$CFLAGS"