The `-ffast-math` compiler option enables a mode of floating point semantics
that are heavily relaxed from strict IEEE 754 conformance in the name of speed.¹
The permissible optimizations under `-ffast-math` include transformations that
produce floating point results most users would consider wrong. It is unclear
why “do math fast but incorrectly” is a useful mode. It seems the world is
finally coming around to this tenet.²
This change stops enabling `-ffast-math` anywhere in the Autotools build system.
Gitlab: fixes #1412, #2296
Reported-by: Kasper Daniel Hansen
Reported-by: Ross Barnowski
¹ https://gcc.gnu.org/wiki/FloatingPointMath
² https://simonbyrne.github.io/notes/fastmath/,
https://moyix.blogspot.com/2022/09/someones-been-messing-with-my-subnormals.html
no longer suppresses `-ffast-math`. Users relying on this are encouraged to
investigate what in their build environment is appending a flag their C
compiler does not support.
+- The `-ffast-math` compiler flag is no longer enabled by the Autotools build
+ system.
+
+### Fixed
+
+- Issues with GCC 8, `-O3` and `-ffast-math` #1412
+- Problem building Graphviz-5.0.1: undefined symbols `__*_finite` #2296
### Removed
LDFLAGS="${LDFLAGS} -Wl,-headerpad_max_install_names"
;;
*-freebsd* )
- CFLAGS="${CFLAGS} -Wstrict-prototypes -Wpointer-arith -Wall -ffast-math"
+ CFLAGS="${CFLAGS} -Wstrict-prototypes -Wpointer-arith -Wall"
;;
* )
- CFLAGS="${CFLAGS} -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wall -ffast-math"
+ CFLAGS="${CFLAGS} -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wall"
;;
esac
;;