Richard Sandiford richard.sandiford@arm.com
Mon May 11 11:38:42 GMT 2020


The usual caveat applies that we can't provide legal advice.  But this
seems like a question about what code is covered by what licence,
which is definitely on-topic.

"Keil, Jochen via Gcc-help" <gcc-help@gcc.gnu.org> writes:
> Dear all,
> In our team we are employing GCC for embedded products which require statically linked binaries. Our own code is proprietary, hence we would like to make use of the GPL-3.0+ Runtime Exception. We do not modify the GCC nor use Plugins to modify intermediate code, therefore I think we are allowed to link our object code statically with libgcc without releasing our proprietary source code.
> However, upon closer inspection of the GCC sources I found that the files in the `libcc1` and `libcpp` folders do only carry the licensing terms of GPL-3.0+ without any mention of the Runtime Exception. Is it still valid to use those libraries with statically linked proprietary code?

libcc1 and libcpp are effectively parts of compiler itself, but built as
a library.  Like you say, this maans that they are covered by the full GPL.

However, libcc1 and libcpp are "host" libraries rather than target
libraries.  I.e. they're designed to run on the machine that runs the
compiler, not on the target machine that runs code built by the compiler
(in cases where there the two are different).  This is in contrast to
libgcc and libstdc++-v3, which are target libraries.

In case this is your concern: the compiler won't link against libcc1 and
libcpp unless you explicitly tell it to.  So code built by the compiler
won't include libcc1 and libcpp unless you choose to link them in.


More information about the Gcc-help mailing list