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

Quad-float math library: licence question

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 (, 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?


PS: Initial discussion thread on this was here:

Attachment: quadmath.tar.gz
Description: GNU Zip compressed data

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