aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTBK <tbk@jjtc.eu>2020-03-19 20:15:02 +0100
committerAriadne Conill <ariadne@dereferenced.org>2020-03-22 23:51:48 +0000
commitd7bd4f685b75fa09c84e9e0c686bf61eda4672d5 (patch)
tree5820c0295e2386341559f1a873f4c84e4ecad4d4
parent3b01610703b86f8b7642b511d9bd79f2965815c0 (diff)
downloadaports-d7bd4f685b75fa09c84e9e0c686bf61eda4672d5.tar.bz2
aports-d7bd4f685b75fa09c84e9e0c686bf61eda4672d5.tar.xz
main/musl: backport ppc64le fixes
-rw-r--r--main/musl/APKBUILD6
-rw-r--r--main/musl/ppc-pt_regs.patch38
-rw-r--r--main/musl/ppc64-fpregset_t.patch31
3 files changed, 74 insertions, 1 deletions
diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD
index c957e00219..6d95cd5a77 100644
--- a/main/musl/APKBUILD
+++ b/main/musl/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=musl
pkgver=1.1.24
-pkgrel=3
+pkgrel=4
pkgdesc="the musl c library (libc) implementation"
url="https://musl.libc.org/"
arch="all"
@@ -27,6 +27,8 @@ source="https://musl.libc.org/releases/musl-$pkgver.tar.gz
fix-return-value-of-ungetc-when-argument-is-outside-.patch
fix-errno-for-posix_openpt-with-no-free-ptys-availab.patch
improve-strerror-speed.patch
+ ppc-pt_regs.patch
+ ppc64-fpregset_t.patch
ldconfig
__stack_chk_fail_local.c
@@ -177,6 +179,8 @@ sha512sums="8987f1e194ea616f34f4f21fe9def28fb7f81d7060e38619206c6349f79db3bbb76b
81bddb171fc2171a7aa86e74bf674e3a99508d27416dfc1cfcf2824f17b33ee7dda7c5968a8a69a542fdd6eecded5b8e3973e81079d9a061aa80142d08fc1a90 fix-return-value-of-ungetc-when-argument-is-outside-.patch
144b4525483cbc97f0414955b7e5ce42c9ff69580e5be714b56330da30b0687911bd6019aef3c8611bd0a5bd7671d690b66b4920ae47cf3442a1c982ed000e22 fix-errno-for-posix_openpt-with-no-free-ptys-availab.patch
4875efd7249613f696b4c470fb0aedf9968f1260cf35ef640666897d9ef2f3032588ac4c37659928ed45c1c010848ec2b19414ba5406f3bd7d745288b8b105d4 improve-strerror-speed.patch
+e7133ce2f0b172e2da03567e41f03bef58b6ff8eaac614494751228bcc102c39cbe312f0beb567c5f1c47c76feeff1e8d3b16284842c599029add4ad6d1d70ec ppc-pt_regs.patch
+3de8e50519e33a55d2cc737b56011a7178d1c83230477d46e11e67195e08e74bff735c6013de6ff170bb2390e89bfca9919cc8728c064b3eeaab2035dd7e5c08 ppc64-fpregset_t.patch
8d3a2d5315fc56fee7da9abb8b89bb38c6046c33d154c10d168fb35bfde6b0cf9f13042a3bceee34daf091bc409d699223735dcf19f382eeee1f6be34154f26f ldconfig
062bb49fa54839010acd4af113e20f7263dde1c8a2ca359b5fb2661ef9ed9d84a0f7c3bc10c25dcfa10bb3c5a4874588dff636ac43d5dbb3d748d75400756d0b __stack_chk_fail_local.c
0d80f37b34a35e3d14b012257c50862dfeb9d2c81139ea2dfa101d981d093b009b9fa450ba27a708ac59377a48626971dfc58e20a3799084a65777a0c32cbc7d getconf.c
diff --git a/main/musl/ppc-pt_regs.patch b/main/musl/ppc-pt_regs.patch
new file mode 100644
index 0000000000..45815321bf
--- /dev/null
+++ b/main/musl/ppc-pt_regs.patch
@@ -0,0 +1,38 @@
+commit c2518a8efb6507f1b41c3b12e03b06f8f2317a1f
+Author: Rich Felker <dalias@aerifal.cx>
+Date: Sat Oct 19 15:53:43 2019 -0400
+
+ use struct pt_regs * rather than void * for powerpc[64] sigcontext regs
+
+ this is to match the kernel and glibc interfaces. here, struct pt_regs
+ is an incomplete type, but that's harmless, and if it's completed by
+ inclusion of another header then members of the struct pointed to by
+ the regs member can be accessed directly without going through a cast
+ or intermediate pointer object.
+
+diff --git a/arch/powerpc/bits/signal.h b/arch/powerpc/bits/signal.h
+index 06efb11c..c1bf3caf 100644
+--- a/arch/powerpc/bits/signal.h
++++ b/arch/powerpc/bits/signal.h
+@@ -28,7 +28,7 @@ struct sigcontext {
+ int signal;
+ unsigned long handler;
+ unsigned long oldmask;
+- void *regs;
++ struct pt_regs *regs;
+ };
+
+ typedef struct {
+diff --git a/arch/powerpc64/bits/signal.h b/arch/powerpc64/bits/signal.h
+index 4dec22a5..d5493b18 100644
+--- a/arch/powerpc64/bits/signal.h
++++ b/arch/powerpc64/bits/signal.h
+@@ -32,7 +32,7 @@ typedef struct sigcontext {
+ int _pad0;
+ unsigned long handler;
+ unsigned long oldmask;
+- void *regs;
++ struct pt_regs *regs;
+ gregset_t gp_regs;
+ fpregset_t fp_regs;
+ vrregset_t *v_regs;
diff --git a/main/musl/ppc64-fpregset_t.patch b/main/musl/ppc64-fpregset_t.patch
new file mode 100644
index 0000000000..12617ba0ef
--- /dev/null
+++ b/main/musl/ppc64-fpregset_t.patch
@@ -0,0 +1,31 @@
+commit c9f48cde0a22641ce3daf54596a9ecebdab91435
+Author: Rich Felker <dalias@aerifal.cx>
+Date: Sat Oct 19 15:39:45 2019 -0400
+
+ fix fpregset_t type on powerpc64
+
+ the userspace ucontext API has this as an array rather than a
+ structure.
+
+ commit 3c59a868956636bc8adafb1b168d090897692532 fixed the
+ corresponding mistake for vrregset_t, namely that the original
+ powerpc64 port used a mix of types from 32-bit powerpc and powerpc64
+ rather than matching the 64-bit types.
+
+diff --git a/arch/powerpc64/bits/signal.h b/arch/powerpc64/bits/signal.h
+index 2cc0604c..4dec22a5 100644
+--- a/arch/powerpc64/bits/signal.h
++++ b/arch/powerpc64/bits/signal.h
+@@ -9,11 +9,7 @@
+ #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+
+ typedef unsigned long greg_t, gregset_t[48];
+-
+-typedef struct {
+- double fpregs[32];
+- double fpscr;
+-} fpregset_t;
++typedef double fpregset_t[33];
+
+ typedef struct {
+ #ifdef __GNUC__