public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/29304]  New: autoconf should be used in libjava to check for fabs, fabsf and scalbn
@ 2006-10-01  3:51 howarth at nitro dot med dot uc dot edu
  2006-10-01  4:17 ` [Bug classpath/29304] " howarth at nitro dot med dot uc dot edu
  0 siblings, 1 reply; 2+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2006-10-01  3:51 UTC (permalink / raw)
  To: java-prs

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-02 21:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-29304-8172@http.gcc.gnu.org/bugzilla/>
2019-01-02 21:43 ` [Bug classpath/29304] autoconf should be used in libjava to check for fabs, fabsf and scalbn egallager at gcc dot gnu.org
2006-10-01  3:51 [Bug java/29304] New: " howarth at nitro dot med dot uc dot edu
2006-10-01  4:17 ` [Bug classpath/29304] " howarth at nitro dot med dot uc dot edu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).