This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: how to use the uninstalled C & C++ compilers?
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Matthias Klose <doko at ubuntu dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 31 Mar 2015 21:48:17 +0200
- Subject: Re: how to use the uninstalled C & C++ compilers?
- Authentication-results: sourceware.org; auth=none
- References: <551A8061 dot 4060309 at debian dot org> <551AF777 dot 5050800 at ubuntu dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Mar 31, 2015 at 09:37:27PM +0200, Matthias Klose wrote:
> On 03/31/2015 01:09 PM, Matthias Klose wrote:
> > In the past (at least it worked for me in 4.9) it was possible to use the
> > uninstalled C & C++ compilers to build another compiler, using the just built
> > compilers. Useful if you want to build e.g. libgccjit in a second step without
> > bootstrapping again. This doesn't seem to work anymore with 5. At least I can't
> > get it working by removing the system c++ and g++ after the build of the first
> > compiler and then building as
> >
> > CC=$(builddir)/gcc/xgcc -B$(builddir)/gcc/
> > CXX=$(builddir)/gcc/xg++ -B$(builddir)/gcc/ \
> > -I$(builddir)/$(TARGET_ALIAS)/libstdc++-v3/include \
> > -I$(builddir)/$(TARGET_ALIAS)/libstdc++-v3/include/$(TARGET_ALIAS)
> >
> > and the next build (without bootstrapping) with these values. Did somebody got
> > this working? Sometimes it looks like gcc is built using the C compiler,
> > sometimes it doesn't find the "new" header, and probably won't find the
> > libstdc++ library later. Not setting CXX seems to silently use the g++ system
> > compiler if it exists.
>
> this is what is now working for me.
>
> CC = $(builddir)/gcc/xgcc -B$(builddir)/gcc/
> CXX = $(builddir)/gcc/xg++ -B$(builddir)/gcc/ \
> -B$(builddir)/$(TARGET_ALIAS)/libstdc++-v3/src/.libs \
> -B$(builddir)/$(TARGET_ALIAS)/libstdc++-v3/libsupc++/.libs \
> -I$(builddir)/$(TARGET_ALIAS)/libstdc++-v3/include \
> -I$(builddir)/$(TARGET_ALIAS)/libstdc++-v3/include/$(TARGET_ALIAS) \
> -I$(srcdir)/libstdc++-v3/libsupc++ \
> -L$(builddir)/$(TARGET_ALIAS)/libstdc++-v3/src/.libs \
> -L$(builddir)/$(TARGET_ALIAS)/libstdc++-v3/libsupc++/.libs
I'm using
CC="`$${builddir}/libstdc++-v3/scripts/testsuite_flags --build-cc`"
CXX="`$${builddir}/libstdc++-v3/scripts/testsuite_flags --build-cxx` `$${builddir}/libstdc++-v3/scripts/testsuite_flags --build-includes`"
instead and it works for me.
Jakub