luislavena/rake-compiler — pull request #74 by larskanis (2013-03-13 15:52:43+00:00)
Title: Add support for cross builds for multiple target platforms.

Hi Luis,

I use rake-compiler's cross compilation support in several projects and now that you released Ruby-2.0.0-p0 for 32 and 64 bit Windows platforms, it would like to update it properly for 64 bit. So attached you can find two patches that allow the following use case:

```sh
$ rake-compiler cross-ruby VERSION=1.8.7-p371
$ rake-compiler cross-ruby VERSION=1.9.3-p125
$ rake-compiler cross-ruby VERSION=2.0.0-p0
$ rake-compiler cross-ruby VERSION=2.0.0-p0 HOST=x86_64-w64-mingw32
$ rake cross compile RUBY_CC_VERSION=1.8.7:1.9.3:2.0.0
```

With
```ruby
ext.cross_platform = %w[i386-mingw32 x64-mingw32]
```
it builds 4 different targets of the extension.

Unfortunately only the compile task does work right now. The native task copies the compiled extension binaries into the lib directory in order to later build a gem from the base directory. This conflicts for the 2.0 so-file which then is built only once but packaged into two gems.

I guess the only solution is to use different temporary directories for the packaging of cross compiled gems. How would you like to solve this issue?