This is the mail archive of the
mailing list for the GCC project.
Re: Quad-float math library: licence question
- From: Jerry DeLisle <jvdelisle at verizon dot net>
- To: FX <fxcoudert at gmail dot com>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 13 Aug 2010 08:08:33 -0700
- Subject: Re: Quad-float math library: licence question
- References: <A1C88B53-2820-4DA6-90D7-C1F403D7B0B4@gmail.com>
On 08/13/2010 07:23 AM, 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?
First, I would ask FSF to at least get some foundation for whatever we do.
Second, can we define a F95 module interface so that one can simply do USE
QUADsomename and have that automatically link in the separate library.
Third, can we not expand our current dtoa code to handle quad. Our current code
is fairly flexible I think. (I have not reviewed your code yet)