Adding sparc64-linux-gnu as an additional target architecture



I’m currently developing a chip using a free/libre open-source hardware framework, and would like to be able to write Rust code that can target sparc64 without needing to compile on the target machine.

Would it be possible to add sparc64-linux-gnu as a cross-compiler target in the near future? What work would need to be done in order to accomplish this?

Thank you!


Are you successfully using the sparc64-unknown-linux-gnu target today, compiling your own rustc? That’s pretty cool - I would have assumed the port was completely busted.

In order to get out of the box SPARC support we’ll need to add builders to our CI. There’s some documentation of this here. It should be pretty straightforward. Step one is probably to add ‘dist-sparc64-linux’ to the Travis matrix and figure out what needs to change from there.

The hardest part will probably be cooking up a Docker container containing a working gcc x86->SPARC cross compiler, but there’s lots to crib off of.


Sent a PR to make std for sparc64-unknown-linux-gnu available in the nightlies.

Note that panicking / unwinding is currently broken on this target. It’d be great if you could help us debug that issue once std is available.


@brson I am not currently using a sparc64 rustc, I’m developing on my amd64 machine at the moment. Due to the frequency limitations of the FPGA I’m going to be testing on, I’m not sure if compiling natively will be feasible.

In any case, I’m glad to hear that @japaric has gotten a PR going that will mainline sparc64 in the near future. It’s one of the few free/libre open-source ISAs out there.