MinGW-w64 is an advancement of the original mingw.org project, created to support the GCC compiler on Windows systems. It has forked it in 2007 in order to provide support for 64 bits and new APIs. It has since then gained widespread use and distribution.
On Linux, it serves as a useful toolchain to compile code targeting Windows, resulting binaries can include .exe and .dll files. Wine-9.14 is a project that depends on MinGW-W64 to compile .dll files. However in order to build this toolchain, the toolchain must already be on the system, so you need to install the binary toolchain first to satisfy the circular dependency.
Development versions of GLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.
There is only one binary package, but that is fine. The MinGW-w64 binaries are separated based on the target architecture and the binaries are often named with the architecture prefix such as x86_64 and i686. The binary package has binaries for those two architectures.
Install the MinGW-w64 binaries by
running the following commands as the root
user while still in the directory the
tarball is in:
export MINGWTBPATH=$PWD && cd /opt && tar xpvf "$MINGWTBPATH"/mingw-w64-gcc-14.2.0-mingw-11.0.1.tar.xz ln -sv mingw-w64-11.0.1_gcc-14.2.0 mingw-w64 && cd $MINGWTBPATH unset MINGWTBPATH
Now adjust the PATH
variable so the
MinGW-w64 software can be found
and used:
PATH_HOLD=$PATH && export PATH=/opt/mingw-w64/usr/bin:$PATH_HOLD