GCC multi-version development layout
Jonathan Wakely
jwakely.gcc@gmail.com
Sun Apr 19 17:49:45 GMT 2026
On Sun, 19 Apr 2026, 17:57 Xi Ruoyao via Gcc-help, <gcc-help@gcc.gnu.org>
wrote:
> On Sun, 2026-04-19 at 16:33 +0000, Heime via Gcc-help wrote:
> > ----------------------------------------------------------------
> >
> > When building GCC from a cloned Git source tree using separate
> > directories (as recommended), the directory structure follows
> > a clean separation of source, build artifacts, and final
> > installation.
> >
> > With different version of gcc, how would be the typical layout
> > for specific branches to make patch changes to different gcc
> > versions with multiple builds and install?
>
The layout doesn't matter at all. Anything will work.
I have a directory ~/src/gcc/gcc for the git repo, where I work on trunk
and then directories ~/src/gcc/gcc-15 and ~/src/gcc/gcc-14 etc for each
release branch, using git worktree.
I install each version to ~/gcc/X where X is 16, 15, 14 etc.
But it really doesn't matter, anything works.
> See https://git-scm.com/docs/git-worktree.
>
This is definitely the best way to manage the repo, so that every release
branch is just a worktree using the same repository metadata and config
settings.
More information about the Gcc-help
mailing list