Another RFC: regex in libiberty

Ian Lance Taylor ian@zembu.com
Thu Jun 7 18:43:00 GMT 2001


DJ Delorie <dj@delorie.com> writes:

> > gdb already ships with gnu-regex.c.  Why not just move that to
> > libiberty?
> 
> Because gdb, tcl, expect, cygwin, and gcc each have a copy of regex,
> and they're all different.  Which to choose?

The ones in gdb and gcc are basically the same.  TCL and Expect are
not GNU projects, and will continue to have their own regex code.
Cygwin has different licensing constraints; cygwin already has its own
copy of getopt, for instance.

> > I can't see any reason for a BSD-licensed regex in libiberty.
> > libiberty already GPL code.
> 
> Any regex added to libiberty becomes part of newlib and cygwin as
> well, and those projects are sensitive to GPL vs non-GPL licensing
> issues.

I see no reason to confuse the regex in libiberty with the regex in
newlib and cygwin, any more than there is to confuse the getopt in
libiberty.  regex in libiberty should satisfy the needs of GNU tools,
and as such I think it is appropriate to use the GNU regex.  Of
course, if the GNU regex is inferior, then it might make sense to
choose something else.  But I don't think we should avoid using GNU
code for GNU tools because of licensing issues for non-GNU tools.

Ian



More information about the Binutils mailing list