Re: non-bootstrap build always uses the system-compiler. Bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 16 Jun 2018 at 13:08, U.Mutlu <um@xxxxxxxxxxx> wrote:

> I've successfully built a bootstrap version and installed it under
> /usr/local, and set the environment vars (in ~/.bashrc) appropriately,
> so that the new compiler can be used.
>
> Now, after that step I do another build, but now with the
> --disable-bootstrap
> option.
> But in this case it uses the system-compiler(!). I think this is a bug b/c
> if I do a full bootstrap build instead, then that new one gets compiled
> with
> the new compiler, as it should.
>
>
> I can verify it from the output of this:
> $ echo "int main() { return 0; }" | g++-latest -Q -v -x c++ -Ofast -
>
> (g++-latest being the name of the new compiler)
>
>
> If the compiler was generated w/o --disable-bootstrap (ie. a full build),
> it says:
>          compiled by GNU C version 9.0.0 20180616 (experimental) [trunk
> revision 261680], GMP version 6.1.0, MPFR version 3.1.4, MPC version
> 1.0.3,
> isl version isl-0.18-GMP
>
> If the compiler was generated with --disable-bootstrap, it says:
>          compiled by GNU C version 4.9.2, GMP version 6.1.0, MPFR version
> 3.1.4, MPC version 1.0.3, isl version isl-0.18-GMP
>
> (4.9.2 being the system-compiler)
>
>
> I would like to have all subsequent builds use the newly generated
> compiler.
> As said above, this works only if --disable-bootstrap was not given, ie.
> with
> full builds.
>
> Why does it in one of the two cases switch back to the old system compiler?
> Is this inconsistency a possible bug?
>

No, it's what bootstrap means.

If you do a full bootstrap then the system compiler is used to build the
new GCC, then the new GCC is used to build itself (twice, to compare them
and ensure they are the same).

If you disable bootstrap then GCC is just built once by the system compiler.

What you're seeing is exactly what is supposed to happen. If you want GCC
to be built by the new compiler then don't use --disable-bootstrap.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux