aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2015-07-15 20:24:05 -0500
committerBrent Cook <bcook@openbsd.org>2015-07-15 20:24:05 -0500
commitc1a162d83b12babd697586ede45815f890d7a40e (patch)
tree679f18f7a17cce3b8bb906e54bba1049b47fb45a
parentdb974c34e95a24eda7ce575cc14bbc0eebfbdbb4 (diff)
downloadportable-c1a162d83b12babd697586ede45815f890d7a40e.tar.gz
portable-c1a162d83b12babd697586ede45815f890d7a40e.tar.bz2
portable-c1a162d83b12babd697586ede45815f890d7a40e.zip
disable strict aliasing by default, noticed by miod@
-rw-r--r--m4/disable-compiler-warnings.m410
1 files changed, 10 insertions, 0 deletions
diff --git a/m4/disable-compiler-warnings.m4 b/m4/disable-compiler-warnings.m4
index 2792722..9dae100 100644
--- a/m4/disable-compiler-warnings.m4
+++ b/m4/disable-compiler-warnings.m4
@@ -26,4 +26,14 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
26 [AC_MSG_RESULT([no])] 26 [AC_MSG_RESULT([no])]
27) 27)
28CFLAGS="$save_cflags $AM_CFLAGS" 28CFLAGS="$save_cflags $AM_CFLAGS"
29
30save_cflags="$CFLAGS"
31CFLAGS=-fno-strict-aliasing
32AC_MSG_CHECKING([whether CC supports -fno-strict-aliasing])
33AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
34 [AC_MSG_RESULT([yes])]
35 [AM_CFLAGS=-fno-strict-aliasing],
36 [AC_MSG_RESULT([no])]
37)
38CFLAGS="$save_cflags $AM_CFLAGS"
29]) 39])