jasonwhite / syscalls

Raw Linux system calls for Rust.
Other
102 stars 13 forks source link

Trouble with FP (r7) on ARM #40

Closed xarkes closed 1 year ago

xarkes commented 1 year ago

Hello, The project mentions ARM is supported, however I get the following error when trying to compile as simple call to the syscall wrapper:

$ cargo build --target=armv7-linux-androideabi
...
error: cannot use register `r7`: the frame pointer (r7) cannot be used as an operand for inline asm
  --> $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/syscalls-0.6.12/src/syscall/arm.rs:29:9
   |
29 |         in("r7") n as usize,
   |         ^^^^^^^^^^^^^^^^^^^

I am using the following version of Rust

cargo --version
cargo 1.70.0 (ec8a8a0ca 2023-04-25)

Note that I have no error when compiling for aarch64

Let me know if you need more details.

jasonwhite commented 1 year ago

Thanks for the bug report! Should be fixed in v0.6.13.

xarkes commented 1 year ago

Awesome, thanks!