Skip to content
Snippets Groups Projects
Commit 154cbe33 authored by gregor herrmann's avatar gregor herrmann
Browse files

Add patches (from -3, -4, and -6) to support more architectures.

aarch64.patch, hppa.patch, mips.patch, ppc64le.patch, s390x.patch.

Closes: #824843, #824936, #826136
parent 1f3eb034
No related branches found
No related tags found
No related merge requests found
From 6c7c516edfabd2edc835d0aaad39f946164bb25d Mon Sep 17 00:00:00 2001
From: Yaakov Selkowitz <yselkowi@redhat.com>
Date: Fri, 4 Dec 2015 02:31:28 -0600
Subject: [PATCH 3/3] Add aarch64 support
This is a bit complicated because AArch64, as a completely new architecture,
does not support the deprecated epoll_create and epoll_wait syscalls.
Instead, these wrap the epoll_create1 and epoll_pwait syscalls, which serve
the same purpose but with slightly different syntaxes.
Origin: backport, https://github.com/bradfitz/sys-syscall/commit/6c7c516edfabd2edc835d0aaad39f946164bb25d
Bug-Debian: https://bugs.debian.org/824843
---
lib/Sys/Syscall.pm | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/lib/Sys/Syscall.pm b/lib/Sys/Syscall.pm
index 702e835..abd010a 100644
--- a/lib/Sys/Syscall.pm
+++ b/lib/Sys/Syscall.pm
@@ -48,6 +48,8 @@ our (
$SYS_readahead,
);
+our $no_deprecated = 0;
+
if ($^O eq "linux") {
# whether the machine requires 64-bit numbers to be on 8-byte
# boundaries.
@@ -101,6 +103,14 @@ if ($^O eq "linux") {
$SYS_epoll_wait = 409;
$SYS_readahead = 379;
$u64_mod_8 = 1;
+ } elsif ($machine eq "aarch64") {
+ $SYS_epoll_create = 20; # (sys_epoll_create1)
+ $SYS_epoll_ctl = 21;
+ $SYS_epoll_wait = 22; # (sys_epoll_pwait)
+ $SYS_sendfile = 71; # (sys_sendfile64)
+ $SYS_readahead = 213;
+ $u64_mod_8 = 1;
+ $no_deprecated = 1;
} elsif ($machine =~ m/arm(v\d+)?.*l/) {
# ARM OABI
$SYS_epoll_create = 250;
@@ -203,7 +213,7 @@ sub epoll_defined { return $SYS_epoll_create ? 1 : 0; }
# size doesn't even matter (radix tree now, not hash)
sub epoll_create {
return -1 unless defined $SYS_epoll_create;
- my $epfd = eval { syscall($SYS_epoll_create, ($_[0]||100)+0) };
+ my $epfd = eval { syscall($SYS_epoll_create, $no_deprecated ? 0 : ($_[0]||100)+0) };
return -1 if $@;
return $epfd;
}
@@ -241,7 +251,12 @@ sub epoll_wait_mod8 {
$epoll_wait_size = $_[1];
$epoll_wait_events = "\0" x 16 x $epoll_wait_size;
}
- my $ct = syscall($SYS_epoll_wait, $_[0]+0, $epoll_wait_events, $_[1]+0, $_[2]+0);
+ my $ct;
+ if ($no_deprecated) {
+ $ct = syscall($SYS_epoll_wait, $_[0]+0, $epoll_wait_events, $_[1]+0, $_[2]+0, undef);
+ } else {
+ $ct = syscall($SYS_epoll_wait, $_[0]+0, $epoll_wait_events, $_[1]+0, $_[2]+0);
+ }
for (0..$ct-1) {
# 16 byte epoll_event structs, with format:
# 4 byte mask [idx 1]
--
2.8.1
Author: Helge Deller <deller@gmx.de>
Date: Thu, 02 Jun 2016 22:45:38 +0300
Subject: Add hppa support
Bug-Debian: https://bugs.debian.org/826136
diff -up ./lib/Sys/Syscall.pm.org ./lib/Sys/Syscall.pm
--- ./lib/Sys/Syscall.pm.org 2016-06-02 12:53:33.256234247 +0200
+++ ./lib/Sys/Syscall.pm 2016-06-02 17:52:59.163282166 +0200
@@ -83,6 +83,13 @@ if ($^O eq "linux") {
$SYS_epoll_wait = 232;
$SYS_sendfile = 40;
$SYS_readahead = 187;
+ } elsif ($machine =~ m/^parisc/) {
+ $SYS_epoll_create = 224;
+ $SYS_epoll_ctl = 225;
+ $SYS_epoll_wait = 226;
+ $SYS_sendfile = 122; # sys_sendfile64=209
+ $SYS_readahead = 207;
+ $u64_mod_8 = 1;
} elsif ($machine =~ m/^ppc64/) {
$SYS_epoll_create = 236;
$SYS_epoll_ctl = 237;
From 27084cb9b8a0cdc0bdaae792a329ea3b35a9ef92 Mon Sep 17 00:00:00 2001
From: Niko Tyni <ntyni@debian.org>
Date: Sat, 21 May 2016 14:05:31 +0000
Subject: [PATCH] Add mips* support
Bug-Debian: https://bugs.debian.org/824936
---
lib/Sys/Syscall.pm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/lib/Sys/Syscall.pm b/lib/Sys/Syscall.pm
index b7ac0ce..165b152 100644
--- a/lib/Sys/Syscall.pm
+++ b/lib/Sys/Syscall.pm
@@ -64,6 +64,11 @@ if ($^O eq "linux") {
$machine = "i386";
}
+ # Similarly for mips64 vs mips
+ if ($machine eq "mips64" && $Config{ptrsize} == 4) {
+ $machine = "mips";
+ }
+
if ($machine =~ m/^i[3456]86$/) {
$SYS_epoll_create = 254;
$SYS_epoll_ctl = 255;
@@ -113,6 +118,20 @@ if ($^O eq "linux") {
$SYS_sendfile = 187;
$SYS_readahead = 225;
$u64_mod_8 = 1;
+ } elsif ($machine =~ m/^mips64/) {
+ $SYS_sendfile = 5039;
+ $SYS_epoll_create = 5207;
+ $SYS_epoll_ctl = 5208;
+ $SYS_epoll_wait = 5209;
+ $SYS_readahead = 5179;
+ $u64_mod_8 = 1;
+ } elsif ($machine =~ m/^mips/) {
+ $SYS_sendfile = 4207;
+ $SYS_epoll_create = 4248;
+ $SYS_epoll_ctl = 4249;
+ $SYS_epoll_wait = 4250;
+ $SYS_readahead = 4223;
+ $u64_mod_8 = 1;
} else {
# as a last resort, try using the *.ph files which may not
# exist or may be wrong
--
2.1.4
From b877ec33b331ba01e8fad8bed0d3cde55e1efa9e Mon Sep 17 00:00:00 2001
From: Yaakov Selkowitz <yselkowi@redhat.com>
Date: Fri, 4 Dec 2015 02:26:35 -0600
Subject: [PATCH 1/3] Add ppc64le support
Little endian uses the same syscalls as the big endian kernel.
Origin: upstream, https://github.com/bradfitz/sys-syscall/commit/b877ec33b331ba01e8fad8bed0d3cde55e1efa9e
Bug-Debian: https://bugs.debian.org/824843
---
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 8d7cca2..ece65de 100644
--- a/lib/Sys/Syscall.pm
+++ b/lib/Sys/Syscall.pm
@@ -65,7 +65,7 @@ if ($^O eq "linux") {
$SYS_epoll_wait = 232;
$SYS_sendfile = 40;
$SYS_readahead = 187;
- } elsif ($machine eq "ppc64") {
+ } elsif ($machine =~ m/^ppc64/) {
$SYS_epoll_create = 236;
$SYS_epoll_ctl = 237;
$SYS_epoll_wait = 238;
--
2.8.1
From 5628d9c0e299eea79e87aa8a5ed2d99a2895a4d0 Mon Sep 17 00:00:00 2001
From: Yaakov Selkowitz <yselkowi@redhat.com>
Date: Fri, 4 Dec 2015 02:28:00 -0600
Subject: [PATCH 2/3] Add s390/x support
Origin: upstream, https://github.com/bradfitz/sys-syscall/commit/5628d9c0e299eea79e87aa8a5ed2d99a2895a4d0
Bug-Debian: https://bugs.debian.org/824843
---
lib/Sys/Syscall.pm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lib/Sys/Syscall.pm b/lib/Sys/Syscall.pm
index ece65de..702e835 100644
--- a/lib/Sys/Syscall.pm
+++ b/lib/Sys/Syscall.pm
@@ -79,6 +79,13 @@ if ($^O eq "linux") {
$SYS_sendfile = 186; # sys_sendfile64=226
$SYS_readahead = 191;
$u64_mod_8 = 1;
+ } elsif ($machine =~ m/^s390/) {
+ $SYS_epoll_create = 249;
+ $SYS_epoll_ctl = 250;
+ $SYS_epoll_wait = 251;
+ $SYS_sendfile = 187; # sys_sendfile64=223
+ $SYS_readahead = 222;
+ $u64_mod_8 = 1;
} elsif ($machine eq "ia64") {
$SYS_epoll_create = 1243;
$SYS_epoll_ctl = 1244;
--
2.8.1
0001-restore-missing-changes-from-0.20.0.22.patch
ppc64le.patch
s390x.patch
aarch64.patch
mips.patch
hppa.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment