Hi again, > -----Original Message----- > From: Kacvinsky, Tom <tom.kacvin...@vector.com> > Sent: Wednesday, November 27, 2019 8:56 AM > To: mingw-w64-public@lists.sourceforge.net > Subject: [Mingw-w64-public] gnatdll not building > > I am trying to build the custom tool chain that I built in the past such that > the > Ada tool chain uses UCRT. I was able to accomplish this with x86_64, but now > I am trying my hand at i686. > > The build script I am using builds the GCC dependencies (gmp, mpfr, mpc) > first, builds binutils, builds mingw-w64-headers, then builds the compilers. > After that, mingw-w64-crt is built with UCRT support, then the GCC runtimes > are built with the new UCRT enable MinGW-w64 runtime. > > Everything builds as it should except for gnatdll. The odd thing is I do not > see > a build failure for gnatdll. IN fact, I don't see anything that even builds > gnatdll. > > Any ideas? I can pass along the script I am using, which was originally > written > by Martin for me.
I thought better of it and decided to preemptively send the script to the list. Tom
# In a msys2/mingw64 command prompt: mkdir -p /c/code/gcc-bootstrap cd /c/code/gcc-bootstrap # Building the new gcc and its sysroot using the existing msys2/mingw64 # gcc installation: # $ which gcc # /mingw64/bin/gcc # $ gcc --version # gcc.exe (Rev2, Built by MSYS2 project) 7.3.0 # Build libraries that GCC needs. These can also potentially be found # from the msys2/mingw64 installation, and that should probably also # work just as well. If omitted, leave out the --with-gmp=$DEPENDS_PREFIX # from the gcc configure command. export TOOLCHAIN_PREFIX=/c/code/mingw-w64-gcc-8.3.0-i686-ucrt export TARGET_TRIPLET=i686-w64-mingw32 export DEPENDS_PREFIX=/c/code/gcc-depends wget http://ftp.funet.fi/pub/gnu/gnu/gmp/gmp-6.1.2.tar.bz2 tar -jxvf gmp-6.1.2.tar.bz2 cd gmp-6.1.2 CFLAGS="-m32" ABI=32 ./configure --prefix=$DEPENDS_PREFIX --disable-shared --disable-assembly make -j$(nproc) make install cd .. wget http://ftp.funet.fi/pub/gnu/gnu/mpfr/mpfr-4.0.2.tar.bz2 tar -jxvf mpfr-4.0.2.tar.bz2 cd mpfr-4.0.2 CFLAGS="-m32" ./configure --prefix=$DEPENDS_PREFIX --with-gmp=$DEPENDS_PREFIX --disable-shared make -j$(nproc) make install cd .. wget http://www.multiprecision.org/downloads/mpc-1.1.0.tar.gz tar -zxvf mpc-1.1.0.tar.gz cd mpc-1.1.0 CFLAGS="-m32" ./configure --prefix=$DEPENDS_PREFIX --with-gmp=$DEPENDS_PREFIX --disable-shared make -j$(nproc) make install cd .. # End of optional section. wget https://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.gz tar -jxvf binutils-2.32.tar.bz2 cd binutils-2.32 mkdir build cd build ../configure --prefix=/c/code/mingw-w64-gcc-8.3.0-i686-ucrt --disable-werror --disable-multilib --build=i686-w64-mingw32 make -j$(nproc) make install-strip cd ../.. # Clone mingw-w64; using a recent known-good version from the master branch. # The v6.x branch should also probably be good for ucrt, but the master branch # is certainly good at least. # git clone git://git.code.sf.net/p/mingw-w64/mingw-w64 cd mingw-w64 git checkout v7.0.0 cd mingw-w64-headers mkdir build cd build ../configure --prefix=$TOOLCHAIN_PREFIX/$TARGET_TRIPLET --with-default-msvcrt=ucrt --disable-multilib --build=i686-w64-mingw32 make install cd ../../.. # Build GCC; build the compiler itself and all tools, using the existing # msys2/mingw64 compiler, having that compiler itself link against the # CRT that it defaults to. This compiler will be set up that the code # it produces uses UCRT though. # Build the same version of gcc as in the surrounding host environment. # This seems to be necessary for building the Ada tools this particular # way (a single-stage, non-bootstrap build), as the Ada tools are built # with the existing host Ada compiler, and the GCC Ada sources are picky # about being built with the exact right version of the compiler. wget https://ftp.gnu.org/gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.gz tar -zxvf gcc-8.3.0.tar.gz cd gcc-8.3.0 && \ mkdir build cd build ../configure --prefix=$TOOLCHAIN_PREFIX --enable-languages=c,c++,ada --disable-multilib --with-gmp=$DEPENDS_PREFIX --with-native-system-header-dir=$TOOLCHAIN_PREFIX/$TARGET_TRIPLET/include --disable-bootstrap CXXFLAGS="-O2" --disable-sjlj-exceptions --build=i686-w64-mingw32 --host=i686-w64-mingw32 --target=i686-w64-mingw32 make -j$(nproc) all-gcc make install-strip-gcc cd ../.. # Now build the CRT runtimes using the newly built C/C++ compiler. # Add the new toolchain/compiler to the PATH. export PATH=$TOOLCHAIN_PREFIX/bin:$PATH # $ which gcc # /c/code/mingw-native/bin/gcc # $ gcc --version # gcc.exe (GCC) 7.3.0 cd mingw-w64/mingw-w64-crt mkdir build cd build ../configure --prefix=$TOOLCHAIN_PREFIX/$TARGET_TRIPLET --disable-lib64 --with-default-msvcrt=ucrt make -j$(nproc) make install cd ../../.. cd mingw-w64/mingw-w64-libraries/winpthreads mkdir build cd build ../configure --prefix=$TOOLCHAIN_PREFIX/$TARGET_TRIPLET --enable-lib32 --with-default-msvcrt=ucrt make -j$(nproc) make install cd ../../../.. # Build the libgcc/libstdc++ runtimes, with the new toolchain and its # new sysroot (defaulting to UCRT). cd gcc-8.3.0/build make -j$(nproc) all-target make install-target # Build the rest of the gnat frontend tools using the old host ada compiler: export PATH=/mingw32/bin:$PATH make configure-gnattools cd gnattools make -j$(nproc) gnattools-cross cd .. make install-strip-gcc cd ../../.. # Copy a few runtime dlls that the compiler ended up requiring. cp /mingw32/bin/libiconv-2.dll $TOOLCHAIN_PREFIX/bin cp /mingw32/bin/libwinpthread-1.dll $TOOLCHAIN_PREFIX/bin cp /mingw32/bin/libgmp-10.dll $TOOLCHAIN_PREFIX/bin
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public