Skip to content

Building Rustc on m68k #744

@FractalFir

Description

@FractalFir

I am currently working on building rustc for m68k(since that seems like a more achievable short-term goal). Many of the roadblocks I'll hit on m68k will also likely be shared with other targets - this issue could server as a reference for that.

Here is a list of currently-known issues:

  • - linux-raw-sys does not support m68k. This crate is needed by rustc, and a lot of other crates. Proper support will require a moderate amount of work, but it something that can be done now.

  • - The rustix crate does not support m68k. (more specifically, the iocl::const module needs the right values for syscall arguments).

  • - The const assert in https://github.com/rust-lang/rust/blob/ce5fdd7d42aba9a2925692e11af2bd39cf37798a/compiler/rustc_data_structures/src/tagged_ptr.rs#L163 fails. EDIT: the problem is the alignment of usize. Rust uses those bits to store type tags. If the aligement is less than 4, this fails. I have a fix ready to be sent & merged.

  • - The bootstrap script fails to compile native GCC for m68k. This prevents it from building any codegen backends or tools later down the line. This is skipable with some fiddling.

  • - When building other tools(eg. cargo) the bootstrap script "forgets" where the std for m68k is.

So, as of toady, with some workarounds, I can get pretty far into the cross-compilation process - a bit more work, and we may be able to get rustc running on m68k.

@glaubitz I think this issue might be of interest to you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions