nc
nc copied to clipboard
Build issues with --target=i686-unknown-linux-gnu
Hi, having issues building nc with --target=i686-unknown-linux-gnu, tried building youki and ran in to this error, cloned nc itself and built, and reproduced the same build error, default target builds fine. Am I missing something?
nc on main is 📦 v0.8.19 via 🦀 v1.75.0
❯ cargo build --target=i686-unknown-linux-gnu
Compiling nc v0.8.19 (/home/kha/src/rust/nc)
error: invalid register `ebp`: the frame pointer cannot be used as an operand for inline asm
--> src/syscalls/syscall_x86.rs:120:10
|
120 | in("ebp") a6,
| ^^^^^^^^^^^^
error: cannot use register `si`: esi is used internally by LLVM and cannot be used as an operand for inline asm
--> src/syscalls/syscall_x86.rs:73:10
|
73 | in("esi") a4,
| ^^^^^^^^^^^^
error: cannot use register `si`: esi is used internally by LLVM and cannot be used as an operand for inline asm
--> src/syscalls/syscall_x86.rs:94:10
|
94 | in("esi") a4,
| ^^^^^^^^^^^^
error: cannot use register `si`: esi is used internally by LLVM and cannot be used as an operand for inline asm
--> src/syscalls/syscall_x86.rs:118:10
|
118 | in("esi") a4,
|
https://github.com/rust-lang/rust/issues/85056
Fixed
Works with stable now but same issue with nightly, I gues you should use && (target_arch == "aarch64" || ...) instead of just ||