wakatonoの戯れメモ

はてなダイアリーから引っ越してきました。

libgnuなどがリンクされたものの扱い

gccに付属するライブラリ、たとえばlibstdc++v3とか libgnu の話ですが…。
gccは、整数演算のルーチンなどをライブラリとして持っており、実行ファイルには確かにlibgnuなどのライブラリをリンクします。これらのライブラリはgccの一部であり、GPLが付与されていますが、特定の使用条件下での例外も存在します。

結論ですが、単にリンクするだけならば、GPLによる制限を受けないと解釈できます。

例として libio/stdfiles.c にある記述を以下に引用しますが、


As a special exception, if you link this library with files
compiled with a GNU compiler to produce an executable, this does
not cause the resulting executable to be covered by the GNU General
Public License. This exception does not however invalidate any
other reasons why the executable file might be covered by the GNU
General Public License.
となっています。
その他、あと、libgnu.a を作成するために必要なファイルの1つを見てみると、


In addition to the permissions in the GNU General Public License, the
Free Software Foundation gives you unlimited permission to link the
compiled version of this file into combinations with other programs,
and to distribute those combinations without any restriction coming
from the use of this file. (The General Public License restrictions
do apply in other respects; for example, they cover modification of
the file, and distribution when not linked into a combine
executable.)

という記述があります。

…これ以上の解説必要ですか?(汗)