From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15832 invoked by alias); 1 Oct 2006 03:51:15 -0000 Received: (qmail 15810 invoked by uid 48); 1 Oct 2006 03:51:15 -0000 Date: Sun, 01 Oct 2006 03:51:00 -0000 Subject: [Bug java/29304] New: autoconf should be used in libjava to check for fabs, fabsf and scalbn X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: java-prs@gcc.gnu.org From: "howarth at nitro dot med dot uc dot edu" Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2006-q4/txt/msg00000.txt.bz2 List-Id: 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