Original author(s) | OneVision Software |
---|---|
Developer(s) | Kai Tietz, Jonathan Yong, variousGNU contributors |
Initial release | 2005; 20 years ago (2005) |
Stable release | 12.0.0 / May 29, 2024; 9 months ago (2024-05-29) |
Repository | sf |
Written in | C,C++ |
Operating system | Microsoft Windows,Linux,macOS |
Type | Compiler |
License | Public domain (headers),GNU General Public License (compiler and toolchain),Zope Public License |
Website | mingw-w64 |
Mingw-w64 is afree and open-source suite of development tools that generatePortable Executable (PE) binaries forMicrosoft Windows. It wasforked in 2005–2010 fromMinGW (Minimalist GNU for Windows).
Mingw-w64 includes aport of theGNU Compiler Collection (GCC),GNU Binutils for Windows (assembler,linker,archive manager), a set of freely distributable Windows specificheader files andstatic import libraries for theWindows API, a Windows-native version of theGNU Project'sGNU Debugger, and miscellaneous utilities.
Mingw-w64 can be run natively on Microsoft Windows, cross-hosted onLinux (or other Unix), or "cross-native" onMSYS2 orCygwin. Mingw-w64 can generate 32-bit and 64-bit executables for x86 under the target namesi686-w64-mingw32
andx86_64-w64-mingw32
.
In 2005, Mingw-w64 was created by OneVision Software undercleanroom software engineering principles, since the original MinGW project was not prompt on updating its code base, including the inclusion of several key new APIs and also much needed 64-bit support. In 2008, OneVision then donated the code to Kai Tietz, one of its lead developers, under the condition that it remains open source.[1] It was first submitted to the original MinGW project, but refused under suspicion of using non-public or proprietary information.[2][1][3] For many reasons, the lead developer and co-founder of the MinGW-w64 project, Kai Tietz, decided not to attempt further cooperation with MinGW.[4]
MinGW-w64 provides a more complete Win32 API implementation,[5] including:
gendef
(an improved version of MinGW'spexports
utility), andwidl
(anMIDL compiler from Wine).Additionally, the Mingw-w64 project maintains winpthreads, awrapper library similar to pthreads-win32, with the main difference that it allows GCC to use it as a threads library resulting in functional C++11 thread libraries<thread>
,<future>
, and<mutex>
.
MSYS2 ("minimal system 2") is a software distribution and a development platform forMicrosoft Windows, based on Mingw-w64 andCygwin, that helps to deploy code from theUnix world on Windows. It plays the same role the old MSYS did in MinGW.[6]
MSYS2 shares this goal of bringing Unix code to Windows machines with several other projects, most notablyCygwin andWindows Subsystem for Linux (WSL). WSL lets LinuxELF binaries run on Windows through a managedVirtual Machine. Cygwin provides a fullPOSIX environment (as a windowsDLL) in which applications, compiled as Windows EXEs, run as they would under Unix.[7]
Instead of providing a full environment like Cygwin does, MSYS2 tasks itself with being a development and deployment platform.[8]
The main MSYS2 environment provides apackage manager (Pacman fromArch Linux), abash shell, and otherUnix programs. It uses a runtime librarymsys-2.0.dll (~20MB) that is derived from the Cygwin librarycygwin1.dll, and is updated regularly to keep track of the Cygwin development. It is intended as a development environment, one that developers can manage (using pacman) and run their tools with. Features judged unnecessary for development are removed.[8]
As with Cygwin, MSYS2 supports path translation for non-MSYS2 software launched from it. For example one can use the commandnotepad++ /c/Users/John/file.txt
to launch an editor that will open the file with the Windows pathC:\Users\John\file.txt
.[9][8]
MSYS2 and its bash environment is used byGit andGNU Octave for their official Windows distribution.
Most languages supported by GCC are supported on the Mingw-w64 port as well. These include C,C++,Objective-C, Objective-C++,Fortran, andAda. The GCC runtime libraries are used (libstdc++ for C++, libgfortran for Fortran, etc.). A packaging ofLLVM's clang to mingw-w64 is also provided by MSYS2. It supports ARM for Windows (aarch64-w64-mingw32
andarmv7-w64-mingw32
).[10][11]
Binaries (executables or DLLs) generated with different C++ compilers (like Mingw-w64 GCC and Visual Studio) are in general not link compatible due to the use of differentABIs andname mangling schemes caused by the differences in C++ runtimes. However, compiled C code is link compatible.[12] Clang is an exception, as it mostly supports MSVC's C++ ABI on Windows.[13]
Thebinutils documentation has up-to-date information about its handling of various windows-specific formats and special tools for doing so.[14][15]
From a cursory spot check of a few files, the crt sources in particular appear to contain too much undocumented material that I suspect may be derived from proprietary sources. I have since avoided looking at the mingw-w64 sources to avoid any taint of copyright abuse. I could well be wrong, but I would rather be safe than jeopardise the future of the mingw32, which has tried to maintain a "clean-room" ethic during its development.
However, we would require a formal audit of mingw-64 code, to ensure conformance with our requirements for truly open documentation of sources, before [merge of mingw-w64] could be completed.