So we are ready! Please try this and let me know of any rough spots.
I'll be on holiday from Friday 24th to July 4th, with no connectivity,
but I will read my e-mail when I come back.
To recap, toplevel bootstrap has several aims, including:
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) in 4.2, it will allow removing an awful lot of hair from the gcc
Makefile, for example the stageXYZ dangling links that the configure
script creates in language subdirectories. A small special casing for
the current bootstrapping system had even percolated in gcc.c :-/
4) possibly it could be used to simplify the way libada and gnattools
are built, by three-staging them as well.
Toplevel bootstrap is able to bootstrap a compiler with separate
reconfigurations and rebuilds of libiberty/libcpp/gcc in all the three
stages. It is actually possible to bootstrap a whole toolchain, so that
the final executable is built with the assembler and linker that are in
a combined tree.
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. As mentioned, "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.
It supports all the bells and whistles like bubblestraps and restageN,
which help during development. "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 just before or just after the end of stage2, I will
post the obvious patch making --enable-bootstrap the default. Then,
"make" will just DTRT, bootstrapping whenever possible. In 4.1,
old-style bootstrap will still be available with "./configure
--disable-bootstrap; make bootstrap" (non intuitive maybe, but in the
long term, it would only be one more historic wart if the flag was
called --{enable,disable}-toplevel-bootstrap).
"Lean" bootstraps are also supported, but they are enabled with
--enable-bootstrap=lean rather than with special targets.
"make profiledbootstrap" works with the patch at
http://gcc.gnu.org/ml/gcc-patches/2005-06/msg01770.html.
Combined tree builds currently trigger warnings in binutils and ld, but
you can use --disable-werror to try them. A few weeks ago it worked,
but this morning I tried a combined tree profiledbootstrap and it
crashed while linking libstdc++. :-( I have not yet investigated
whether it is a profiledbootstrap miscompilation, or a genuine libbfd bug.
I see no regression on i686-pc-linux-gnu with toplevel bootstrap.
Paolo