ArchWiki / GNU Compiler Collection
ArchWiki / GNU Compiler Collection
es:GNU Compiler Collection fr:GNU Compiler Collection ja:GNU Compiler Collection pt:GNU Compiler Collection ru:GNU Compiler Collection zh-hans:GNU Compiler Collection
The GNU Compiler Collection (GCC) is part of the GNU toolchain and includes front ends for C and C++.
Installation
Other available front-ends are:
gcc-gcobol for Cobol
gcc-fortran for Fortran
gcc-objc for Objective-C
Old versions
Old versions of GCC may be useful for historical curiosity, old projects that cannot be compiled on the current versions, or for testing the compatibility of projects:
GCC 14: gcc14
GCC 13: gcc13
GCC 12: gcc12
GCC 11: gcc11
GCC 10: gcc10
GCC 9: gcc9
GCC 8: gcc8
GCC 7: gcc7
GCC 6: gcc6
GCC 5: gcc5
GCC 4.9: gcc49
GCC 4.8: gcc48
GCC 4.7: gcc47
GCC 4.6: gcc46
GCC 4.5: gcc45
GCC 4.4: gcc44
GCC 4.3: gcc43
Other front-ends for old versions of GCC may be found on the official repositories and the AUR by searching for gcc<version_without_period>, e.g. searching for gcc9 for GCC 9 front-ends.
Use the CC (for C)https://cmake.org/cmake/help/latest/envvar/CC.html and CXX (for C++)https://cmake.org/cmake/help/latest/envvar/CXX.html environment variables to specify which version of GCC will be used with e.g make or cmake. For example:
$ export CC=gcc-12 CXX=g++-12