This is the mail archive of the gcc@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]

Re: Recent libstdc++-v3 cmath.cc doesn't compile on alphaev6-unknown-linux-gnu


I wrote:

> Zack Weinberg wrote:

> > If this is glibc 2.1, the acosl prototype is (should be) created by
> > evil macros in math.h and bits/mathcalls.h.
> 
> > $ cpp /usr/include/math.h |grep acosl
> > extern long double acosl (long double __x);
> > extern long double __acosl (long double __x);
> 
> Not over here:
> 
> $ cpp /usr/include/math.h | grep acos
> extern   double          acos          (double  __x)    ; extern
> double         __acos          (double  __x)      ;
> extern   double          acosh          (double  __x)    ; extern
> double         __acosh          (double  __x)      ;
> extern   float          acosf         (float   __x)    ; extern
> float         __acosf         (float   __x)      ;
> extern   float          acoshf         (float   __x)    ; extern
> float         __acoshf         (float   __x)      ;
> 
> Is there something simple I can do to math.h or bits/mathcalls.h that
> would solve this ?

It turns out that on my system the prototypes for long double math
routines are not generated because /usr/include/bits/mathdef.h sets
__NO_LONG_DOUBLE_MATH.  Therefore, I applied the following patch to this
file, as long double math routines _are_ present in my system's (g)libc:

*** /usr/include/bits/mathdef.h.orig    Sat Jun 10 13:34:47 2000
--- /usr/include/bits/mathdef.h Sat Jun 10 13:35:14 2000
*************** typedef double double_t;
*** 74,80 ****
--- 74,82 ----
  #endif        /* ISO C 9X */
  
+ #if 0
  #ifndef __NO_LONG_DOUBLE_MATH
  /* Signal that we do not really have a `long double'.  The disables
the
     declaration of all the `long double' function variants.  */
  # define __NO_LONG_DOUBLE_MATH        1
+ #endif
  #endif

Now everything is well ...

Thanks, Zack and Steven !

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)

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