Cross Building Mingw-w64 Toolchain on macOS
 · 3 min read
In this blog, we will show the steps of building Mingw-w64 on macOS system. In fact, we can install mingw-w64 corss building toolchain by homebrew package manager. Here, we jsut analysis the building steps of mingw-w64 toolchain, and it can be easily migrated to linux system.
Overview
We need to build following tools/libraries:
- binutils:  "Binutils is a collection of binary programming tools used to assemble, link and manipulate binary and object files.", like gnu linker ld, gnu assembleras,nm,arandstrings. see more.
- texinfo: Apple's makeinfo is old and has bugs. It be only used as building dependency.
- gcc: compiler for c/c++/fortran language.
- mingw-w64: "The mingw-w64 project is a complete runtime environment for gcc to support binaries native to Windows 64-bit and 32-bit operating systems.". Provide windows api headers, runtime and other tools.