If you're currently interested in a working MinGW cross compiler for Linux, check out the following project:
MinGW cross compiling environment. They have their own mailing list with support for this project (and are separate from the MinGW project and its mailing lists). They use makefiles to build a MinGW cross-compiler and several useful libraries. The makefiles are similar to the BSD ports project and even resemble the Arch build scripts in some ways.
Rest of page updated to current status, as of 15-September-2008.
Previous content of this page was confused, misleading and obsolete. Nevertheless, if you wish to refer to this older content, you may find it here.
As of this writing, the MinGW Project does not support any official build of GCC, more recent than GCC-3.4.5, for use as a cross hosted MinGW development tool, on any platform. This is unlikely to change, until after an officially supported stable GCC-4.x version has been released, for native use on the MS-Windows platform.
If you wish to experiment with more recent versions, then please feel free to do so, (and please share your experience with us, via the MinGW-Users Mailing List -- but, please ensure that you are subscribed before you post). However, please understand that we are currently unable to offer you support for such experimental builds in production use.
Please do not append comments to this article, relating to your own experimental cross compiler builds.
Procedure for Building the Cross Compiler
The only method now officially sanctioned by the MinGW Project, for building MinGW as a cross hosted tool chain, is managed entirely by a collection of interactive shell scripts, which you may download as a composite tarball, from here. (You may also browse the most recent development versions of the script files, or check them out from the Official CVS Repository, where they will be found in the xscripts module, under the other MinGW packages heading).
Having downloaded the script tarball, you should unpack it, study the included README file, review and optionally adjust the default settings specified in x86-mingw32-build.sh.conf, then run the main script
sh x86-mingw32-build.sh <name>
(where <name> represents the label you would like to use in the --host=<name> specification, when you configure packages for cross compilation; please ensure that it ends with mingw32, and do not emulate the asinine practice of some GNU/Linux distributors, by appending msvc).
From here on, simply follow the on-screen prompts, to complete the build and installation process.
If you use the --dry-run option to x86-mingw32-build.sh, to see what it plans to do, before you actually let it do it, then please ensure that you completely purge all content from the path you nominate as the build directory, before you initiate the real build; it has been reported that artifacts from the dry run cause the real build to fail.