GCC multi-version development layout

Basile STARYNKEVITCH basile@starynkevitch.net
Sun Apr 19 17:02:08 GMT 2026


On Mon, 2026-04-20 at 00:56 +0800, Xi Ruoyao via Gcc-help 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?
> 
> See https://git-scm.com/docs/git-worktree.


Excellent reference.

However, GCC takes a long time to be compiled from source code. Often
hours.

But most computers (eg recent laptops) have terabytes of disk space.

So for GCC specifically, I still recommend having one source tree + one
build tree for every branch you work on.

And you probably want your work to be accepted in GCC trunk. When GCC
is in stage 1 (or 2) sending your patches *daily* for review to gcc-
patches@ is then making a lot of sense

Regards.
-- 

Basile STARYNKEVITCH                           
<basile@starynkevitch.net>
8 rue de la Faïencerie                      
http://starynkevitch.net/Basile/  
92340 Bourg-la-Reine                        
https://github.com/bstarynk
France                               
https://github.com/RefPerSys/RefPerSys
                  https://orcid.org/0000-0003-0908-5250


More information about the Gcc-help mailing list