https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63773

--- Comment #15 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Francois-Xavier Coudert from comment #14)
> (In reply to Dominique d'Humieres from comment #13)
> > There is still a bootstrapping issue with libcc1 when bootstrapping with gcc
> > 4.9:
> 
> Regarding that one, it should be fixed in the top-level Makefile. The
> targets that configure and build libcc1 in this Makefile call
> $(HOST_EXPORTS), which should do the trick. Instead, it should probably do
> like lto, and use $(HOST_EXPORTS) and $(POSTSTAGE1_HOST_EXPORTS) together
> for stages > 1.

ACK - I think that's completely the right approach to one part of the problem.

- what's happening is that the analysis for the _bootstrap_ compiler's support
of the -static-libstdc++ is being used for the _stage#3_ build of libcc1

for clang [bootstrap] -static-libstdc++ is not supported and thus libcc1 links
with /usr/lib/libstdc++.dylib (which is not really what was intended).

for gcc [bootstrap] the support is mentioned - and then the -static-libstdc++
flag is provided to the libcc1 link (which then fails with…).  

… the second issue - which is that we need a -B…. option for each library path
that will be used for spec-substitution (.a for .dylib).

so we need -B/path/to/libstdc++-v3/src/.libs and -B/path/to/libsupc++/.libs,.

> 
> Looking at Makefile.def, the only difference I see is that libcc1 is not
> bootstrapped, so maybe we could fix it this way?
> 
> Index: Makefile.def
> ===================================================================
> --- Makefile.def      (revision 217355)
> +++ Makefile.def      (working copy)
> @@ -123,7 +123,8 @@ host_modules= { module= gnattools; };
>  host_modules= { module= lto-plugin; bootstrap=true;
>               extra_configure_flags='--enable-shared 
> @extra_linker_plugin_flags@
> @extra_linker_plugin_configure_flags@';
>               extra_make_flags='@extra_linker_plugin_flags@'; };
> -host_modules= { module= libcc1; extra_configure_flags=--enable-shared; };
> +host_modules= { module= libcc1; bootstrap=true;
> +             extra_configure_flags=--enable-shared; };
>  
>  target_modules = { module= libstdc++-v3;
>                  bootstrap=true;

I don't think we want to bootstrap libcc1 (that was what the patch was
removing).

Probably the right example is gnattools - or something similar that only builds
@stage#3.

Reply via email to