libm -fno-builtin
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Thu Jun 21 21:56:00 GMT 2018
Jon Beniston wrote:
> This causes a problem for sqrtl when _LDBL_EQ_DBL is defined. The call to
> sqrt is replaced with a sqrt instruction, so errno will not be set.
Yes that's another example which needs to use -fno-builtin(-sqrt) in the makefile.
> I can't see many improvements in the code otherwise (there's a few changes
> in scheduling) - but perhaps that is target specific.
It enables inlining of functions like lround, lrint and sqrt, and yes it only helps targets
which have inlines for those. Compilers can also do more optimization since math
functions become pure if errno is no longer assumed to be live after each call.
I've got a patch in review to change the default behaviour of GCC, so fixing any failing
cases now is good future proofing.
Wilco
More information about the Newlib
mailing list