LICENSEWARE

GNU toolchain and C library licensing

This article is about how the GNU licenses apply to GCC and its runtime libraries, the GNU C Library, GNU Bash, GNU Coreutils and GNU manuals. For the licenses in general see GNU Project licensing. It is not legal advice.

On This Page

GNU toolchain and C library licensing covers the licenses of core GNU packages on GNU/Linux systems, where glibc provides the core libraries:[16] the GNU Compiler Collection (GCC) and its runtime libraries, the GNU C Library (glibc), GNU Bash and GNU Coreutils. The compiler itself is licensed under the GNU GPL “either version 3, or (at your option) any later version”.[3] Code that GCC links into compiled programs carries an additional permission, the GCC Runtime Library Exception.[4] glibc uses the Lesser GPL.[9] None of these packages is sold or metered.

Editions

Component License notice SPDX expression 
GCC compiler GPL version 3 or later[3] GPL-3.0-or-later 
GCC runtime libraries (libgcc, libstdc++ and others) GPL version 3 or later with the GCC Runtime Library Exception 3.1[4][5] GPL-3.0-or-later WITH GCC-exception-3.1[6] 
GNU C Library LGPL version 2.1 or later[9] LGPL-2.1-or-later 
GNU Bash GPL version 3 or later[12] GPL-3.0-or-later 
GNU Coreutils GPL version 3 or later[13] GPL-3.0-or-later 
Coreutils documentation GFDL version 1.3 or later[14] GFDL-1.3-or-later 

The GNU C Library project page states the license as the LGPL “either version 2 of the License, or (at your option) any later version”.[8] The file notices in the glibc source tree state version 2.1 or later.[9] SPDX notes that its identifier for the exception is “typically used with GPL-3.0-or-later”.[6] See Core GNU packages are GPL-3.0-or-later.

Metrics

None. Compiling, running and deploying these components internally is not counted or charged.[7]

Counting / floors

Compiling proprietary software with GCC

According to the FSF, the copyright on editors and tools such as GCC “does not cover the code you write”. Using them places no legal restriction on the license of the output, except where a tool copies parts of itself into that output.[7] GCC does copy code into compiled programs: it “may combine portions of certain GCC header files and runtime libraries with the compiled program”. The Runtime Library Exception exists “to allow compilation of non-GPL (including proprietary) programs” to use them.[1]

Section 1 of the exception grants permission to propagate Target Code that combines the Runtime Library with Independent Modules “even if such propagation would otherwise violate the terms of GPLv3”, provided all Target Code was generated by Eligible Compilation Processes.[1] A compilation is Eligible if it uses GCC alone or with GPL-compatible software, or uses no work based on GCC. Using non-GPL-compatible software to optimize GCC intermediate representations is not Eligible.[1] The FSF’s rationale says this condition was added so the GCC plugin framework could not be used to create proprietary extensions to the compiler.[2] See the GCC exception rule.

Linking to the GNU C Library

Programs linked to glibc fall under the LGPL’s linking permission. LGPL-2.1 section 6 allows a work that uses the library to be combined with it and distributed “under terms of your choice”, provided the terms allow modification for the customer’s own use and reverse engineering to debug such modifications.[11] The FSF’s reading is that static linking requires providing the application in object form so it can be relinked. Dynamic linking to a copy of the library already on the user’s computer does not require conveying the library’s source.[7] See LGPL linking.

Third-party notices in glibc

glibc contains code with copyright owners other than the FSF, including code from 4.4 BSD and the BIND resolver, under permissive licenses. These are collected in the LICENSES file. According to that file, the notices must be included in the accompanying documentation and distributed with binary distributions, “so be sure to include this file along with any binary distributions derived from the GNU C Library”.[10] See the glibc rule.

Bash, Coreutils and shell scripts

Bash and Coreutils are programs, not libraries.[12][13] The FSF states that installing a GPL program and an unrelated nonfree program on the same computer is permitted, and that an aggregate of separate programs on one medium may include nonfree programs.[7] Shipping Bash or Coreutils binaries in an appliance or image to customers is distribution, with the source and notice obligations described in GNU GPL, LGPL and AGPL obligations.[7]

Manuals

GNU manuals are commonly under the GFDL.[14] GFDL 1.3 permits copying “either commercially or noncommercially” if the license and notices are reproduced and no other conditions are added. Publishing more than 100 printed or opaque copies brings additional duties.[15] See the GFDL rule.

Virtualization & partitioning

Not applicable: the licenses do not count processors or instances.[7] Base container images that bundle glibc, Bash and Coreutils bring the redistribution obligations into force when they are given to other parties.[7][10]

Cloud / BYOL

Not applicable. None of these components is licensed under the AGPL, and running GPL software to provide a network service is not distribution under the GPL.[7]

Programs

The GNU Project sells no support for these packages. glibc releases every six months, with 2.44 the current stable version, released on 2026-07-25.[16] GCC lists 16.2, 15.3 and 14.4 as supported releases receiving regression fixes and documentation changes.[17] See the release rule.

Compliance

The FSF holds the copyright in many GNU packages, including GCC and GNU Emacs,[19] and in GNU Bash. It acts on reported violations and asks for compliance rather than damages.[18] See FSF enforcement.

Out of scope

This article does not cover the kernel Linux, non-GNU compilers and C libraries such as LLVM or musl, GNU packages not named above, or the licenses of software built with GCC.

References

  1. GCC Runtime Library Exception, version 3.1Effective 2009-03-31. Retrieved 2026-09-27.
  2. GCC Runtime Library Exception Rationale and FAQRetrieved 2026-09-27.
  3. GCC source file header (gcc/gcc.cc)Retrieved 2026-09-27.
  4. GCC runtime source file header (libgcc/libgcc2.c)Retrieved 2026-09-27.
  5. The GNU C++ Library manual, LicenseRetrieved 2026-09-27.
  6. SPDX License List: GCC Runtime Library exception 3.1Retrieved 2026-09-27.
  7. Frequently Asked Questions about the GNU LicensesRetrieved 2026-09-27.
  8. The GNU C LibraryRetrieved 2026-09-27.
  9. GNU C Library source file header (stdio-common/printf.c)Retrieved 2026-09-27.
  10. GNU C Library LICENSES fileRetrieved 2026-09-27.
  11. GNU Lesser General Public License, version 2.1Version 2.1, February 1999.Retrieved 2026-09-27.
  12. GNU BashRetrieved 2026-09-27.
  13. GNU Coreutils source file header (src/ls.c)Retrieved 2026-09-27.
  14. GNU Coreutils READMERetrieved 2026-09-27.
  15. GNU Free Documentation License, version 1.3Effective 2008-11-03. Retrieved 2026-09-27.
  16. The GNU C Library (glibc) project siteRetrieved 2026-09-27.
  17. GCC, the GNU Compiler CollectionRetrieved 2026-09-27.
  18. License Violations and ComplianceRetrieved 2026-09-27.
  19. FSF Licensing & Compliance TeamRetrieved 2026-09-27.

See also

Catalog Rows Cited

7Rules

Esc