Skip to content

Adding support for mips and mips64 #67

@tharunsuresh-code

Description

@tharunsuresh-code

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions