luislavena/rake-compiler — pull request #49 by larskanis (2011-10-31 20:23:32+00:00)
Title: Detect 32bit mingw-gcc executable for cross compile

Hi Luis,

the newer mingw versions on Ubuntu always install 32- and 64-bit environments together. With the current mingw-gcc detection, it happens, that the 64bit version is used, wrongly.

I tried some versions of mingw with the following result:

version	32bit	64bit

gcc 4.2.1 (debian)	i586-mingw32msvc-gcc	-

gcc 4.4.4 (debian)	i586-mingw32msvc-gcc	amd64-mingw32msvc-gcc

gcc 4.6.1 (debian)	i686-w64-mingw32-gcc	x86_64-w64-mingw32-gcc

gcc 4.2.1 (macport)	i386-mingw32-gcc	-

To only choose the 32bit version, I would propose the i*86-pattern as in the attached commit.