Skip to content

Add 32/64-bit MIPS R6 as separate target architectures #73

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

Merged
merged 2 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion gen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ fn rust_arches(linux_arch: &str) -> &[&str] {
// hexagon gets build errors; disable it for now
"hexagon" => &[],
"loongarch" => &["loongarch64"],
"mips" => &["mips", "mips64"],
"mips" => &["mips", "mips64", "mips32r6", "mips64r6"],
"powerpc" => &["powerpc", "powerpc64"],
"riscv" => &["riscv32", "riscv64"],
"s390" => &["s390x"],
Expand Down Expand Up @@ -384,6 +384,10 @@ fn compute_clang_target(rust_arch: &str) -> String {
format!("i686-unknown-linux")
} else if rust_arch == "x32" {
format!("x86_64-unknown-linux-gnux32")
} else if rust_arch == "mips32r6" {
format!("mipsisa32r6-unknown-linux-gnu")
} else if rust_arch == "mips64r6" {
format!("mipsisa64r6-unknown-linux-gnuabi64")
} else {
format!("{}-unknown-linux", rust_arch)
}
Expand Down
72 changes: 72 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,78 @@ pub mod prctl;
#[path = "mips64/system.rs"]
pub mod system;
#[cfg(feature = "errno")]
#[cfg(target_arch = "mips32r6")]
#[path = "mips32r6/errno.rs"]
pub mod errno;
#[cfg(feature = "general")]
#[cfg(target_arch = "mips32r6")]
#[path = "mips32r6/general.rs"]
pub mod general;
#[cfg(feature = "if_ether")]
#[cfg(target_arch = "mips32r6")]
#[path = "mips32r6/if_ether.rs"]
pub mod if_ether;
#[cfg(feature = "io_uring")]
#[cfg(target_arch = "mips32r6")]
#[path = "mips32r6/io_uring.rs"]
pub mod io_uring;
#[cfg(feature = "ioctl")]
#[cfg(target_arch = "mips32r6")]
#[path = "mips32r6/ioctl.rs"]
pub mod ioctl;
#[cfg(feature = "net")]
#[cfg(target_arch = "mips32r6")]
#[path = "mips32r6/net.rs"]
pub mod net;
#[cfg(feature = "netlink")]
#[cfg(target_arch = "mips32r6")]
#[path = "mips32r6/netlink.rs"]
pub mod netlink;
#[cfg(feature = "prctl")]
#[cfg(target_arch = "mips32r6")]
#[path = "mips32r6/prctl.rs"]
pub mod prctl;
#[cfg(feature = "system")]
#[cfg(target_arch = "mips32r6")]
#[path = "mips32r6/system.rs"]
pub mod system;
#[cfg(feature = "errno")]
#[cfg(target_arch = "mips64r6")]
#[path = "mips64r6/errno.rs"]
pub mod errno;
#[cfg(feature = "general")]
#[cfg(target_arch = "mips64r6")]
#[path = "mips64r6/general.rs"]
pub mod general;
#[cfg(feature = "if_ether")]
#[cfg(target_arch = "mips64r6")]
#[path = "mips64r6/if_ether.rs"]
pub mod if_ether;
#[cfg(feature = "io_uring")]
#[cfg(target_arch = "mips64r6")]
#[path = "mips64r6/io_uring.rs"]
pub mod io_uring;
#[cfg(feature = "ioctl")]
#[cfg(target_arch = "mips64r6")]
#[path = "mips64r6/ioctl.rs"]
pub mod ioctl;
#[cfg(feature = "net")]
#[cfg(target_arch = "mips64r6")]
#[path = "mips64r6/net.rs"]
pub mod net;
#[cfg(feature = "netlink")]
#[cfg(target_arch = "mips64r6")]
#[path = "mips64r6/netlink.rs"]
pub mod netlink;
#[cfg(feature = "prctl")]
#[cfg(target_arch = "mips64r6")]
#[path = "mips64r6/prctl.rs"]
pub mod prctl;
#[cfg(feature = "system")]
#[cfg(target_arch = "mips64r6")]
#[path = "mips64r6/system.rs"]
pub mod system;
#[cfg(feature = "errno")]
#[cfg(target_arch = "powerpc")]
#[path = "powerpc/errno.rs"]
pub mod errno;
Expand Down
137 changes: 137 additions & 0 deletions src/mips32r6/errno.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
/* automatically generated by rust-bindgen 0.66.1 */

pub const EPERM: u32 = 1;
pub const ENOENT: u32 = 2;
pub const ESRCH: u32 = 3;
pub const EINTR: u32 = 4;
pub const EIO: u32 = 5;
pub const ENXIO: u32 = 6;
pub const E2BIG: u32 = 7;
pub const ENOEXEC: u32 = 8;
pub const EBADF: u32 = 9;
pub const ECHILD: u32 = 10;
pub const EAGAIN: u32 = 11;
pub const ENOMEM: u32 = 12;
pub const EACCES: u32 = 13;
pub const EFAULT: u32 = 14;
pub const ENOTBLK: u32 = 15;
pub const EBUSY: u32 = 16;
pub const EEXIST: u32 = 17;
pub const EXDEV: u32 = 18;
pub const ENODEV: u32 = 19;
pub const ENOTDIR: u32 = 20;
pub const EISDIR: u32 = 21;
pub const EINVAL: u32 = 22;
pub const ENFILE: u32 = 23;
pub const EMFILE: u32 = 24;
pub const ENOTTY: u32 = 25;
pub const ETXTBSY: u32 = 26;
pub const EFBIG: u32 = 27;
pub const ENOSPC: u32 = 28;
pub const ESPIPE: u32 = 29;
pub const EROFS: u32 = 30;
pub const EMLINK: u32 = 31;
pub const EPIPE: u32 = 32;
pub const EDOM: u32 = 33;
pub const ERANGE: u32 = 34;
pub const ENOMSG: u32 = 35;
pub const EIDRM: u32 = 36;
pub const ECHRNG: u32 = 37;
pub const EL2NSYNC: u32 = 38;
pub const EL3HLT: u32 = 39;
pub const EL3RST: u32 = 40;
pub const ELNRNG: u32 = 41;
pub const EUNATCH: u32 = 42;
pub const ENOCSI: u32 = 43;
pub const EL2HLT: u32 = 44;
pub const EDEADLK: u32 = 45;
pub const ENOLCK: u32 = 46;
pub const EBADE: u32 = 50;
pub const EBADR: u32 = 51;
pub const EXFULL: u32 = 52;
pub const ENOANO: u32 = 53;
pub const EBADRQC: u32 = 54;
pub const EBADSLT: u32 = 55;
pub const EDEADLOCK: u32 = 56;
pub const EBFONT: u32 = 59;
pub const ENOSTR: u32 = 60;
pub const ENODATA: u32 = 61;
pub const ETIME: u32 = 62;
pub const ENOSR: u32 = 63;
pub const ENONET: u32 = 64;
pub const ENOPKG: u32 = 65;
pub const EREMOTE: u32 = 66;
pub const ENOLINK: u32 = 67;
pub const EADV: u32 = 68;
pub const ESRMNT: u32 = 69;
pub const ECOMM: u32 = 70;
pub const EPROTO: u32 = 71;
pub const EDOTDOT: u32 = 73;
pub const EMULTIHOP: u32 = 74;
pub const EBADMSG: u32 = 77;
pub const ENAMETOOLONG: u32 = 78;
pub const EOVERFLOW: u32 = 79;
pub const ENOTUNIQ: u32 = 80;
pub const EBADFD: u32 = 81;
pub const EREMCHG: u32 = 82;
pub const ELIBACC: u32 = 83;
pub const ELIBBAD: u32 = 84;
pub const ELIBSCN: u32 = 85;
pub const ELIBMAX: u32 = 86;
pub const ELIBEXEC: u32 = 87;
pub const EILSEQ: u32 = 88;
pub const ENOSYS: u32 = 89;
pub const ELOOP: u32 = 90;
pub const ERESTART: u32 = 91;
pub const ESTRPIPE: u32 = 92;
pub const ENOTEMPTY: u32 = 93;
pub const EUSERS: u32 = 94;
pub const ENOTSOCK: u32 = 95;
pub const EDESTADDRREQ: u32 = 96;
pub const EMSGSIZE: u32 = 97;
pub const EPROTOTYPE: u32 = 98;
pub const ENOPROTOOPT: u32 = 99;
pub const EPROTONOSUPPORT: u32 = 120;
pub const ESOCKTNOSUPPORT: u32 = 121;
pub const EOPNOTSUPP: u32 = 122;
pub const EPFNOSUPPORT: u32 = 123;
pub const EAFNOSUPPORT: u32 = 124;
pub const EADDRINUSE: u32 = 125;
pub const EADDRNOTAVAIL: u32 = 126;
pub const ENETDOWN: u32 = 127;
pub const ENETUNREACH: u32 = 128;
pub const ENETRESET: u32 = 129;
pub const ECONNABORTED: u32 = 130;
pub const ECONNRESET: u32 = 131;
pub const ENOBUFS: u32 = 132;
pub const EISCONN: u32 = 133;
pub const ENOTCONN: u32 = 134;
pub const EUCLEAN: u32 = 135;
pub const ENOTNAM: u32 = 137;
pub const ENAVAIL: u32 = 138;
pub const EISNAM: u32 = 139;
pub const EREMOTEIO: u32 = 140;
pub const EINIT: u32 = 141;
pub const EREMDEV: u32 = 142;
pub const ESHUTDOWN: u32 = 143;
pub const ETOOMANYREFS: u32 = 144;
pub const ETIMEDOUT: u32 = 145;
pub const ECONNREFUSED: u32 = 146;
pub const EHOSTDOWN: u32 = 147;
pub const EHOSTUNREACH: u32 = 148;
pub const EWOULDBLOCK: u32 = 11;
pub const EALREADY: u32 = 149;
pub const EINPROGRESS: u32 = 150;
pub const ESTALE: u32 = 151;
pub const ECANCELED: u32 = 158;
pub const ENOMEDIUM: u32 = 159;
pub const EMEDIUMTYPE: u32 = 160;
pub const ENOKEY: u32 = 161;
pub const EKEYEXPIRED: u32 = 162;
pub const EKEYREVOKED: u32 = 163;
pub const EKEYREJECTED: u32 = 164;
pub const EOWNERDEAD: u32 = 165;
pub const ENOTRECOVERABLE: u32 = 166;
pub const ERFKILL: u32 = 167;
pub const EHWPOISON: u32 = 168;
pub const EDQUOT: u32 = 1133;
Loading