This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran,ping] support for large kinds in front-end and library


> Now, we fail ithe testsuite with
> /home/kargl/gcc/obj41/i386-unknown-freebsd7.0/./libgfortran/.libs/\
> libgfortran.so: undefined reference to `asinl'
> [snip many more]
> 
> These, of course, are the C99 long double math functions.  I suspect
> many (most?) non-glibc based systems will not have these functions
> in libm.

Well, I thought the patch included a mechanism to prevent that (I can
remember writing it, but now I cannot find it anywhere...). The
generated files need to be protected with conditionnals such as
HAVE_GFC_REAL_10, but with HAVE_ATAN2L too. That way, you get a linker
error only when you call a function that is not available on your
system. I think that is the best we can do.

> So, we need to have configure check if these exists in libm,
> and if not, we need to provide implementations.

Well, I don't think it's our job to provide implementations. On
systems that incompletely support extended floating-points, we can
support them incompletely. We're not trying to write a complete OS :)

Or, we could provide degraded functions that use the double type ones:

#ifndef HAVE_ATAN2L
long double atan2l (long double x) { return (long double) atan2 ((double) x); }
#endif

-- 
FX


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]