Fixed up the rules and implementation for cross-compiling. Now to just implement -target.