Installation of Static MinGW-w64-GCC
Fix a MinGW-w64 issue within libstdc++:
patch -Np1 -i ../gcc-15.2.0-mingw_fixes-1.patch
x86_64 Installation of Static MinGW-w64-GCC
Install x86_64 Static MinGW-w64-GCC by running the following
commands:
mkdir build-x86_64-mingw-w64-static &&
cd build-x86_64-mingw-w64-static &&
../configure --prefix=/usr \
--target=x86_64-w64-mingw32 \
--disable-shared \
--disable-multilib \
--disable-threads \
--enable-languages=c,c++ &&
make all-gcc
Now, as the root user:
make install-gcc && cd ..
i686 Installation of Static MinGW-w64-GCC
Install i686 Static MinGW-w64-GCC by running the following
commands:
mkdir build-i686-mingw-w64-static &&
cd build-i686-mingw-w64-static &&
../configure --prefix=/usr \
--target=i686-w64-mingw32 \
--disable-shared \
--disable-multilib \
--disable-threads \
--enable-languages=c,c++ &&
make all-gcc
Now, as the root user:
make install-gcc
Command Explanations
Note
Run ../configure
--help for a full list of options.
mkdir build; cd
build: The GCC documentation recommends building
the package in a dedicated build directory.
--disable-shared: This
option disables building shared libraries. They will be built
later.
--disable-multilib: This
option ensures that files are created for the specific architecture
of your computer.
--disable-threads: This
option disables thread support due to building errors in GCC. This
support will be built in later.
--enable-languages=c,c++:
This command builds support for C and C++. Refer to
https://www.linuxfromscratch.org/blfs/view/systemd/general/gcc.html
to find what other languages are supported.
Contents
There are no binaries specific to this package besides the format
the compilers are targeting, and thus are prefixed with the
architecture triplet, such as x86_64-w64-mingw32-gcc. For
in-depth descriptions, read
https://www.linuxfromscratch.org/lfs/view/systemd/chapter08/gcc.html#contents-gcc.