From d15e06f3bce982eb712cc7511225213827d7482c Mon Sep 17 00:00:00 2001 From: Nathan Fisher Date: Tue, 14 Mar 2023 22:32:53 -0400 Subject: [PATCH] Publish cross compilers 3 post --- content/gemlog/cross_compilers_part_3.gmi | 15 +++++++++++++-- tags.lock | 1 - 2 files changed, 13 insertions(+), 3 deletions(-) delete mode 100644 tags.lock diff --git a/content/gemlog/cross_compilers_part_3.gmi b/content/gemlog/cross_compilers_part_3.gmi index f926605..a2fc735 100644 --- a/content/gemlog/cross_compilers_part_3.gmi +++ b/content/gemlog/cross_compilers_part_3.gmi @@ -1,8 +1,19 @@ Meta( title: "Cross compilers III: cross compiling Rust", summary: Some("Using a cross toolchain to link Rust executables"), - published: None, - tags: ["rust", "compilers", "cross-compilation"], + published: Some(Time( + year: 2023, + month: 3, + day: 15, + hour: 2, + minute: 32, + second: 12, + )), + tags: [ + "rust", + "compilers", + "cross-compilation", + ], ) --- Since the official Rust compiler, rustc, uses llvm as a code generator, it is technically already capable of cross compilation to any of the architectures that llvm supports. However, we still need a linker for the target. Eventually lld, being a cross linker, might be a suitable drop in for this use. However, I have not really been able to find information on how to set this up or if it is even possible. What definitely is possible is using gcc as a driver for the linker, as this is what rustc does by default already. We're just going to swap out our system gcc for a cross gcc such as that built in part one of this series. diff --git a/tags.lock b/tags.lock deleted file mode 100644 index 93130b1..0000000 --- a/tags.lock +++ /dev/null @@ -1 +0,0 @@ -2299