status of C99 math functions in newlib WRT libstdc++ crosses
Benjamin Kosnik
bkoz@redhat.com
Tue Oct 2 11:58:00 GMT 2001
Since this patch:
2001-09-10 Benjamin Kosnik <bkoz@redhat.com>
* configure.in: Fix cross compiling math routines. Correct
comments for cross compiling and limits. Add floating point math
routines found in newlib.
* configure: Regenerate.
* acconfig.h: Add macros.
There have been 6 unexpected fails during the g++ testsuite run:
A representative example is:
FAIL: g++.brendan/crash20.C (test for excess errors)
Where:
Executing on host: /mnt/hd/bld/bld-x86-x-powerpc-eabism/gcc/testsuite/../g++ -B/mnt/hd/bld/bld-x86-x-powerpc-eabism/gcc/testsuite/../ -nostdinc++ -I/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/powerpc-eabism -I/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include -I/mnt/hd/src/src.gcc-merged/libstdc++-v3/libsupc++ -I/mnt/hd/src/src.gcc-merged/libstdc++-v3/libio -I/mnt/hd/src/src.gcc-merged/libstdc++-v3/include/backward -I/mnt/hd/src/src.gcc-merged/libstdc++-v3/testsuite -fmessage-length=0 -ansi -pedantic-errors -Wno-long-long -c -I/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism//newlib/targ-include -I/mnt/hd/src/src.gcc-merged/newlib/libc/include -o /mnt/hd/bld/bld-x86-x-powerpc-eabism/gcc/testsuite/crash20.o /mnt/hd/src/src.gcc-merged/gcc/testsuite/g++.old-deja/g++.brendan/crash20.C (timeout = 300)
In file included from /mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_complex.h:43,
from /mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/complex:36,
from /mnt/hd/src/src.gcc-merged/gcc/testsuite/g++.old-deja/g++.brendan/crash20.C:3:
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h: In function `float std::acos(float)':
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h:95: `::acosf' undeclared (first use here)
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h: In function `float std::asin(float)':
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h:113: `::asinf' undeclared (first use here)
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h: In function `float std::atan(float)':
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h:131: `::atanf' undeclared (first use here)
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h: In function `float std::atan2(float, float)':
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h:149: `::atan2f' undeclared (first use here)
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h: In function `float std::ceil(float)':
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h:169: `::ceilf' undeclared (first use here)
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h: In function `float std::cosh(float)':
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h:197: `::coshf' undeclared (first use here)
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h: In function `float std::exp(float)':
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h:215: `::expf' undeclared (first use here)
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h: In function `float std::floor(float)':
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h:243: `::floorf' undeclared (first use here)
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h: In function `float std::fmod(float, float)':
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h:261: `::fmodf' undeclared (first use here)
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h: In function `float std::ldexp(float, int)':
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h:300: `::ldexpf' undeclared (first use here)
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h: In function `float std::log(float)':
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h:320: `::logf' undeclared (first use here)
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h: In function `float std::log10(float)':
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h:338: `::log10f' undeclared (first use here)
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h: In function `float std::modf(float, float*)':
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h:356: `::modff' undeclared (first use here)
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h: In function `float std::pow(float, float)':
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h:395: `::powf' undeclared (first use here)
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h: In function `float std::sinh(float)':
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h:437: `::sinhf' undeclared (first use here)
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h: In function `float std::tan(float)':
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h:465: `::tanf' undeclared (first use here)
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h: In function `float std::tanh(float)':
/mnt/hd/bld/bld-x86-x-powerpc-eabism/powerpc-eabism/libstdc++-v3/include/bits/std_cmath.h:483: `::tanhf' undeclared (first use here)
compiler exited with status 1
...needless to say, this is a major drag, and needs to be fixed. It's
my fault, so I'd like to take care of it.
After looking at the newlib sources and seeing float version for
these, and running nm on the built libm.a for powerpc-eabisim, I see
definitions for all of these.
%nm libm.a |grep acoshf
00000004 T __ieee754_acoshf
U __ieee754_acoshf
00000004 T acoshf
However, the header math.h has this:
#ifndef _REENT_ONLY
extern float acoshf _PARAMS((float));
...
#endif
What's up with this? Jeff, I noticed your name on the ChangeLog
entries for this stuff. Can you explain the divergence between the
library and the header, and recommend what libstdc++ should do?
thanks,
benjamin
More information about the Libstdc++
mailing list