Skip to content

Please add architecture support for m68k #1626

@glaubitz

Description

@glaubitz

Trying to build rustix on m68k fails with:

error[E0432]: unresolved import `consts`
 --> /rust/deps/rustix-1.1.4/src/ioctl/linux.rs:4:5
  |
4 | use consts::*;
  |     ^^^^^^ use of unresolved module or unlinked crate `consts`
  |
  = help: if you wanted to use a crate named `consts`, use `cargo add consts` to add it to your `Cargo.toml`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `rustix` (lib) due to 1 previous error

This seems to be caused by rustix missing m68k support. The following minimal change fixes this, although I'm pretty sure it's incomplete:

diff --git a/src/ioctl/linux.rs b/src/ioctl/linux.rs
index 8d96a1b2..0f228f00 100644
--- a/src/ioctl/linux.rs
+++ b/src/ioctl/linux.rs
@@ -68,6 +68,7 @@ mod consts {
     target_arch = "mips32r6",
     target_arch = "mips64",
     target_arch = "mips64r6",
+    target_arch = "m68k",
     target_arch = "powerpc",
     target_arch = "powerpc64",
     target_arch = "sparc",

This issue was first reported in the M680x0 issue tracker here.

Please note that being able to build rustix for m68k still requires additional patches to LLVM and rustc. See the status report here.

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