[petsc-dev] libm autodetection broken with -ffast-math

Jed Brown jed at jedbrown.org
Wed Apr 2 12:24:00 CDT 2014


"gcc -O3 -ffast-math" and "clang -O3 -fast-math" remove the calls in our
math checks, resulting in configure thinking that -lm is not required.
To fix the test, we have to ensure that the functions get called with
values not known at compile time, which will make the configure code
more complicated/less generic.  This may become an issue in other places
if compilers learn more about side-effect-free functions appearing in
libraries.

In the mean-time, you can configure with LIBS=-lm.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140402/83bd44b6/attachment.sig>


More information about the petsc-dev mailing list