From: Luis Lavena Date: 2010-09-30T00:56:40+09:00 Subject: [ruby-core:32634] [Ruby 1.9-Bug#3889][Open] Incorrectly detected i686-w64-mingw32 as x64-mingw Bug #3889: Incorrectly detected i686-w64-mingw32 as x64-mingw http://redmine.ruby-lang.org/issues/show/3889 Author: Luis Lavena Status: Open, Priority: Normal Category: build, Target version: 1.9.x ruby -v: 1.9.3dev and 1.9.2 Hello, *-w64-mingw32 repesent the GCC compilers and headers by mingw-w64 project: http://mingw-w64.sf.net/ This project provides compilers in 2 architectures: i686 for 32bits and x86_64 for 64bits Windows. There has been a previous discussion about this with wanabe at [ruby-core:32565] The latest changes and regularization introduced in r29324, r29347, r29354, r29365 complicates things further than wanabe patch in the above ruby-core thread. 1) configure --host=i686-w64-mingw32 generates "x64-mingw" configuration file This is incorrect, i686 indicates the architecture according to GCC tripled (arch-vendor-os) 2) mingw != mingw32 Dropping 32 of mingw (which is the os) now means possible breakage of RubyGems. $ ruby -rubygems -ve "puts Gem::Platform.new 'x86-mingw'" ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0] x86-unknown 3) i686-pc vs x86_64-w64 vs mingw32 vs mingw64 Until today there is no official (ala: mingw.org) 64bits version of GCC for Windows. this is because both teams fractured long ago. the mingw64 shortcut introduced in config.sub has no point as there is no "-pc-" vendor for these compilers It is important to differentiate that i686 and x86_64 has nothing to do with vendor (pc or w64) and os (mingw32) must remain for compatibility. There is not such thing as "mingw64". In an ideal world, it could be, but we don't live in an ideal world. Please consider these changes: 1) --host=i686-w64-mingw32 should be treated as i386-mingw32 2) --host=x86_64-w64-mingw32 should be treated as x86_64-mingw32 3) consider arch and os, please ignore vendor in your config.sub rules. Thank you. ---------------------------------------- http://redmine.ruby-lang.org