disable strict aliasing on AIX xlc and HP-UX aC++ compilers
This commit is contained in:
parent
ddeb740426
commit
b9291face3
@ -1,13 +1,13 @@
|
||||
# This must be called before AC_PROG_CC
|
||||
AC_DEFUN([CHECK_OS_OPTIONS], [
|
||||
|
||||
CFLAGS="$CFLAGS -Wall -std=gnu99"
|
||||
CFLAGS="$CFLAGS -Wall -std=gnu99 -fno-strict-aliasing"
|
||||
|
||||
case $host_os in
|
||||
*aix*)
|
||||
HOST_OS=aix
|
||||
if test "`echo $CC | cut -d ' ' -f 1`" != "gcc" ; then
|
||||
CFLAGS="$USER_CFLAGS"
|
||||
CFLAGS="-qnoansialias $USER_CFLAGS"
|
||||
fi
|
||||
AC_SUBST([PLATFORM_LDADD], ['-lperfstat -lpthread'])
|
||||
;;
|
||||
@ -28,7 +28,7 @@ case $host_os in
|
||||
if test "`echo $CC | cut -d ' ' -f 1`" = "gcc" ; then
|
||||
CFLAGS="$CFLAGS -mlp64"
|
||||
else
|
||||
CFLAGS="-g -O2 +DD64 $USER_CFLAGS"
|
||||
CFLAGS="-g -O2 +DD64 +Otype_safety=strong $USER_CFLAGS"
|
||||
fi
|
||||
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D__STRICT_ALIGNMENT"
|
||||
AC_SUBST([PLATFORM_LDADD], ['-lpthread'])
|
||||
|
@ -26,14 +26,4 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
||||
[AC_MSG_RESULT([no])]
|
||||
)
|
||||
CFLAGS="$save_cflags $AM_CFLAGS"
|
||||
|
||||
save_cflags="$CFLAGS"
|
||||
CFLAGS=-fno-strict-aliasing
|
||||
AC_MSG_CHECKING([whether CC supports -fno-strict-aliasing])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
||||
[AC_MSG_RESULT([yes])]
|
||||
[AM_CFLAGS=-fno-strict-aliasing],
|
||||
[AC_MSG_RESULT([no])]
|
||||
)
|
||||
CFLAGS="$save_cflags $AM_CFLAGS"
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user