Re: [Mingw-users] I'm a newbie to MinGW. How Can I build MinGW from source?
- Date: Sun, 26 Feb 2017 12:40:01 +0000
- From: Keith Marshall <keithmarshall@xxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: [Mingw-users] I'm a newbie to MinGW. How Can I build MinGW from source?
-----BEGIN PGP SIGNED MESSAGE-----
On 26/02/17 10:40, firebird wrote:
> I'm building against mingwrt-5.0 preview. I take the workaround and
> build the gcc compiler successfully.
> I wanna DIY gcc compiler.
Well, you have that now; it's GNU/Linux hosted, and it builds binaries
for deployment on 32-bit MS-Windows, (or 64-bit in 32-bit mode).
> I want to use MinGW to build window-hosted ARM toolchains.
Do they need to be Windows hosted? Since your host is GNU/Linux, would
Linux hosted ARM tools not be more useful to you?
> There are some known out-of-box tools or windows installer,
For which you would need a Windows host. In your case, you could run
a virtual machine, but that could turn out to be an order of magnitude
slower than tools running natively on the GNU/Linux host.
> I think DIY at source level maybe more useful to me. At first, I need
> to learn how to build the compiler from scratch.
You've already done that. Now you can use it to build applications
which will run on Windows; invoke it as "mingw32-gcc" or "mingw32-g++",
just as you would invoke "gcc" or "g++" to build applications to run on
the GNU/Linux host. If the source uses a GNU standard configure script,
you configure as you would for a native Linux build, but you must add
the "--build=unknown --host=mingw32" configuration options; if you
are building tools to run on Windows, but generate ARM code, you
probably also need "--target=arm", (or appropriate identifier).
In your position, I would be seeking to adapt the technique I've just
used to build a Linux hosted compiler for the mingw32 target, to build
Linux hosted tools for the ARM target.
Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
-----END PGP SIGNATURE-----
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
MinGW-users mailing list
This list observes the Etiquette found at
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.
You may change your MinGW Account Options or unsubscribe at: