mirror of
https://github.com/postgres/postgres.git
synced 2026-01-05 23:38:41 +03:00
Put in defense against gcc -ffast-math.
This commit is contained in:
11
configure.in
11
configure.in
@@ -1,5 +1,5 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl $Header: /cvsroot/pgsql/configure.in,v 1.209 2002/09/17 04:27:41 momjian Exp $
|
||||
dnl $Header: /cvsroot/pgsql/configure.in,v 1.210 2002/09/20 18:38:57 petere Exp $
|
||||
dnl
|
||||
dnl Developers, please strive to achieve this order:
|
||||
dnl
|
||||
@@ -253,12 +253,21 @@ if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
|
||||
CFLAGS="$CFLAGS -g"
|
||||
fi
|
||||
AC_MSG_NOTICE([using CFLAGS=$CFLAGS])
|
||||
|
||||
# Check if the compiler still works with the template settings
|
||||
AC_MSG_CHECKING([whether the C compiler still works])
|
||||
AC_TRY_LINK([], [return 0;],
|
||||
[AC_MSG_RESULT(yes)],
|
||||
[AC_MSG_RESULT(no)
|
||||
AC_MSG_ERROR([cannot proceed])])
|
||||
|
||||
# Defend against gcc -ffastmath
|
||||
if test "$GCC" = yes; then
|
||||
AC_TRY_COMPILE([], [@%:@ifdef __FAST_MATH__
|
||||
choke me
|
||||
@%:@endif], [], [AC_MSG_ERROR([do not put -ffast-math in CFLAGS])])
|
||||
fi
|
||||
|
||||
AC_PROG_CPP
|
||||
AC_SUBST(GCC)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user