Generated by DeepSeek V3.2| GNU Compiler Collection | |
|---|---|
| Name | GNU Compiler Collection |
| Developer | GNU Project |
| Released | 22 March 1987 |
| Programming language | C, C++ |
| Operating system | Cross-platform |
| Genre | Compiler |
| License | GNU General Public License |
| Website | https://gcc.gnu.org/ |
GNU Compiler Collection. It is a comprehensive suite of compilers produced by the GNU Project, forming a cornerstone of free software development. Initially released in 1987 as the GNU C Compiler, it has evolved to support numerous programming languages and computer architectures. It is a critical component of the GNU toolchain and is the standard compiler for most Linux distributions and many BSD variants, enabling the creation of everything from operating system kernels to application software.
The project was initiated by Richard Stallman, founder of the GNU Project, with the original goal of creating a free compiler for the C language to build the GNU operating system. The first version was released in 1987, and its development was soon taken over by other programmers, with significant early contributions from individuals like Michael Tiemann. A pivotal moment occurred in 1997 with the formation of the GCC Steering Committee to oversee its evolution. Throughout its history, it has been a central project for entities like Cygnus Solutions and, later, Red Hat, which employ many of its principal developers. Its development process is highly collaborative, with contributions reviewed via mailing lists and its source code managed in a Git repository.
Its architecture is designed around a collection of front ends, a shared middle end, and multiple back ends. The front ends, such as those for C++ or Fortran, parse source code and generate an abstract syntax tree. This is converted into GENERIC and then GIMPLE, a language-independent intermediate representation central to its optimization framework. The middle end, containing the optimizer, performs most language-agnostic transformations on this representation. Finally, architecture-specific back ends, like those for x86 or ARM, generate the final assembly language or machine code. Key components include the linker GNU linker, though it is a separate project, and libraries like libgcc.
It provides front ends for a wide array of programming languages. Core supported languages include C, C++, Objective-C, Fortran, Ada, Go, and D. Experimental or less mature front ends have also existed for languages like Modula-2 and Mercury. Its support for hardware platforms is exceptionally broad, encompassing major instruction set architectures such as x86, ARM, MIPS, PowerPC, RISC-V, and SPARC. It is the default system compiler for Linux on most architectures and is also integral to BSD systems like FreeBSD and OpenBSD.
It is renowned for its powerful and extensive optimization capabilities, which are applied during the middle-end processing of GIMPLE. These include a vast suite of optimization passes for dead code elimination, loop optimization, inline expansion, and interprocedural optimization. It supports the generation of debugging information in formats like DWARF and profile-guided optimization via gprof. A significant feature is its support for multiple language standards, such as C11 and C++17, and extensions like those for OpenMP parallel programming. Its link-time optimization framework allows for whole-program analysis.
It is primarily used through its command-line drivers, such as `gcc` for C and `g++` for C++, which invoke the compiler proper, assembler, and linker. These drivers are fundamental to build automation tools like GNU Make, CMake, and Autotools. While it is a command-line tool, it is commonly integrated into integrated development environments like Eclipse and GNOME Builder. It also provides machine-readable output for tools like the Clang Static Analyzer and is used as a backend for other compilers, such as GNU Compiler for Java.
It is distributed under the terms of the GNU General Public License, specifically version 3 or later, which guarantees users the freedoms to use, study, share, and modify the software. This copyleft license ensures all derivative works remain free software. The source code is freely available from its official mirror sites and is a standard package in all major Linux distributions, such as Fedora and Debian. Its licensing model has been instrumental in its adoption by projects requiring a libre toolchain, including the Linux kernel and GNU Core Utilities.
Category:Compilers Category:GNU Project software Category:Free compilers and interpreters Category:1987 software