0

Suppose I took the libstc++ implementation of a C++ standard class, and modified it (so now I have, say, a magic_vector based off of the code for std::vector).

What licensing restrictions does that imply for that file specifically and for projects using it? I'm asking about libstdc++ specifically because

  • I read here that libstdc++ is not simply GPL-licensed.
  • I see the GPL mentioned in its licensing info, but doesn't the FSF use the "LGPL" for libraries? Edit The FAQ explains that the GPL-with-exception is similar to the LGPL in some cases, so then - why not the LGPL then? What's the difference?
einpoklum
  • 2,478
  • 1
  • 13
  • 30
  • You second point is addressed two bullets down in the FAQ you link to. – Mat Oct 19 '16 at 08:06
  • @Mat: Well, partially, but I don't quite get the nuance of that thing. See edit. – einpoklum Oct 19 '16 at 08:56
  • @einpoklum I don't see what's unclear about https://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.license.lgpl, did you miss that and read another part of the FAQ instead? If it is unclear, can you explain in more detail what part you're having trouble with? – hvd Oct 19 '16 at 10:32

1 Answers1

1

What licensing restrictions does that imply for that file specifically

GPL. You must provide the source of that file, exactly as used for building, to anybody who got the binary that includes it from you.

and for projects using it?

Only those for the file itself, as long as the file itself is a reasonably self-contained component. The gcc library exception stops the license from applying to the rest of the project.

why not the LGPL then? What's the difference?

Because the gcc library exception is more permissive. LGPL only stops at a dynamic link boundary. You can't link a C++ template dynamically, since it is instantiated directly into the compilation unit using it, so LGPL would have been exactly equivalent to GPL for libstdc++. The gcc library exception stops at the program interface even if linked statically.

Jan Hudec
  • 18,250
  • 1
  • 39
  • 62