[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

GCC 4.4 run-time license and non-GPLv3 compilers

Starting with version 4.4, the FSF the licenses the GCC run-time
library with a special exception:

| Under Section 7 of GPL version 3, you are granted additional
| permissions described in the GCC Runtime Library Exception, version
| 3.1, as published by the Free Software Foundation.

The exception is reproduced below.  Code covered by the exception
includes routines in gcc/libgcc2.c, which are linked statically with
many GCC-compiled programs, providing functionality like 64/64 -> 64
bit division for 32 bit architectures.  (It's not just the C++
unwinder, as I originally thought.)

At least with a strict interpretation, the run-time exception suffers
from a significant issue with compilers which are not licensed under a
GPLv3-compatible license (such as the GPLv2, or the QPL), and which
are implemented in the language itself.  (One such compiler is
Objective Caml.)  After compilation with GCC 4.4, such a compiler is a
"work based on GCC" because it links to the GCC run-time library.
Therefore, it's output cannot use the run-time library exception (it's
not the result of an Eligible Compilation Process because it's neither
the result of running "GCC, alone or with other GPL-compatible
software," nor "it is done without using any work based on GCC"), and
the resulting binary is covered by the GPLv3 (potentially among other
licenses).  Bootstrapping the compiler results in a
non-redistributable binary if the compiler is not licensed under a
GPLv3-compatible license (such as the QPL, in the Objective Caml

We might weasel out of this if we always bootstrap off GCC 4.3, but
this is not how the Objective Caml build system works (it bootstraps
the compiler off pre-compiled bytecode shipped along the sources).
Perhaps the above interpretation is too narrow, but I don't think it's
a fringe reading.  The FSF obviously wants to outlaw proprietary
compilers, and from a purely license-centric point of view, a
proprietary compiler is as good or bad as one licensed in a way which
is not compatible with the GPLv3.  What makes the license
interpretation some awkward is the bootstrapping process and its
recursive nature.

I've asked the FSF for a clarification (the second time, the first
clarification resulted in the Java bytecode exception).  Until we know
for sure how to interpret the exception, it's probably best not to
make GCC 4.4 the default compiler in sid/squeeze.


Version 3.1, 31 March 2009

Copyright (C) 2009 Free Software Foundation, Inc. <http://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

This GCC Runtime Library Exception ("Exception") is an additional
permission under section 7 of the GNU General Public License, version
3 ("GPLv3"). It applies to a given file (the "Runtime Library") that
bears a notice placed by the copyright holder of the file stating that
the file is governed by GPLv3 along with this Exception.

When you use GCC to compile a program, GCC may combine portions of
certain GCC header files and runtime libraries with the compiled
program. The purpose of this Exception is to allow compilation of
non-GPL (including proprietary) programs to use, in this way, the
header files and runtime libraries covered by this Exception.

0. Definitions.

A file is an "Independent Module" if it either requires the Runtime
Library for execution after a Compilation Process, or makes use of an
interface provided by the Runtime Library, but is not otherwise based
on the Runtime Library.

"GCC" means a version of the GNU Compiler Collection, with or without
modifications, governed by version 3 (or a specified later version) of
the GNU General Public License (GPL) with the option of using any
subsequent versions published by the FSF.

"GPL-compatible Software" is software whose conditions of propagation,
modification and use would permit combination with GCC in accord with
the license of GCC.

"Target Code" refers to output from any compiler for a real or virtual
target processor architecture, in executable form or suitable for
input to an assembler, loader, linker and/or execution
phase. Notwithstanding that, Target Code does not include data in any
format that is used as a compiler intermediate representation, or used
for producing a compiler intermediate representation.

The "Compilation Process" transforms code entirely represented in
non-intermediate languages designed for human-written code, and/or in
Java Virtual Machine byte code, into Target Code. Thus, for example,
use of source code generators and preprocessors need not be considered
part of the Compilation Process, since the Compilation Process can be
understood as starting with the output of the generators or

A Compilation Process is "Eligible" if it is done using GCC, alone or
with other GPL-compatible software, or if it is done without using any
work based on GCC. For example, using non-GPL-compatible Software to
optimize any GCC intermediate representations would not qualify as an
Eligible Compilation Process.

1. Grant of Additional Permission.

You have permission to propagate a work of Target Code formed by
combining the Runtime Library with Independent Modules, even if such
propagation would otherwise violate the terms of GPLv3, provided that
all Target Code was generated by Eligible Compilation Processes. You
may then convey such a combination under terms of your choice,
consistent with the licensing of the Independent Modules.

2. No Weakening of GCC Copyleft.

The availability of this Exception does not imply any general
presumption that third-party software is unaffected by the copyleft
requirements of the license of GCC.

Reply to: