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: Quad-float math library: licence question


FX wrote:

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?

I will discuss this on the SC mailing list (which includes RMS, so the path to the FSF is not *that* long :-)


Can you say something more about the gdtoa code license (IIRC, fdlibm is already included in glibc) ?

One obvious question I see coming is "why can't you just *call* the binary128 routines in glibc ?", so I have to understand that bit first (otherwise I'm bound to get into a slow back-and-forth between you and me).

Cheers,

--
Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/
Progress of GNU Fortran: http://gcc.gnu.org/gcc-4.5/changes.html#Fortran


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