rust-lang/cargo — pull request #1012 by jmesmon (2014-12-05 07:04:49+00:00)
Title: custom_build: build output goes in the directory for the req, not hard coded to Target

This broke crossbuilds that had Host deps that used custom build
scripts, typically resulting in a failure to link (due to bad
relocations or symbols) the final executable or library.

Probably should have rustc check when generating an rlib that all the
containing objects have the appropriate arch.

For reference, here's a failing build: https://gist.github.com/jmesmon/74b6b888cbca0c431636
And here's the contents of the rlib in question: https://gist.github.com/jmesmon/d64e0066decd7548f463