From 10e69dbc99812775ad68b30c8d20cdae2346bca2 Mon Sep 17 00:00:00 2001 From: msizanoen1 Date: Thu, 9 Jan 2020 10:22:08 +0700 Subject: Add RISC-V support on GNU/Linux --- src/sys/ioctl/linux.rs | 3 ++- src/sys/ptrace/linux.rs | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/sys/ioctl/linux.rs b/src/sys/ioctl/linux.rs index 9cdac72a..68ebaba9 100644 --- a/src/sys/ioctl/linux.rs +++ b/src/sys/ioctl/linux.rs @@ -33,7 +33,8 @@ mod consts { target_arch = "arm", target_arch = "s390x", target_arch = "x86_64", - target_arch = "aarch64"))] + target_arch = "aarch64", + target_arch = "riscv64"))] mod consts { #[doc(hidden)] pub const NONE: u8 = 0; diff --git a/src/sys/ptrace/linux.rs b/src/sys/ptrace/linux.rs index 662425ae..ba0e6148 100644 --- a/src/sys/ptrace/linux.rs +++ b/src/sys/ptrace/linux.rs @@ -46,6 +46,7 @@ libc_enum!{ target_arch = "mips", target_arch = "mips64", target_arch = "x86_64", + target_arch = "riscv64", target_pointer_width = "32"))))] PTRACE_GETREGS, #[cfg(any(all(target_os = "android", target_pointer_width = "32"), @@ -53,6 +54,7 @@ libc_enum!{ target_arch = "mips", target_arch = "mips64", target_arch = "x86_64", + target_arch = "riscv64", target_pointer_width = "32"))))] PTRACE_SETREGS, #[cfg(any(all(target_os = "android", target_pointer_width = "32"), @@ -60,6 +62,7 @@ libc_enum!{ target_arch = "mips", target_arch = "mips64", target_arch = "x86_64", + target_arch = "riscv64", target_pointer_width = "32"))))] PTRACE_GETFPREGS, #[cfg(any(all(target_os = "android", target_pointer_width = "32"), @@ -67,6 +70,7 @@ libc_enum!{ target_arch = "mips", target_arch = "mips64", target_arch = "x86_64", + target_arch = "riscv64", target_pointer_width = "32"))))] PTRACE_SETFPREGS, PTRACE_ATTACH, @@ -75,13 +79,15 @@ libc_enum!{ target_arch = "mips", target_arch = "mips64", target_arch = "x86", - target_arch = "x86_64")))] + target_arch = "x86_64", + target_arch = "riscv64")))] PTRACE_GETFPXREGS, #[cfg(all(target_os = "linux", any(target_env = "musl", target_arch = "mips", target_arch = "mips64", target_arch = "x86", - target_arch = "x86_64")))] + target_arch = "x86_64", + target_arch = "riscv64")))] PTRACE_SETFPXREGS, PTRACE_SYSCALL, PTRACE_SETOPTIONS, -- cgit v1.2.3