GCC: Anonymous read-only Git access
Our Git source repository is available read-only to the public at
large. That way you can pick up any version (including releases) of
GCC that is in our repository.
In addition, you can
browse our
Git history online.
(Our web pages are managed via Git in a
separate repository.)
Using the Git repository
Assuming you have
Git installed, you can
check out the GCC sources using the following command:
git clone https://gcc.gnu.org/git/gcc.git SomeLocalDir
If there is another local repository accessible you can avoid
re-downloading everything by using --reference, e.g.
git clone --reference original-gcc --dissociate https://gcc.gnu.org/git/gcc.git new-gcc
But if you own this other copy, you probably want to use
separate worktrees instead of multiple clones.
Our source tree contains a number of files that are generated
from other source files by build tools such as Bison, Autoconf, and
Gperf. Bison is now required when using Git to access our sources,
but all other generated files are included in the source tree so that
GCC can be built without these build tools. The Git checkout and
update operations do not insure that the timestamps of generated files
are later than those of the files they are generated from. The script
contrib/gcc_update updates the timestamps for all these
generated files. See the comments in that script for instructions on
running it.
GCC's build system (in particular Make) uses file timestamps to
determine if a generated file needs to be updated by running a particular
build tool. Because of this, GCC's build system may believe that
a generated file needs regenerating even though its source has not
changed, and require a particular build tool to rebuild that generated
file. If the appropriate build tool is installed on your system, then
this will not be a problem. If you do not intend to make changes to
the source, you can avoid installing these build tools by running
contrib/gcc_update.
There has been some discussion of removing these generated files
from GCC's Git source tree (there is no discussion of removing them
from the released source tarballs). If that happens then
building GCC from the Git source tree would require installing
the above mentioned build tools. Installing these build tools is not
particularly difficult, but can be time consuming especially if you
only occasionally install GCC on a particular system.
The build tools that GCC uses are all available from the GNU
Project (see https://www.gnu.org),
are often already available on many systems, and can often be found
already built for some systems. A partial list of these build tools
is: Autoconf, Bison, Xgettext, Automake, and Gperf.
Conflicts when using git pull
It is not uncommon to get Git conflict messages for some generated files
when updating your local sources from the Git repository. Typically such
conflicts occur with autoconf generated files. Such an error is of
the form:
error: Your local changes to the following files would be overwritten by merge:
gcc/configure
Please commit your changes or stash them before you merge.
Aborting
As long as you haven't been making modifications to the generated files
or the generator files, it is safe to revert the local differences
using git checkout on the affected files, then run
git pull again.
If you have changes you want to keep that result in such an error,
there are a few options. You can keep those changes on a local branch
rather than on a branch tracking upstream sources. If you wish to
keep those changes uncommitted, do git stash
before git pull and git stash pop
after git pull. If you commit them directly to your
local upstream-tracking branch, you may prefer to use git pull
--rebase instead of plain git pull.
A branch called branchname can be checked out with the
following command:
git checkout branchname
(The release branch of the GCC SERIES release series
is named releases/gcc-SERIES.)
Similarly a tag called tagname can be checked out with the
following command:
git checkout tagname
(The Git tag for GCC X.Y.Z is of the form
releases/gcc-X.Y.Z. Under the
release numbering scheme used for GCC 5 and later release
series, Y is always nonzero and Z is always zero for
a release, with other version numbers being used for development
versions.)
The following are some representative examples:
- releases/gcc-10 (a branch)
- releases/gcc-9 (a branch)
- releases/gcc-9.3.0 (a tag)
- releases/gcc-4.9 (a branch)
- releases/gcc-4.9.0 (a tag)
To get a list of available branches, after checking out any branch,
use the command:
git branch -a
Similarly, to list tags:
git tag -l
To view logs for a branch only up to the point at which it was
created, use the command git log origin/branchname
^origin/parentbranchname; for example:
git log origin/releases/gcc-9 ^origin/master
Git allows you to share the git object repository between multiple working
directories, each tracking a different branch. For instance, to create a
worktree for a release branch, do
git worktree add ../gcc-9 releases/gcc-9
To create a worktree for a new project branch based on master, do
git worktree add -b project ../project master
By default, a git clone operation will only fetch the
main development, release branches and their associated tags from the
server. This will be sufficient for most users, but a number of
additional branches can also be fetched if necessary.
The following areas exist on the server:
- refs/heads/master - The active development version of the
compiler.
- refs/heads/releases/* - Release branches.
- refs/heads/devel/* - topic-specific development branches
- see Active Development Branches.
Branches and tags in this space may be moved to refs/dead once active
development is completed or abandoned.
- refs/tags/* - tags for all of the above branches.
- refs/vendors/*/{heads,tags}/* - vendor-specific branches and
tags. These are owned and maintained by the respective
vendor, but made available publicly. Non-fast-forward pushes
are permitted on these branches.
- refs/users/*/{heads,tags}/* - personal developer branches and
tags. These are owned and maintained by the individual developer.
Non-fast-forward pushes are permitted on these branches.
- refs/dead/heads/* - completed or abandoned development
branches.
- refs/meta/config - local configuration data for the
commit hooks on the server.
- refs/deleted/*/{heads,tags}/* - old branches and tags
from the SVN repository that were deleted before the conversion to
git.
- refs/git-svn-old/* - various branches and tags from the
git-svn pre-conversion git mirror.
- refs/git-old/* - various branches and tags from the
git-svn pre-conversion git mirror that were local to that git
repository.
You can download any of the additional branches by adding a suitable
fetch specification to your local copy of the git repository. For
example, if your remote is called 'origin' (the default with git
clone) you can add the 'dead' development branches by running:
git config --add remote.origin.fetch "+refs/dead/heads/*:refs/remotes/origin/dead/*"
git config --add remote.origin.fetch "+refs/dead/tags/*:refs/tags/dead/*"
git fetch origin
which will place the dead branches in remotes/origin/dead
and the tags in tags/dead.
You can use git ls-remote to get a complete list of
refs that the server holds.
Active development branches have names starting devel/
in Git.
- ira-select
- This branch is for work on a new algorithm of calculations of
pseudo register classes. The new algorithm is based on choosing an
insn alternative first and then calculation of pseudo reg class
costs knowing the alternative. The branch is maintained by Vladimir
Makarov vmakarov@redhat.com.
- devel/omp/gcc-16
- This branch is for collaborative development of
OpenACC and
OpenMP support and related
functionality, such
as offloading support (OMP:
offloading and multi processing).
The branch is based on releases/gcc-16.
Please send patch emails with a short-hand
[og16] tag in the
subject line. This branch uses ChangeLog.omp files
that are occasionally updated automatically from the commit messages, so
please ensure that your commit messages include a valid ChangeLog section.
(Stale branches also exist for the prior GCC releases 9 to 15.)
- unified-autovect
- This branch is for work on improving effectiveness and generality of GCC's
autovectorization by performing target-aware reordering instruction selection
using unified representation. This branch is maintained by Sameera Deshpande
<sameera.deshpande@imgtec.com>.
- power-ieee128
- This branch is for community development of IEEE quad precision floating
point for Power ("ieee128"), replacing the "double double" aka "ibm128"
implementation we had for long double. The current focus is on Fortran
support.
No active branches
- c++-contracts
- This is the sandbox for renewed work on contracts for C++, that
didn't make it into C++20. Most of the implementation was contributed by
Lock3 Software. It is currently maintained
by Jason Merrill.
- gccgo
- This branch is for the Go front end to GCC. For more information
about the Go programming language,
see go.dev. The
branch is maintained by Ian Lance Taylor. Patches should be
marked with the tag [gccgo] in the Subject line.
- modula-2
- This branch is for the
GNU Modula-2
front end to GCC prior to its integration with the mainline. The
branch will be regularly rebased against the mainline. It is
maintained by
Gaius Mulley.
Patches should be
prefixed with
[modula-2] in the subject line.
- m2pragma
- This is a branch for the implementation of portable pragmas in
the GNU Modula-2
front end to GCC.
It is maintained by Gaius Mulley.
Patches should be prefixed with
[m2pragma] in the
subject line.
- coarray_native
- This branch is for implementation of a shared memory
implementation of Fortran coarrays. It is maintained by
Nicolas König.
- devel/rust/master
-
This branch is for development of
Rust programming language
support in GCC.
- fortran_unsigned
- This branch is for implementation of unsigned integers for Fortran,
an upcoming F202y feature. It is maintained by
Thomas König.
These branches are maintained by organizations distributing GCC.
No changes should be made to those branches without the explicit
permission of the distributing organization. Such branches are
located in the Git repository
under refs/vendors/vendor/heads/, which is not
fetched by default; the heads/ is omitted from the names
given below.
- apple/local-200502-branch
- This branch is for various improvements in use at Apple and to
coordinate work with others. This branch is maintained by the folks
at Apple. Previous branch was apple-ppc-branch.
- ARM/embedded-x_y-branch
- These branches provide bug-fixes, minor enhancements and stability
fixes for GCC x.y branches when used with ARM's embedded cores,
such as the Cortex-R and Cortex-M processors. Most patches will be
limited ARM specific or common back-ports from trunk, unlike the current
release branches. Very occasionally these branches will hold patches
that are waiting for trunk acceptance. Patches for these branches should
be marked with the tag
[arm-embedded] in the subject line.
This family of branches is maintained by personnel from ARM.
- google/integration
- This branch contains some minimal patches that are likely not
useful anywhere outside of Google's build environment. These are
typically configuration patches. The branch is maintained by
Diego Novillo dnovillo@google.com.
- google/main
- This branch contains Google local patches that are staged to be
contributed to trunk. Some of these patches are either in the
process of being reviewed, or have not yet been proposed. The
intent of this branch is to serve as a staging platform to allow
collaboration with external developers. Patches in this branch are
only expected to remain here until they are reviewed and accepted in
trunk. This branch is maintained by
Diego Novillo dnovillo@google.com.
- google/gcc-x_y
- Google compilers based on GCC x.y releases. This family of
branches is maintained by Diego Novillo
dnovillo@google.com.
- google/gcc-x_y[_z]-mobile
- Google compilers based on GCC x.y.z releases. These are used
to build Android and ChromeOS. This family of branches is maintained by
Ahmad Sharif asharif@google.com,
Han Shen shenhan@google.com,
and Jing Yu jingyu@google.com.
- google/gcc-x_y[_z]-mobile-vtable-security
- google/gcc-x_y[_z]-mobile-vtable-verification
- Google compilers based on GCC x.y.z releases. These are used
to build Android and ChromeOS. These branches are for work on function
pointer and vtable security. They are maintained by Caroline Tice
cmtice@google.com.
- ibm/gcc-x-branch
- Branches that track the GCC branches and are used to create the
IBM Advance Toolchain releases. This family of branches is maintained by
personnel from IBM.
- linaro/gcc-x_y-branch
- Linaro compilers based on GCC x.y releases. These branches
only accept backports of patches which have been accepted to trunk. This
family of branches is maintained by personnel from Linaro.
- redhat/gcc-3_2-branch
- Red Hat GNU/Linux compilers based on GCC 3.2.x.
- redhat/gcc-3_4-branch
- Red Hat GNU/Linux compilers based on GCC 3.4.x.
- redhat/gcc-4_0-branch
- Red Hat GNU/Linux compilers based on GCC 4.0.x.
- redhat/gcc-4_1-branch
- Red Hat GNU/Linux compilers based on GCC 4.1.x.
- redhat/gcc-4_3-branch
- Red Hat GNU/Linux compilers based on GCC 4.3.x.
- suse/gcc-4_1-branch
- SUSE GNU/Linux compilers based on GCC 4.1.x.
- suse/gcc-4_2-branch
- SUSE GNU/Linux compilers based on GCC 4.2.x.
- ubuntu/gcc-4_2-branch
- This branch follows the gcc-4_2-branch, except for gcc/java, boehm-gc,
libffi, libjava and zlib, which are backported from the trunk (and from
gcc-4_3-branch, once created). The branch is used as the base for the
Debian and Ubuntu gcc-4.2 source package.
These branches have been merged to GCC mainline, and are thus
inactive. Inactive branches are under refs/dead/heads/
in Git (except for ones under refs/vendors/).
- aarch64/sve-acle-branch
- This Git-only branch was
used for collaborative development of the AArch64 SVE ACLE implementation.
The branch is based off and merged with trunk. Please send patches to
gcc-patches with an
[SVE ACLE] tag in the subject line.
There's no need to use ChangeLogs; the ChangeLogs will instead be
written when the work is ready to be merged into trunk. The branch is
maintained by Richard Sandiford.
- ARM/aarch64-branch
- This branch added support for the AArch64 architecture and tracked
trunk until the port was merged into mainline.
- alias-improvements
- c-4_5-branch
- cfg-branch
- This branch was created to develop and test infrastructure
for easier writing of new RTL based optimizations. The branch
was based on GCC pre-3.3 and has been partially merged into the
mainline for GCC 3.4. It is now closed, and work continues on
the rtlopt-branch.
- cond-optab
- cp-parser-branch
- cp-parser-branch-2
- csl-*-branch
- csl/coldfire-4_1
- cxx0x-branch
- This branch was for the development of C++0x features, and all
features developed on this branch have been merged to mainline. Future
C++0x features will be developed against mainline. This branch was
deleted at revision 152320.
- cxx0x-lambdas-branch
- This branch was for the development of lambda functions, a coming
feature in C++0x. It was merged into the trunk at revision 152318.
- dataflow-branch
- This branch has been merged into mainline on June 6, 2007
as svn revision 125624. It used to contain a replacement of back-end
dataflow with df.c based dataflow. The branch was maintained
by Daniel Berlin <
dberlin@dberlin.org>
and Kenneth Zadeck <
zadeck@naturalbridge.com>
- dfa-branch
- dfp-branch
- edge-vector-branch
- fixed-point
- function-specific-branch
- This branch is for development of adding function specific options to
GCC. See the GCC
wiki for a more
detailed project description. Patches should be marked with the tag
[function-specific] in the subject line.
The branch has been merged into GCC 4.4.
- gcc-3_4-basic-improvements-branch
- gcc-3_4-e500-branch
- This branch was for stabilization of the powerpc-*spe
architecture, and for adding support for the 8548 chip (e500 v2). This
branch was maintained by Aldy Hernandez. All the e500 support was
merged to mainline.
- gcj-abi-2-dev-branch
- gcj-eclipse-branch
- gimple-tuples-branch
- gomp-20050608-branch
- gomp-3_0-branch
- java-gui-20050128-branch
- This was a temporary branch for development of java GUI libraries
(AWT and Swing) in the libjava directory. It has been merged into
mainline.
- killloop-branch
- The missing optimizations and optimization improvements necessary
for removing the old loop optimizer were developed on this branch.
Most of these changes were merged in 4.2.
- lno-branch
- A sub-branch of tree-ssa that aims at implementing a loop
nest optimizer at the tree level. Was largely merged into mainline,
and is currently unmaintained.
This work now continues on the autovect-branch.
- mem-ref2
- mips-3_4-rewrite-branch
- named-addr-spaces-branch
- This branch was the development branch to add named address space support
for architectures that have multiple address spaces. The CELL/spu architecture
adds an
__ea keyword to describe extended memory in the host chip
address space instead of the local CELL/spu address space. The branch was
created by Ben Elliston, modified by Michael Meissner and eventually maintained by
Ulrich Weigand. All changes from
this branch were merged into mainline.
- microblaze
- This branch contained support for updating the Xilinx MicroBlaze
architecture to GCC 4.1.2.
It was created by Michael Eager
<eager@eagercon.com>.
All changes have been merged into mainline.
- pch-branch
- tree-ssa-20020619-branch
- var-tracking-assignments*-branch
- predcom
- This branch aimed to implement predictive commoning optimization
and to introduce the changes to the representation of Fortran arrays,
alias analysis and dependency analysis to make it useful for
the common applications (e.g., mgrid). The branch was merged
in 4.3.
- split
- For development of stack splitting, as described
on the GCC wiki.
This branch was maintained by Ian Lance Taylor. All changes were
merged into mainline.
- tr29124
- This branch is for development of TR29124 Special math Functions,
for the C++ runtime library
See
. It is maintained by Ed Smith-Rowland
<3dw4rd@verizon.net>.
- tree-cleanup-branch
- This branch contained improvements and reorganization to the
tree optimizers that were not ready in time for GCC 4.0. The
goal was to cleanup the tree optimizers and improve the sequencing
of the passes. It has now been merged into mainline for the
4.1 release.
These branches are inactive and contain work that might not been
merged.
- arc-20081210-branch
- The goal of this branch is to make the port to the ARCompact
architecture available. This branch is maintained by Joern Rennecke
during spring 2009, and is expected to be unmaintained thereafter.
- ARM/hard_vfp_4_4_branch
- This branch contains support for the hard-VFP variant of the AAPCS calling
standard and tracked gcc-4.4 development. This branch was maintained by
Richard Earnshaw.
- addressing-modes
- This branch aimed to clean up the way base and index registers are
handled by target headers. In particular, the strict and non-strict
meaning of these registers are unified and a common API is presented to
implementations of the target macros. Obsolete target macros will also
be removed. The branch was maintained by Paolo Bonzini. It is no
longer maintained.
- alias-export
- This branch contains the alias export and data dependency export patch.
It is used to experiment with the propagation process. This branch is maintained
by Andrey Belevantsev abel@ispras.ru.
- annotalysis
- This branch contains the implementation of thread safety annotations
and analysis (https://gcc.gnu.org/wiki/ThreadSafetyAnnotation).
The branch was maintained by
Delesley Hutchins.
- apple-ppc-branch
- This branch was for various improvements in use at Apple and to
coordinate work with others. This branch was maintained by the folks
at Apple. It has been superseded by apple-local-200502-branch.
- ast-optimizer-branch
- The purpose of this branch was to improve GCC's tree based
optimizations. The patches of this branch have been moved to the
tree-ssa-20020619-branch.
- autovect-branch
- This branch is the successor to the lno-branch. The purpose of this
branch is tree-level
autovectorization work, and related work that the autovectorizer
could use or benefit from (like data-dependence analysis,
loop nest optimizations).
- avx512
- The goal of this branch is to implement Intel AVX-512 and SHA
Programming Reference.
The branch is maintained by Yukhin Kirill <kirill.yukhin@intel.com>.
Patches should be marked with the tag
[AVX512] in the subject
line.
- avx-512vlbwdq
- The goal of this branch is to implement the Intel AVX-512{VL,BW,DQ}
Programming Reference.
The branch is maintained by Yukhin Kirill <kirill.yukhin@intel.com>.
Patches should be marked with the tag
[AVX512] in the subject
line.
- avx2
- The goal of this branch is to implement AVX Programming Reference
(June, 2011). The branch is maintained by
H.J. Lu <hjl.tools@gmail.com>
and Yukhin Kirill <kirill.yukhin@intel.com>.
Patches should be marked with the tag
[AVX2] in the subject
line.
- bje-unsw-branch
- This branch was dedicated to some research work by Ben Elliston
at the University of New South Wales (UNSW) on transformation
phase ordering. It will never merge with mainline, although a
selection of patches may be submitted over time. Deleted by
revision 152653.
- boehms-gc
- The goal of this branch was to test Boehm's GC feasibility as the
garbage collector for GCC proper. This was a part of Google Summer
of Code project, described in detail
at https://gcc.gnu.org/wiki/Garbage_collection_tuning. The
branch was maintained
by Laurynas
Biveinis.
- cell-4_3-branch
- The goal of this branch is to add fixes and additional features required
for the Cell/B.E. processor (both PPE and SPE) to GCC 4.3.x. This branch
is maintained by Ulrich Weigand.
- cell-4_4-branch
- The goal of this branch is to back-port from mainline fixes and additional
features required for the Cell/B.E. SPE processor to GCC 4.4.x. This branch
is maintained by Ulrich Weigand. The branch is merged from gcc-4_4-branch.