From: ellson Date: Fri, 16 Dec 2005 22:17:23 +0000 (+0000) Subject: make FP error trapping conditional on not using -ffast-math X-Git-Tag: LAST_LIBGRAPH~32^2~6921 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=45f343b8903a6fa209b1bf5fdbce7767cfb84ad8;p=graphviz make FP error trapping conditional on not using -ffast-math --- diff --git a/cmd/dot/dot.c b/cmd/dot/dot.c index 6ba014a9b..7a473952a 100644 --- a/cmd/dot/dot.c +++ b/cmd/dot/dot.c @@ -104,7 +104,6 @@ static void fpinit(void) _FPU_SETCW(fpe_flags); # endif #endif - signal(SIGFPE, fperr); } #endif @@ -145,7 +144,10 @@ int main(int argc, char **argv) #ifndef MSWIN32 signal(SIGUSR1, gvToggle); signal(SIGINT, intr); +#ifndef NO_FPERR fpinit(); + signal(SIGFPE, fperr); +#endif #endif if (MemTest) { diff --git a/configure.ac b/configure.ac index 342d48193..58c87613f 100644 --- a/configure.ac +++ b/configure.ac @@ -193,6 +193,11 @@ else ;; esac fi +# -ffast-math is incompatible with FP error trapping +# ref: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=175793 +if `echo ${CFLAGS} | grep -q ffast-math`; then + CFLAGS="${CFLAGS} -DNO_FPERR" +fi dnl ----------------------------------- dnl checks for other programs