Quad-float math library: licence question

FX fxcoudert@gmail.com
Fri Aug 13 14:35:00 GMT 2010


Dear all,

Here's an update on my work towards quad-float (aka __float18, aka binary128) support in Fortran. I've worked on runtime library support, and came to the conclusion that building wrappers around MPFR was not the right way to go. It is quite impractical, as it requires an MPFR target library. Moreover, it is quite inefficient.

Thus, I have lifted a binary128 math library from glibc, which contains one. It took some rewriting to make it standalone (the glibc sources are a bit convoluted to my taste). I combined that with David M. Gay's gdtoa routines (http://www.netlib.org/fp/), which I stripped down to the essentials needed for __float128). The resulting libquadmath library (with simple Makefile) is attached to this mail.

Technically, this  works very well. The question of integration is now more a question about licences:

  -- some of the math code comes from Cephes; it has liberal licencing, and was included into glibc under the LGPL
  -- the rest of the math code comes from fdlibm, with very liberal licencing
  -- the gdtoa code licencing is also pretty liberal; it's already used in a variety of projects

So, the question is: how do we manage this? I suppose because of the LGPL licence, direct integration into libgfortran is out of the question. I see three options :

  -- ask the FSF (who owns the glibc, after all) to relicence this code under the GPL + exception, so we can integrate everything into libgfortran
  -- keep this as a separate package, and allow libgfortran to be configured with it (this seems like a very wrong solution)
  -- have it inside libgfortran, but in a separate library, which is linked in when quad-float support is requested; document the licence difference in the manual

I can proceed with any of the three, or any other option that the maintainers think is best. So, what do people think about this?

Regards,
FX


PS: Initial discussion thread on this was here: http://gcc.gnu.org/ml/gcc/2010-05/msg00452.html


-------------- next part --------------
A non-text attachment was scrubbed...
Name: quadmath.tar.gz
Type: application/x-gzip
Size: 259482 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100813/94e4f08c/attachment.bin>


More information about the Gcc-patches mailing list