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

U.Mutlu um@mutluit.com
Sat Jun 16 12:08:00 GMT 2018


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?



More information about the Gcc-help mailing list