1<?xml version="1.0" encoding="ISO-8859-1"?> 2<!DOCTYPE html 3 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 5 6<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 7<head> 8 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 9 <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" /> 10 <meta name="KEYWORDS" content="libstdc++, license, licence" /> 11 <meta name="DESCRIPTION" content="Copying restrictions for libstdc++." /> 12 <meta name="GENERATOR" content="vi and eight fingers" /> 13 <title>libstdc++ copying</title> 14<link rel="StyleSheet" href="../lib3styles.css" type="text/css" /> 15<link rel="Start" rev="Copyright" href="../documentation.html" type="text/html" 16 title="GNU C++ Standard Library" /> 17</head> 18<body> 19 20<h1 class="centered"><a name="top">Licenses for the Library</a></h1> 21 22<p>There are two licenses affecting GNU libstdc++: one for the code, and 23 one for the documentation. Here we will describe both of them, and try 24 to answer some of the widespread questions. If you have more questions, 25 ask the FSF or the 26 <a href="http://gcc.gnu.org/lists.html">gcc mailing list</a>; the person 27 writing this page is a programmer, not a lawyer. 28</p> 29 30<hr /> 31 32<h2>The Code: Runtime GPL</h2> 33 34<p>The source code of libstdc++ is distributed under version 2 of the 35 <a href="COPYING">GNU General Public License</a>, with the so-called 36 "runtime exception," as follows (or see any header or 37 implementation file): 38</p> 39<pre> 40 As a special exception, you may use this file as part of a free software 41 library without restriction. Specifically, if other files instantiate 42 templates or use macros or inline functions from this file, or you compile 43 this file and link it with other files to produce an executable, this 44 file does not by itself cause the resulting executable to be covered by 45 the GNU General Public License. This exception does not however 46 invalidate any other reasons why the executable file might be covered by 47 the GNU General Public License. 48</pre> 49 50<p>Hopefully that text is self-explanatory. If it isn't, you need to speak 51 to your lawyer, or the Free Software Foundation. 52</p> 53 54<!-- Most of the Q&A's are based on, paraphrased from, and outright stolen 55 from this thread: 56 http://gcc.gnu.org/ml/libstdc++/2000-q2/subjects.html#00050 57--> 58<p><strong>Q: So any program which uses libstdc++ falls under the GPL?</strong> 59 <br />A: <strong>No.</strong> The special exception permits use of the 60 library in proprietary applications. 61</p> 62 63<p><strong>Q: How is that different from the GNU {Lesser,Library} 64 GPL?</strong> 65 <!-- Quoting Jason Merrill from the thread above: --> 66 <br />A: The LGPL requires that users be able to replace the LGPL code with a 67 modified version; this is trivial if the library in question is a C 68 shared library. But there's no way to make that work with C++, where 69 much of the library consists of inline functions and templates, which 70 are expanded inside the code that uses the library. So to allow people 71 to replace the library code, someone using the library would have to 72 distribute their own source, rendering the LGPL equivalent to the GPL. 73</p> 74 75<p><strong>Q: I see. So, what restrictions <em>are</em> there on 76 programs that use the library?</strong> 77 <br />A: None. We encourage such programs to be released as open source, 78 but we won't punish you or sue you if you choose otherwise. 79</p> 80 81<hr /> 82 83<h2>The Docs: GPL, FDL</h2> 84 85<p>The documentation shipped with the library and made available over the 86 web, excluding the pages generated from source comments, are copyrighted 87 by the Free Software Foundation, and placed under 88 the <a href="COPYING.DOC">GNU Free Documentation License version 1.1</a>. 89 There are no Front-Cover Texts, no Back-Cover Texts, and 90 <!-- as far as I know --> 91 no Invariant Sections. 92</p> 93 94<p> For documentation generated by doxygen or other automated tools 95via processing source code comments and markup, the original source 96code license applies to the generated files. Thus, the doxygen 97documents are licensed GPL. 98</p> 99 100<p>If you plan on making copies of the documentation, please let us know. 101 We can probably offer suggestions. 102</p> 103 104 105<!-- ####################################################### --> 106 107<hr /> 108<p class="fineprint"><em> 109Comments and suggestions about this page are welcome, and may be sent to 110<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>. 111Comments or questions about the licenses themselves are also welcome, and 112should be directed to the GCC list as descibed above. 113</em></p> 114 115 116</body> 117</html> 118 119 120