From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29473 invoked by alias); 1 Sep 2004 16:00:08 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 29449 invoked from network); 1 Sep 2004 16:00:07 -0000 Received: from unknown (HELO polimi.it) (131.175.12.8) by sourceware.org with SMTP; 1 Sep 2004 16:00:07 -0000 Received: from gnu.org (paride.rett.polimi.it [131.175.65.135]) by polimi.it (8.13.1/8.13.1) with ESMTP id i81G05Lm001399; Wed, 1 Sep 2004 18:00:06 +0200 Message-ID: <4135F304.9060808@gnu.org> Date: Wed, 01 Sep 2004 16:00:00 -0000 From: Paolo Bonzini User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) MIME-Version: 1.0 To: Giovanni Bajo CC: gcc@gcc.gnu.org Subject: [cft] Toplevel bootstrap References: <413451D1.8030509@gnu.org> <02ed01c4900b$f1a2e100$bf4e2597@bagio> In-Reply-To: <02ed01c4900b$f1a2e100$bf4e2597@bagio> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 4.7.0.111621, Antispam-Engine: 2.0.0.0, Antispam-Data: 2004.8.31.2 X-PerlMx-Spam: Gauge=%%XPROB%%IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_VERSION 0, __SANE_MSGID 0' X-SW-Source: 2004-09/txt/msg00048.txt.bz2 > 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