Contents
There are no binaries specific to this package besides the format the compilers are targetting. For in-depth descriptions, read https://www.linuxfromscratch.org/lfs/view/stable/chapter08/gcc.html#contents-gcc
MinGW-w64-GCC provides GCC compilers for MinGW-w64, allowing users and applications to compile code targetting Windows. This will be done in steps to avoid the need for already present binaries. This is the static build, which will have limited support but will be able to compile software better for the MinGW-w64 targets.
Download (HTTP): https://ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz
MinGW-w64-binutils-2.43.1 and MinGW-w64-headers-12.0.0
This may take a while to build. Feel free to do something else while this is building.
Although you are compiling for another host and running make install is generally safe, it is recommended to not run make install until you are confident the build was successful.
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
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
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/svn/general/gcc.html
to find what other languages are supported.
There are no binaries specific to this package besides the format the compilers are targetting. For in-depth descriptions, read https://www.linuxfromscratch.org/lfs/view/stable/chapter08/gcc.html#contents-gcc