This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[cft] Toplevel bootstrap

If you want some testing from developers, I think you should
> post a message to the gcc@ list, explaining in details what
> it is, what it buys to the users, what to do for testing it.

Sure, was going to do this after this patch was approved... :-)

Here we go.

Toplevel bootstrap has two aims:

1) simplifying the binary compatibility problems when you are bootstrapping GCC with a proprietary compiler, or maybe a very old GCC.

2) being able to fully bootstrap a toolchain, that is building assemblers, linkers and even tools such as bison and flex with the compiler that is in your tree.

3) removing an awful lot of hair from the gcc Makefile, along with the dangling link mess. A small special casing for the current bootstrapping system had even percolated in gcc.c :-/

The toplevel bootstrap had several parts:

1) being able to bootstrap a compiler, but with separate reconfiguration of the three stages. This was accomplished last March by Nathanael Nerode (see

2) being usable. That is supporting all the bells and whistles like bubblestraps, restageN, which help during development.

3) being able to bootstrap a whole toolchain. This meant doing several other cleanups to the toplevel machinery, including expressing the dependencies in Makefile.def and limiting as much as possible the amount of special-casing needed for GCC.

4) being able to build any other host tool needed to bootstrap (bison, flex, etc.) twice, once with the bootstrap compiler and one with the in-tree GCC. This required some souping up of the support for build-side modules, which was more or less limited to the sole libiberty as of last May.

To enable toplevel bootstrap, just configure with --enable-bootstrap. Then, "make" will do more or less what "make bubblestrap" used to do: start from stage1, rebuild everything that had to be rebuilt, configure stage2 if it has not been configured yet, build stage2, and the same for stage3. "make restrap" is not supported. "make restageN" is called "make all-stageN", and there is also "make all-stageN-gcc" to rebuild gcc only.

The idea is that in the future --enable-bootstrap will be the default for native builds and "make" will just DTRT, bootstrapping whenever possible.

As DJ hinted, "Rebuilding" is not limited to GCC: libiberty, libcpp, and other dependencies of GCC are all configured and compiled three times. It is the same as rebuilding a whole tree from scratch three times, each time using the previous build as the result.

"Lean" bootstraps are also supported, but they are enabled with --enable-bootstrap=lean rather than with special targets.

I have not done "make profiledbootstrap" for a while, so it may not work anymore, but for the remaining part, toplevel bootstrap should be ready for general use. Bootstrapping times should be longer because of the additional compilation and configuration steps that are involved; I have not measured it, but the resulting compiler should be a bit faster because libcpp and libiberty are compiled with GCC HEAD as well.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]