public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <bonzini@gnu.org>
To: Giovanni Bajo <giovannibajo@libero.it>
Cc: gcc@gcc.gnu.org
Subject: [cft] Toplevel bootstrap
Date: Wed, 01 Sep 2004 16:00:00 -0000	[thread overview]
Message-ID: <4135F304.9060808@gnu.org> (raw)
In-Reply-To: <02ed01c4900b$f1a2e100$bf4e2597@bagio>

> 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

           reply	other threads:[~2004-09-01 16:00 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <02ed01c4900b$f1a2e100$bf4e2597@bagio>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4135F304.9060808@gnu.org \
    --to=bonzini@gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=giovannibajo@libero.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).