Other meanings of GNU Compiler Collection
SOFTWARE TOOLCHAIN
The GNU Compiler Collection (GCC) is a GNU compiler suite supporting multiple programming languages and target platforms. It translates source code into assembly or machine code, while its driver coordinates preprocessing, compilation, assembly, and linking. GCC is distributed as free software under the GNU General Public License and is used in operating systems, embedded systems, scientific software, and other development environments.1
GCC is a compiler collection organized around language front ends, shared optimization infrastructure, and target-specific back ends. A front end parses a language such as C, C++, or Fortran and converts it into an intermediate representation; common optimization passes then transform that representation before a back end emits code for a selected processor.2
The GCC driver, usually invoked through commands such as gcc or g++, selects the relevant stages and tools. A normal build may involve preprocessing, compilation, assembly by GNU Assembler, and linking by GNU Linker. Options can stop the pipeline at intermediate stages, select optimization levels, define preprocessor symbols, or choose a target-specific instruction set.
GCC’s breadth comes from combining several language front ends with a large set of target back ends. In addition to C and C++, the project has supported languages including Fortran, Ada, Go, and D, although support levels and release status differ by language and version.2
The same source toolchain can be configured for native compilation or cross-compilation, in which code is built on one machine for another target. GCC has consequently been used on desktop and server processors as well as microcontrollers and other embedded architectures. Portability depends not only on GCC but also on the target’s application binary interface, runtime libraries, operating system, and available linker.
GCC began in 1987 as the GNU C Compiler and expanded into a broader collection as additional languages and targets were added.3 Its development helped establish a freely redistributable compiler foundation for the GNU Project and later became a central component of many Linux distributions.
GCC is maintained as a large international free-software project with a formal release process, regression testing, target maintainers, and language-specific communities. It commonly works alongside GNU Binutils, the GNU C Library, debuggers, build systems, and package tools. The compiler’s license is the GNU General Public License, with the GCC Runtime Library Exception applying to specified runtime components so that compiled applications can be distributed under their own terms.45
GCC is also a platform for compiler research and specialized toolchains, not merely a command-line program. Its internal representation, optimization passes, machine-description system, and plug-in interfaces allow developers to add analyses, transformations, diagnostics, and target support.6
Several practical distinctions are easy to miss. The command gcc can compile C++ source, but g++ additionally arranges common C++ linking behavior; the distinction is about driver defaults rather than two unrelated compilers. GCC can emit assembly, object files, dependency information, and diagnostic data, and it can produce code for a target different from the host through separately configured cross-toolchains. Its optimization choices may also change debugging behavior, binary size, performance, and reproducibility, so “more optimization” is not universally better.
GCC’s exact language front ends, supported targets, defaults, and optimization behavior vary across releases and configured toolchains.
Help improve the encyclopedia. Reports go straight to the site manager.