non-bootstrap build always uses the system-compiler. Bug?
U.Mutlu
um@mutluit.com
Sat Jun 16 12:38:00 GMT 2018
Jonathan Wakely wrote on 06/16/2018 02:10 PM:
> On Sat, 16 Jun 2018 at 13:08, U.Mutlu <um@mutluit.com> 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.
Yes, but the full-build takes a whoppy ~ 111 minutes here, whereas
the non-bootstrap build takes only 12 minutes to make. A big difference.
How can I use the quick build variant with the new compiler?
If I don't use --disable-bootstrap, as you suggest, then it takes,
as said, ~ 111 minutes to make... :-(
More information about the Gcc-help
mailing list