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

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

 



U.Mutlu wrote on 06/16/2018 03:23 PM:
U.Mutlu wrote on 06/16/2018 02:38 PM:
Jonathan Wakely wrote on 06/16/2018 02:10 PM:
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).

Hmm. here it uses the new compiler, if already available.

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

If a new compiler is already available, then it should use that new one, IMO.
But it somehow does not.

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.

But then a full-build will be generated that takes about 2 hrs here to make.

What I need is a solution where I can use --disable-bootstrap (or an
aquivalent) with the new compiler, as then the build takes only about
12 minutes here. Currently it does this always with the (old) system-compiler,
and that's the core of the problem...

I have a suspicion: it seems I should specify different targets (dirs, suffixes etc.).
Will try it out shortly...





[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