← New search

Other meanings of GNU Compiler Collection

SOFTWARE TOOLCHAIN

GNU Compiler Collection

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

1987
First public release
GCC history
Multiple
Supported languages
C, C++, Fortran, Ada, Go, and others
Many
Target architectures
Desktop, server, mobile, and embedded platforms
1

Role and architecture

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.

2

Languages, targets, and portability

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.

3

Development history and ecosystem

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

4

Lesser-known aspects

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.

Glossary

Front end
The language-specific part of a compiler that parses source code, checks its meaning, and produces an intermediate form.
Back end
The target-specific part that turns an intermediate representation into assembly or machine code for a processor architecture.
Cross-compilation
Building executable code on one system for execution on a different target system.
Intermediate representation
A compiler-internal form used to connect language processing with optimization and code generation.

GCC’s exact language front ends, supported targets, defaults, and optimization behavior vary across releases and configured toolchains.