framework_lib: Restrict portio modules to x86/x86_64 architectures#301
framework_lib: Restrict portio modules to x86/x86_64 architectures#301JohnAZoidberg merged 1 commit intoFrameworkComputer:mainfrom
Conversation
|
Thanks for the patch! Hm i think the entire file may not be useful for x64. |
|
In framework_lib/src/chromium_ec/mod.rs we have I think there you may want to add this condition to check for x64 |
|
@JohnAZoidberg thanks, I've updated the diff Would it also make sense to distribute the package only on |
I have never built it for anything else, but it does do some arch agnostic things. It can parse some binaries, talk to USB devices, HID devices, ... Things that can work on other architectures. So sure, if it builds and runs fine, it's okay to have on all archs. |
Currently, the library does not build successfully on arches such as i386 and s390x. I'm wondering whether I should spend time fixing these issues or if it would be more practical to simply disable support for them |
|
let me take a quick look, should be easy to try to cross compile with rust |
Currently, I'm working on the
framework-libpackage in Debia,n and it fails to build on all non-x86 architectures: https://buildd.debian.org/status/package.php?p=rust-framework-libThe error messages look the following way:
After some investigation, I've noticed that this happens because
libc::iopermis only available on Linux x86/x86_64. The cfg attributes were only checking fortarget_os = "linux", causing build failures on arm, arm64, ppc64el, riscv64, s390x, loong64, and other non-x86 architectures. Non-x86 Linux already uses the /dev/port file fallback inportio_hwio.rs, so ioperm is not needed thereThe fix adds the corresponding cfg attributes