non-bootstrap build always uses the system-compiler. Bug?
Mon Jun 25 22:02:00 GMT 2018
On Sat, 16 Jun 2018 at 16:25, U.Mutlu <email@example.com> wrote:
> U.Mutlu wrote on 06/16/2018 04:35 PM:
> > Brian Drummond wrote on 06/16/2018 03:51 PM:
> >> On Sat, 2018-06-16 at 14:38 +0200, U.Mutlu wrote:
> >>> Jonathan Wakely wrote on 06/16/2018 02:10 PM:
> >>>> On Sat, 16 Jun 2018 at 13:08, U.Mutlu <firstname.lastname@example.org> wrote:
> >>>> 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... :-(
> >> Can't you add CC=my_new_gcc and/or CPP=my_new_g++ to the make command
> >> for the second step?
> > Yeah, that seems to be the way to go.
> > Currently trying a variant of that method, indeed:
> > configure --help does not mention these variables:
> > CC_FOR_BUILD
> > GCC_FOR_BUILD
> > CXX_FOR_BUILD
> > I'm currently trying via them.
> > If it fails, then I'll add also:
> > CC
> > CXX
> > and maybe also CPP and GCC (after consulting the Makefile)
> Ok, finally solved! :-)
> With the following ./configure params (each having the new name of the
> respective compiler) it now works as desired:
> ../gcc_trunk/configure -v \
> CC="$my_CC" \
> GCC="$my_GCC" \
> CXX="$my_CXX" \
> CC_FOR_BUILD="$my_CC_FOR_BUILD" \
> GCC_FOR_BUILD="$my_GCC_FOR_BUILD" \
> CXX_FOR_BUILD="$my_CXX_FOR_BUILD" \
> CC_FOR_TARGET="$my_CC_FOR_TARGET" \
> GCC_FOR_TARGET="$my_GCC_FOR_TARGET" \
> CXX_FOR_TARGET="$my_CXX_FOR_TARGET" \
This is completely different from what you first asked about.
When you do a bootstrap build GCC gets built three times, and gets
built by itself, i.e. with "the new compiler" that has just been built
(but not installed yet, until you do "make install").
What you're trying to do is just build GCC with some already installed
compiler, that is not the /usr/bin/g++ system compiler. That's not
"the new compiler", it's just some existing compiler that is already
installed. The fact that in your case the already installed compiler
happens to be the same version as the one you're building is
irrelevant. It's just some other compiler which happens to be already
More information about the Gcc-help