Created attachment 2840[details]
Add support for more mingw prefixes (r2086)
The cross compile scripts assume you define CC/WINDRES or it is using the i586-mingw32msvc or amd64-mingw32msvc prefix. Debian and possibly others do not use this convention. I'm not sure if this is a Debian thing or if upstream updated it since I don't cross compile very often. Debian testing/unstable use i686-w64-mingw32 and x86_64-w64-mingw32, respectively.
While you could force Debian users to set the CC/WINDRES, it seems like a simple check would be better. Hence this patch.
I'm able to cross compile using these packages (note these do 32bit and 64bit cross compiling despite the w64 name):
binutils-mingw-w64 2.21.52.20110606-1
gcc-mingw-w64 4.6.0-11
mingw-w64 1.0+20110523-1
mingw-w64-dev 1.0+20110523-1
the X characters are not required.
on FreeBSD, i have mingw32-gcc and mingw32-windres.
the scripts should use
exec gmake "$@"
instead of
exec make $*
.
(In reply to comment #0)
> The cross compile scripts assume you define CC/WINDRES or it is using the
> i586-mingw32msvc or amd64-mingw32msvc prefix. Debian and possibly others do
> not use this convention. I'm not sure if this is a Debian thing or if upstream
> updated it since I don't cross compile very often.
FYI: this is because Debian testing/unstable has switched to using a different upstream for mingw (mingw-w64 instead of mingw32 - but despite their confusing names, both can compile for either 32- or 64-bit Windows!) in order to get better support for modern versions of Wine.
(In reply to comment #1)
> the X characters are not required.
Probably not in this specific case, but their purpose is to avoid any of the arguments ever being things that test(1) treats specially, like "=" or "-a" or whatever; it's generally easier to add prefixes consistently than to remember under which exact circumstances it can be a problem.
Created attachment 2840 [details] Add support for more mingw prefixes (r2086) The cross compile scripts assume you define CC/WINDRES or it is using the i586-mingw32msvc or amd64-mingw32msvc prefix. Debian and possibly others do not use this convention. I'm not sure if this is a Debian thing or if upstream updated it since I don't cross compile very often. Debian testing/unstable use i686-w64-mingw32 and x86_64-w64-mingw32, respectively. While you could force Debian users to set the CC/WINDRES, it seems like a simple check would be better. Hence this patch. I'm able to cross compile using these packages (note these do 32bit and 64bit cross compiling despite the w64 name): binutils-mingw-w64 2.21.52.20110606-1 gcc-mingw-w64 4.6.0-11 mingw-w64 1.0+20110523-1 mingw-w64-dev 1.0+20110523-1