diff options
author | Brent Cook <bcook@openbsd.org> | 2015-07-15 20:24:05 -0500 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2015-07-15 20:24:05 -0500 |
commit | c1a162d83b12babd697586ede45815f890d7a40e (patch) | |
tree | 679f18f7a17cce3b8bb906e54bba1049b47fb45a | |
parent | db974c34e95a24eda7ce575cc14bbc0eebfbdbb4 (diff) | |
download | portable-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.m4 | 10 |
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 | ) |
28 | CFLAGS="$save_cflags $AM_CFLAGS" | 28 | CFLAGS="$save_cflags $AM_CFLAGS" |
29 | |||
30 | save_cflags="$CFLAGS" | ||
31 | CFLAGS=-fno-strict-aliasing | ||
32 | AC_MSG_CHECKING([whether CC supports -fno-strict-aliasing]) | ||
33 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], | ||
34 | [AC_MSG_RESULT([yes])] | ||
35 | [AM_CFLAGS=-fno-strict-aliasing], | ||
36 | [AC_MSG_RESULT([no])] | ||
37 | ) | ||
38 | CFLAGS="$save_cflags $AM_CFLAGS" | ||
29 | ]) | 39 | ]) |