https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126305
--- Comment #19 from dave.anglin at bell dot net --- On 2026-07-21 1:49 p.m., kargl at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126305 > > --- Comment #18 from Steve Kargl <kargl at gcc dot gnu.org> --- > Comment on attachment 65108 > --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65108 > Patch to provide additional long double math routines > > I think this is fine with the following caveats. > > In c99_protos.h, can you add a comment above the first > occurrence of the following idiom: > > +#if (defined(USE_LIBQUADLIB) || defined(HAVE_ACOS)) && !defined(HAVE_ACOSL) > > Something, like > > /* On HPUX, some long double functions are mapped to functions in > libquadmath, e.g., acosl(x) maps to acosq((__float128)x). */ Okay. > > This makes it clear to a future reader that some special handling is > occurring. > > In libgfortran/configure, the arithmetic has changed: > > -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) > +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << > 31)) > > why? Yes, I know configure is a generated file. Are your autotools > at the correct version? I don't know why. The files were regenerates with autoconf/autoheader 2.69. I'll regenerate files onlinux before committing. > > In c99_functions.c, can you repeat the comment from c99_protos.h > above the first occurence of > > +#if (defined(USE_LIBQUADLIB) || defined(HAVE_ERF)) && !defined(HAVE_ERFL) Okay. > > Finally, I notice that you are pulling in some fdlibm code with > the a Sun Microsystem license. I don't know if this is considered > compatible with GPLv3 with library exception. Can you check that this > is ok with a GCC maintainer? I'll check. Glibc has the same code but in separate files. Using separate files makes it clear what code the license statement applies to. Another alternative is to call the routines in libquadmath but that requires support for the __float128 type. The glibc LICENSES file contains this statement: This file contains the copying permission notices for various files in the GNU C Library distribution that have copyright owners other than the Free Software Foundation. These notices all require that a copy of the notice be included in the accompanying documentation and be distributed with binary distributions of the code, so be sure to include this file along with any binary distributions derived from the GNU C Library. Don't see anything similar in libquadmath. I don't know how GCC handles this issue.
