This is the mail archive of the gcc@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]

Bootstrapping [was Re: Converting GCC to compilation with C++]


a. In stage1, build the minimal set of front-ends.
b. Use the stage1 compilers to build all front-ends that
are now build-able.
c. To guard against code/debug-info generation bugs,
repeat the above process with the stage2 compilers.
d. Now build all front-ends that were not built in
stage2
>
(There is no point in having a stage5, as object
comparisons would be pointless.)

Unfortunately, there is, because a stage5 would guard against code generation bugs in the C++ compiler. But, to economize, you can:


a. In stage1, build the minimal set of front-ends.
b. Use the stage1 compilers to build all front-ends that
are now build-able.  Iterate until all front-ends are built.
c. To guard against code/debug-info generation bugs,
repeat the above process once more, and compare object files.

Iterations of part b may find code generation bugs of course, just like stage3 in current GCC may crash before reaching the comparison phase, because the compilers may be miscompiled themselves.

Only this, I claim, is a true "bootstrap". There are
of course shortcuts possible (as when you also want
to use the system C++ compiler for Java, for example),
but they are not "bootstraps" really.

Okay. They are not full bootstraps, or they are not bootstrap that include a stress test of the compiler such as the bootstrap comparison; they are bootstraps in the sense that the compiler ends up compiling itself. So we're in overall agreement.


You always end up installing the C++ compiler built in the final stage, so it makes no difference whether you first build C++ in stage1 or stage2.

It does - what if the vendor compiler (or existing GCC) does not have the optimisations or extensions in the current GCC? I want the C++, Java, etc. compilers built with as much available optimisations as possible.

I mean, it makes no difference in the final executable whether you first build C++ in stage1 or stage2. You always build each front-end at least twice, if following the process above, and in the end all the front-ends are built with the latest and greatest GCC.


the comparison is vital in ensuring (to the extent
possible) that the newly-built compiler (or the vendor
compiler itself) does indeed generate correct code.

It is a very important test, agreed.


Paolo


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