Currently libjava doesn't check for the existance of math functions in libm before declaring them. This results in warnings on Darwin PPC... symbol _fabsf used from dynamic library /usr/lib/libm.dylib(fabs.o) not from earlier dynamic library /sw/lib/gcc4/lib/libgcj.8.dylib(sf_fabs.o) symbol _fabs used from dynamic library /usr/lib/libm.dylib(fabs.o) not from earlier dynamic library /sw/lib/gcc4/lib/libgcj.8.dylib(s_fabs.o) symbol _scalbn used from dynamic library /usr/lib/libm.dylib(scalb.o) not from earlier dynamic library /sw/lib/gcc4/lib/libgcj.8.dylib(s_scalbn.o/sw/lib/odcctool s/bin/ld: warning suggest use of -bind_at_load, as lazy binding may result in errors or different symbols being used ) creating gappletviewer
We should be using wrappers like libgfortran/intrinsics/c99_functions.c does. In this case we need... Index: classpath/native/fdlibm/sf_fabs.c =================================================================== --- classpath/native/fdlibm/sf_fabs.c (revision 117342) +++ classpath/native/fdlibm/sf_fabs.c (working copy) @@ -19,6 +19,8 @@ #include "fdlibm.h" +#ifndef HAVE_FABSF +#define HAVE_FABSF 1 #ifdef __STDC__ float fabsf(float x) #else @@ -31,9 +33,12 @@ SET_FLOAT_WORD(x,ix&0x7fffffff); return x; } +#endif #ifdef _DOUBLE_IS_32BITS +#ifndef HAVE_FABS +#define HAVE_FABS 1 #ifdef __STDC__ double fabs(double x) #else @@ -43,5 +48,6 @@ { return (double) fabsf((float) x); } +#endif #endif /* defined(_DOUBLE_IS_32BITS) */ Index: classpath/native/fdlibm/s_scalbn.c =================================================================== --- classpath/native/fdlibm/s_scalbn.c (revision 117342) +++ classpath/native/fdlibm/s_scalbn.c (working copy) @@ -32,6 +32,8 @@ twom54 = 5.55111512312578270212e-17, / huge = 1.0e+300, tiny = 1.0e-300; +#ifndef HAVE_SCALBN +#define HAVE_SCALBN 1 #ifdef __STDC__ double scalbn (double x, int n) #else @@ -63,3 +65,4 @@ tiny = 1.0e-300; return x*twom54; } #endif /* _DOUBLE_IS_32BITS */ +#endif -- Summary: autoconf should be used in libjava to check for fabs, fabsf and scalbn Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: howarth at nitro dot med dot uc dot edu GCC build triplet: powerpc-apple-darwin8 GCC host triplet: powerpc-apple-darwin8 GCC target triplet: powerpc-apple-darwin8 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29304