Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for mips and mips64 #67

Closed
tharunsuresh-code opened this issue Feb 18, 2023 · 1 comment · Fixed by #87
Closed

Adding support for mips and mips64 #67

tharunsuresh-code opened this issue Feb 18, 2023 · 1 comment · Fixed by #87

Comments

@tharunsuresh-code
Copy link

Hi everyone,

Currently, there is no support for mips and mips64 architecture. If I build libffi with the command -

cargo build --target mips64el-unknown-linux-gnuabi64

the compilation throws the following error -

error[E0425]: cannot find value `FFI_TRAMPOLINE_SIZE` in this scope
   --> libffi-sys-rs/src/lib.rs:165:25
    |
165 |     pub tramp: [c_char; FFI_TRAMPOLINE_SIZE],
    |                         ^^^^^^^^^^^^^^^^^^^ not found in this scope
    |
note: these constants exist but are inaccessible

This seems to be sorted with the following changes in arch.rs file as follows:

#[cfg(all(target_arch = "mips64", unix))]
pub use x86::x86_64::*;

#[cfg(all(target_arch = "mips", unix))]
pub use x86::x86::*;

Are these appropriate changes to make and apt for the problem mentioned?

@chenx97
Copy link
Contributor

chenx97 commented Dec 7, 2023

I copied constants from libffi/src/mips/ffitarget.h in #87. This should fix the issue properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants