From 1d81efb03d5efee5899db01737880b1b3969e1fc Mon Sep 17 00:00:00 2001 From: "Adam C. Foltzer" Date: Thu, 11 Jan 2018 16:04:40 -0800 Subject: Add cross-compilation support for `rustc` This patch is largely modeled on the relatively-straightforward code for Fortran cross-compilation, so there might be some intricacies missing. --- docs/markdown/snippets/rust-cross.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 docs/markdown/snippets/rust-cross.md (limited to 'docs') diff --git a/docs/markdown/snippets/rust-cross.md b/docs/markdown/snippets/rust-cross.md new file mode 100644 index 0000000..7f18c44 --- /dev/null +++ b/docs/markdown/snippets/rust-cross.md @@ -0,0 +1,16 @@ +## Rust cross-compilation + +Cross-compilation is now supported for Rust targets. Like other +cross-compilers, the Rust binary must be specified in your cross +file. It should specify a `--target` (as installed by `rustup target`) +and a custom linker pointing to your C cross-compiler. For example: + +``` +[binaries] +c = '/usr/bin/arm-linux-gnueabihf-gcc-7' +rust = [ + 'rustc', + '--target', 'arm-unknown-linux-gnueabihf', + '-C', 'linker=/usr/bin/arm-linux-gnueabihf-gcc-7', +] +``` -- cgit v1.1