> -----Original Message-----
> From: Kacvinsky, Tom <tom.kacvin...@vector.com>
> Sent: Monday, April 1, 2019 10:54 AM
> To: mingw-w64-public@lists.sourceforge.net
> Subject: [Mingw-w64-public] Building GCC linked against libucrt fails
>
> > In my own setup for bootstrapping a mingw cross compiler on linux, I
> > do the
> > following:
> >
> > - Build binutils with --target=<arch>-w64-mingw32 --prefix=<prefix>
> > - Install mingw-w64-headers with --prefix=<prefix>/<arch>-w64-mingw32
> > - Build the compiler part of gcc with --target=<arch>-w64-mingw32
> > --prefix=<prefix> --enable-languges=c,c++, but only compile the compiler
> > itself (by "make all-gcc; make install-gcc")
> > - Build the mingw-w64-crt with --prefix=<prefix>/<arch>-w64-mingw32
> > --host=<arch>-w64-mingw32
> > - Build the rest of gcc with "make; make install" in the gcc directory
> >
> > I don't know if the gcc configure script has got a special place to
> > inject extra flags only for building the runtimes.
> >
> > But setting up the newly installed mingw headers and crt with
> > --with-default- msvcrt= (especially if you are installing this into a
> > separate sysroot different from your existing compiler) should at
> > least work, since the build of the runtimes should end up using those
> headers.
> >
> > Or maybe gcc has got a way of setting them separately from the flags
> > for the compiler itself?
>
> OK, I built GCC as follows:
>
> ./configure --prefix=/mingw64 --enable-languages=c,c++,ada --
> build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-
> w64-mingw32 --disable-multiarch --with-native-system-header-
> dir=/mingw64/x86_64-w64-mingw32/include
>
> make all-gcc
> make install-gcc
>
> Then I built the MinGW-w64 CRT as follows
>
> ./configure --prefix=/mingw64/x86_64-w64-mingw32 --build=x86_64-w64-
> mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --
> disable-multiarch --with-default-msvcrt=ucrt --disable-lib32 --with-
> libraries=all
>
> make
> make install
>
> Then I went back to the GCC directory and ran make
>
> This failed. IT for some reason wanted to go back to stage-1, and the --
> disable-multiarch is no longer in effect - it tried to build a 32-bit libgcc,
> which
> failed because it could find a 32-bit libkernel.a. I don't want 32-bit
> support at
> this time.
>
> I am going to try without the Ada compiler in the mix and see what washes
> out but I don't have a good feeling about this.
>
> Any ideas?
One of the other things I noted is that the MinGW-w64 CRT, when configured
without --disable-lib32 does not install the 32-bit libraries in a location
where
the bootstrapped GCC can find the libraries. Exactly where are the supposed
to be installed? Could the MinGW-w64 CRT build process be changed so that
it can handle multi-arch installs?
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public