[rust-dev] Crosscompiling rust with non-blessed compiler prefixes

Cody P Schafer dev at codyps.com
Thu Oct 16 13:35:05 PDT 2014

On Thu, Oct 16, 2014 at 3:54 PM, Ilya Dmitrichenko
<errordeveloper at gmail.com> wrote:
> Thanks Ben, I was just about to reply with the link:
> https://github.com/rust-lang/rust/pull/16156/
> Cody, you are welcome to test out the branch, as you are to compile rust
> with OE anyway ;)
> On 16 Oct 2014 20:52, "Ben Harris" <mail at bharr.is> wrote:
>> This will be available very soon. There is a pull request in the final
>> stages of review that will allow you to define custom targets with custom
>> linkers, link args, PIC options, etc.
>> That is for building binaries using rustc. I'm not sure what the solution
>> would be for building rustc itself.

Looks promising. A few questions:

- In my case I have what is essentially a supported platform but needs
to select a set of build tools with a different prefix. From looking
at the current diff of that pr, it appears I'll need to create a json
file that copies a bunch of values I don't really care about from an
existing target (with no automated way of extracting that json from
the existing target) just to change the value of the linker.

- Is the linker ("cc", presently) the only target build tool needed
when building the cross compiler?

I suppose the other piece of this is how well cargo handles cross
compiling things and what target tools it needs.

More information about the Rust-dev mailing list