File: 0007-add-loongarch64-and-riscv64-support.patch

package info (click to toggle)
libsys-syscall-perl 0.25-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 228 kB
  • sloc: perl: 338; makefile: 7
file content (28 lines) | stat: -rw-r--r-- 963 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From: Eric Wong <e@80x24.org>
Date: Wed, 10 Jan 2024 19:28:48 +0000
Subject: add loongarch64 and riscv64 support

riscv64 tested on cfarm92.cfarm.net

I can't access cfarm40[01] right now, but I tested the epoll_*
syscall numbers a while ago for another project (not readahead
nor sendfile).

Thanks to gcc compiler farm (cfarm.net) for ssh access.
---
 lib/Sys/Syscall.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Sys/Syscall.pm b/lib/Sys/Syscall.pm
index a0a9b20..92c1024 100644
--- a/lib/Sys/Syscall.pm
+++ b/lib/Sys/Syscall.pm
@@ -126,7 +126,7 @@ if ($^O eq "linux") {
         $SYS_epoll_wait   = 409;
         $SYS_readahead    = 379;
         $u64_mod_8        = 1;
-    } elsif ($machine eq "aarch64") {
+    } elsif ($machine =~ /\A(?:loong|a)arch64\z/ || $machine eq 'riscv64') {
         $SYS_epoll_create = 20;  # (sys_epoll_create1)
         $SYS_epoll_ctl    = 21;
         $SYS_epoll_wait   = 22;  # (sys_epoll_pwait)