Math changes in glibc 2.31

Damien Zammit
Mon May 11 22:53:33 GMT 2020

On 11/5/20 9:05 pm, Florian Weimer wrote:
> * Damien Zammit:
>> I heard that binaries previously compiled with `-ffast-math
>> -fno-finite-math-only` won't run on new systems.  Why did this have to
>> change?  This is going to create havoc especially with audio packages
>> that heavily optimise.
> What failures did you see?  It's hard to comment on rumors.

Actually, it is the flag -ffinite-math-only and any other flags that imply it
that causes symbols such as "expf_finite" to be created in binaries,
but apparently the new glibc 2.31 does not define these symbols anymore.

A workaround we found was that when using -ffast-math, we should also use -fno-finite-math-only,
but that has other implications regarding NaN/Inf values and other vectorised instructions
on arm for example.

Are you aware of this and do you have a recommended solution?

Damien Zammit

More information about the Libc-alpha mailing list