bytecodealliance / bytecodealliance/rustix

Please add architecture support for m68k

Open
#1,626 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.1k
Forks
294
Avg merge
4h 7m
Merged PRs (30d)
2

Description

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:

```rust
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](https://github.com/M680x0/issues/issues/11).

Please note that being able to build `rustix` for m68k still requires additional patches to LLVM and `rustc`. See the status report [here](https://lists.debian.org/debian-68k/2026/04/msg00003.html).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.