Skip to content

Commit

Permalink
make configure attempt to catch broken floating point CFLAGS/defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
richfelker committed Feb 17, 2016
1 parent cf11505 commit 80fbaac
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,16 @@ printf "no\n"
fail "$0: error: unsupported long double type"
fi

#
# Some build systems globally pass in broken CFLAGS like -ffast-math
# for all packages. On recent GCC we can detect this and error out
# early rather than producing a seriously-broken math library.
#
if trycppif "__FAST_MATH__ || (defined(__GCC_IEC_559) && __GCC_IEC_559==0)" \
"$CFLAGS_C99FSE $CPPFLAGS $CFLAGS" ; then
fail "$0: error: compiler has broken floating point; check CFLAGS"
fi

printf "creating config.mak... "

cmdline=$(quote "$0")
Expand Down

0 comments on commit 80fbaac

Please sign in to comment.