public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [cft] Toplevel bootstrap
       [not found] ` <02ed01c4900b$f1a2e100$bf4e2597@bagio>
@ 2004-09-01 16:00   ` Paolo Bonzini
  0 siblings, 0 replies; only message in thread
From: Paolo Bonzini @ 2004-09-01 16:00 UTC (permalink / raw)
  To: Giovanni Bajo; +Cc: gcc

> 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 http://gcc.gnu.org/ml/gcc-patches/2004-03/msg01223.html).

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.

Paolo

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-09-01 16:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <413451D1.8030509@gnu.org>
     [not found] ` <02ed01c4900b$f1a2e100$bf4e2597@bagio>
2004-09-01 16:00   ` [cft] Toplevel bootstrap Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).