This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: make question


Danny wrote:

> I know after I configure gcc I'm supposed to type make bootstrap. I
> was curious as to what would happen if I just typed make. Now 
> it's compiling something. Does it default to make bootstrap?

No; it'll compile GCC (and all options you configured) using your
existing compiler:

    * build libiberty with existing compiler
    * build full GCC with existing compiler
    * build target runtime libraries using new GCC

'make bootstrap' replaces the full GCC build with three stages:

    stage1:  use existing compiler to build C-only GCC
    stage2:  use output of stage1 to build full compiler
    stage3:  use output of stage2 to re-build full compiler
    make sure that the output of stages 2 and 3 are binary identical

The general ideas being that it's safer to use a version of GCC that was
built with itself; the level of standards conformance (and available
extensions) are exactly as expected and it's the most tested
configuration (rather than having to worry about optimization bugs of
the existing compiler, for example). Additionally, compiling itself
repeatably is a good basic self-test.

However, this relies on your machine's ability to execute the compiled
code; you can't, for example, bootstrap GCC if you've configured to
build a cross compiler to generate code for another platform or
operating system. In that case, you simply have to 'make'.

Hope that helps,
Rup.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]