aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--m4/check-os-options.m46
-rw-r--r--m4/disable-compiler-warnings.m410
2 files changed, 3 insertions, 13 deletions
diff --git a/m4/check-os-options.m4 b/m4/check-os-options.m4
index 371ffb3..4a7aec8 100644
--- a/m4/check-os-options.m4
+++ b/m4/check-os-options.m4
@@ -1,13 +1,13 @@
1# This must be called before AC_PROG_CC 1# This must be called before AC_PROG_CC
2AC_DEFUN([CHECK_OS_OPTIONS], [ 2AC_DEFUN([CHECK_OS_OPTIONS], [
3 3
4CFLAGS="$CFLAGS -Wall -std=gnu99" 4CFLAGS="$CFLAGS -Wall -std=gnu99 -fno-strict-aliasing"
5 5
6case $host_os in 6case $host_os in
7 *aix*) 7 *aix*)
8 HOST_OS=aix 8 HOST_OS=aix
9 if test "`echo $CC | cut -d ' ' -f 1`" != "gcc" ; then 9 if test "`echo $CC | cut -d ' ' -f 1`" != "gcc" ; then
10 CFLAGS="$USER_CFLAGS" 10 CFLAGS="-qnoansialias $USER_CFLAGS"
11 fi 11 fi
12 AC_SUBST([PLATFORM_LDADD], ['-lperfstat -lpthread']) 12 AC_SUBST([PLATFORM_LDADD], ['-lperfstat -lpthread'])
13 ;; 13 ;;
@@ -28,7 +28,7 @@ case $host_os in
28 if test "`echo $CC | cut -d ' ' -f 1`" = "gcc" ; then 28 if test "`echo $CC | cut -d ' ' -f 1`" = "gcc" ; then
29 CFLAGS="$CFLAGS -mlp64" 29 CFLAGS="$CFLAGS -mlp64"
30 else 30 else
31 CFLAGS="-g -O2 +DD64 $USER_CFLAGS" 31 CFLAGS="-g -O2 +DD64 +Otype_safety=strong $USER_CFLAGS"
32 fi 32 fi
33 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D__STRICT_ALIGNMENT" 33 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D__STRICT_ALIGNMENT"
34 AC_SUBST([PLATFORM_LDADD], ['-lpthread']) 34 AC_SUBST([PLATFORM_LDADD], ['-lpthread'])
diff --git a/m4/disable-compiler-warnings.m4 b/m4/disable-compiler-warnings.m4
index 9dae100..2792722 100644
--- a/m4/disable-compiler-warnings.m4
+++ b/m4/disable-compiler-warnings.m4
@@ -26,14 +26,4 @@ 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"
39]) 29])