This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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


On 08/13/2010 07:23 AM, FX wrote:
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?


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)

Regards,

Jerry


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