Toplevel-bootstrap overview

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 entirely with the assembler, binutils and linker that are in a combined tree.

When configuring in a native environment, make does 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. "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. make profiledbootstrap works; it will build profile-optimized assemblers, binutils and linkers when run in a combined tree.

Toplevel-bootstrap cheatsheet

The following gives a cheatsheet of common operation modes.

Q1) How to bootstrap the compiler, including all libraries?

A1) make from the top directory

Q2) How to bootstrap the compiler, but not build any time consuming libraries (libjava, libstdc++)?

A2) make stage{2,3,feedback}-bubble

a note: this is the equivalent to the old cd gcc && make {bootstrap2,bootstrap,profiledbootstrap} respectively.

Q3) How to compile just the stage1 compiler + the basic runtime (libgcc, libmudflap, libgomp)?

A3) make stage1-bubble all-target-libmudflap all-target-libgomp

a note: i'm thinking of three-staging also libmudflap and libgomp; in this case the above will simplify to make stage1-bubble

Q4) How to compile all the libraries (libjava, ...) using the stage1 compiler?

A4) Configure with --enable-stage1-languages=all and then use make stage1-bubble all-target

a note: i'm thinking of enabling this flag by default in non-release branches. for sure it is most useful for GCC developers to always configure their trees with this flag.

Q5) How to clean up everything (including the stage1 compiler, but excluding makefiles, so that I can build everything from scratch, but configure does not have to be run)?

A5) make clean (or make cleanstrap to also start a bootstrap)

Q6) How to clean up everything except for the stage1 compiler?

A6) make distclean-stage2 clean-target or make restrap (which will also start a bootstrap)

None: Top-Level_Bootstrap (last edited 2008-01-10 19:38:37 by localhost)