News for hackers. Stuff that matters.
Re:Hard Rust requirements from May onward for all Debian ports by zozbot234 on Saturday November 01, 2025 @05:42AM (#45780405)
m68k has a LLVM port already, so Rust can be implemented for that platform.[0] It would be nice to have LLVM backends for alpha, hppa and sh4 - these older architectures tend to be quite simple so a working LLVM has plenty of value as a reference and for educational use.

(LLVM even used to have an in-tree DEC Alpha backend, though that was back in 2011 and not relevant to any version of Rust.)

[0] Looks like there is basic initial support but no 'core' or 'std' builds yet. https://doc.rust-lang.org/rustc/platform-support/m68k-unknow... This should potentially be fixable.

Re:Hard Rust requirements from May onward for all Debian ports by curt15 on Saturday November 01, 2025 @09:57AM (#45781688)
Shouldn't the codegen_gcc project[1] theoretically allow Rust to target backends that only GCC supports?

[1] https://github.com/rust-lang/rustc_codegen_gcc

Re:Hard Rust requirements from May onward for all Debian ports by fweimer on Saturday November 01, 2025 @10:56AM (#45782125)
LLVM is desirable for other reasons (LLVMpipe for example), so investing into an LLVM port is probably a better use of limited resources than improving and maintaining a retargeted rustc for GCC.
Re:Hard Rust requirements from May onward for all Debian ports by dathinab on Saturday November 01, 2025 @02:14PM (#45783910)
yes and no

yes, from a pure code generation aspect

no, as all conditional-compiled platform specific code is missing.

So using it with #[no_core] should work (assuming the WIP part of the backend isn't a problem). But beyond that you have to first port libcore (should be doable) and then libstd (quite a bunch of work).

Re:Hard Rust requirements from May onward for all Debian ports by CodesInChaos on Saturday November 01, 2025 @02:57PM (#45784302)
Re:Hard Rust requirements from May onward for all Debian ports by cbmuser on Saturday November 01, 2025 @03:54PM (#45784768)
Yes, that is being worked on.
Re:Hard Rust requirements from May onward for all Debian ports by pornel on Wednesday November 05, 2025 @06:16AM (#45821660)
The GCC backend makes Rust for Dreamcast work: https://www.dreamcast.rs/

(not relevant to Debian, but cool that it's already possible)

Re:Hard Rust requirements from May onward for all Debian ports by fweimer on Saturday November 01, 2025 @10:55AM (#45782101)
As far as I understand it, the m68k LLVM port is not ABI-compatible with GCC on Linux because the alignment is wrong: https://wiki.debian.org/M68k/Alignment (page says that the LLVM packages are FTBFS because of this)
Re:Hard Rust requirements from May onward for all Debian ports by zozbot234 on Saturday November 01, 2025 @11:18AM (#45782324)
The principled way to address this would be to define a new ABI suffix for the m68k-unknown-linux-gnu target triple, replacing the existing 'gnu' which would retain GCC compatibility with 2-byte alignment for int.