mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Do not let external specification of CFLAGS stop us from adding
-fno-strict-aliasing.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
# Macros to detect C compiler features
|
||||
# $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.5 2002/03/29 17:32:53 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.5.2.1 2004/02/02 04:08:02 tgl Exp $
|
||||
|
||||
|
||||
# PGAC_C_SIGNED
|
||||
@ -92,3 +92,32 @@ AC_DEFINE_UNQUOTED(AS_TR_CPP(alignof_$1),
|
||||
[$AS_TR_SH([pgac_cv_alignof_$1])],
|
||||
[The alignment requirement of a `$1'])
|
||||
])# PGAC_CHECK_ALIGNOF
|
||||
|
||||
|
||||
# PGAC_PROG_CC_NO_STRICT_ALIASING
|
||||
# -------------------------------
|
||||
# Find out how to turn off strict aliasing in the C compiler.
|
||||
AC_DEFUN([PGAC_PROG_CC_NO_STRICT_ALIASING],
|
||||
[AC_CACHE_CHECK([how to turn off strict aliasing in $CC],
|
||||
pgac_cv_prog_cc_no_strict_aliasing,
|
||||
[pgac_save_CFLAGS=$CFLAGS
|
||||
if test "$GCC" = yes; then
|
||||
pgac_try="-fno-strict-aliasing"
|
||||
else
|
||||
# Maybe fill in later...
|
||||
pgac_try=
|
||||
fi
|
||||
|
||||
for pgac_flag in $pgac_try; do
|
||||
CFLAGS="$pgac_save_CFLAGS $pgac_flag"
|
||||
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
[pgac_cv_prog_cc_no_strict_aliasing=$pgac_try
|
||||
break])
|
||||
done
|
||||
|
||||
CFLAGS=$pgac_save_CFLAGS
|
||||
])
|
||||
|
||||
if test x"$pgac_cv_prog_cc_no_strict_aliasing" != x""; then
|
||||
CFLAGS="$CFLAGS $pgac_cv_prog_cc_no_strict_aliasing"
|
||||
fi])# PGAC_PROG_CC_NO_STRICT_ALIASING
|
||||
|
Reference in New Issue
Block a user