When it was first released in 1987 by Richard Stallman, GCC 1.0 was named the GNU C Compiler since it only handled the C programming language.
[8][9] GCC has been ported to more platforms and instruction set architectures than any other compiler, and is widely deployed as a tool in the development of both free and proprietary software.
Most BSD family operating systems also switched to GCC shortly after its release, although since then, FreeBSD and Apple macOS have moved to the Clang compiler,[10] largely due to licensing reasons.
[11][12][13] GCC can also compile code for Windows, Android, iOS, Solaris, HP-UX, AIX and DOS.
[14] In late 1983, in an effort to bootstrap the GNU operating system, Richard Stallman asked Andrew S. Tanenbaum, the author of the Amsterdam Compiler Kit (also known as the Free University Compiler Kit) for permission to use that software for GNU.
[15] His initial plan was to rewrite an existing compiler from Lawrence Livermore National Laboratory from Pastel to C with some help from Len Tower and others.
[20] Described as the "first free software hit" by Peter H. Salus, the GNU compiler arrived just at the time when Sun Microsystems was unbundling its development tools from its operating system, selling them separately at a higher combined price than the previous bundle, which led many of Sun's users to buy or download GCC instead of the vendor's tools.
[21] While Stallman considered GNU Emacs as his main project, by 1990 GCC supported thirteen computer architectures, was outperforming several vendor compilers, and was used commercially by several companies.
In 1997, a group of developers formed the Experimental/Enhanced GNU Compiler System (EGCS) to merge several experimental forks into a single project.
Mergers included g77 (Fortran), PGCC (P5 Pentium-optimized GCC),[18] many C++ improvements, and many new architectures and operating system variants.
GCC is also available for many embedded systems, including Symbian (called gcce),[33] ARM-based, and Power ISA-based chips.
[43] A few experimental branches exist to support additional languages, such as the GCC UPC compiler for Unified Parallel C[47] or Rust.
Finally, machine code is produced using architecture-specific pattern matching originally based on an algorithm of Jack Davidson and Chris Fraser.
[52][needs update] On some platforms, the distribution also includes a low-level runtime library, libgcc, written in a combination of machine-independent C and processor-specific machine code, designed primarily to handle arithmetic operations that the target processor cannot perform directly.
Due to the syntax tree abstraction, source files of any of the different supported languages can be processed by the same back end.
This was simplified with the introduction of GENERIC and GIMPLE, two new forms of language-independent trees that were introduced with the advent of GCC 4.0.
GENERIC is an intermediate representation language used as a "middle end" while compiling source code into executable binaries.
[68] Some features of GCC include: The primary supported (and best tested) processor families are 64- and 32-bit ARM, 64- and 32-bit x86 64 and x86 and 64-bit PowerPC and SPARC.
[77] GCC target processor families as of version 11.1 include:[78] Lesser-known target processors supported in the standard release have included: Additional processors have been supported by GCC versions maintained separately from the FSF version: The GCJ Java compiler can target either a native machine language architecture or the Java virtual machine's Java bytecode.
Motorola 68000, Zilog Z80, and other processors are also targeted in the GCC versions developed for various Texas Instruments, Hewlett Packard, Sharp, and Casio programmable graphing calculators.