newlib's libc now has dependencies on libm

Jeff Johnston
Fri Jun 26 11:01:00 GMT 2009

Richard Earnshaw wrote:
> I've just seen a sudden large increase in the number of gcc testsuite
> failures for ARM after updating my newlib sources.  It looks like libc
> has quietly (probably erroneously) grown a link-time dependency on libm:
> libc.a:lib_a-strtod.o:         U __fpclassifyd
> libc.a:lib_a-svfprintf.o:         U __fpclassifyd
> libc.a:lib_a-svfscanf.o:         U __fpclassifyd
> libc.a:lib_a-svfwprintf.o:         U __fpclassifyd
> libc.a:lib_a-svfwscanf.o:         U __fpclassifyd
> libc.a:lib_a-vfprintf.o:         U __fpclassifyd
> libc.a:lib_a-vfscanf.o:         U __fpclassifyd
> libc.a:lib_a-vfwprintf.o:         U __fpclassifyd
> libc.a:lib_a-vfwscanf.o:         U __fpclassifyd
> libc.a:lib_a-wcstod.o:         U __fpclassifyd
> libm.a:lib_a-s_fpclassify.o:00000000 T __fpclassifyd
> My guess is that this was caused by the following change:
> 2009-06-16  Craig Howland <>
>         * libc/include/math.h:  Simplify fpclassify, isinf, isnan, and signbit
>         macros to remove un-necessary extension use.  isinf and isnan also
>         changed to use fpclassify.  isfinite macro modified to run faster by
>         only calling fpclassify once instead of possibly twice.
Good catch.  There are a set of math objs in libc that we copy over in 
the top-level
Changing infinity testing to use fpclassify caused the problem.  I have 
added the fpclassify routines to
the MATHOBJS_IN_LIBC list and regenerated

2009-06-23  Jeff Johnston  <>

        * (MATHOBJS_IN_LIBC): Add s_fpclassify and
        sf_fpclassify as these are now used for infinity testing.
        * Regenerated.

-- Jeff J.

More information about the Newlib mailing list