aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorShiz <hi@shiz.me>2017-05-13 06:14:23 +0200
committerShiz <hi@shiz.me>2017-05-13 06:17:47 +0200
commitde243a0b7a494f2cd02fde83179d68105df447a2 (patch)
treec1136c97dca3006317dd4f11fe03af354f42791a /community
parenta5c9034d9b328371a02550b581ee0e9f322ec07b (diff)
downloadaports-de243a0b7a494f2cd02fde83179d68105df447a2.tar.bz2
aports-de243a0b7a494f2cd02fde83179d68105df447a2.tar.xz
community/ocaml: attempt to fix ppc64le build
Diffstat (limited to 'community')
-rw-r--r--community/ocaml/APKBUILD6
-rw-r--r--community/ocaml/fix-mcontext-fields.patch49
-rw-r--r--community/ocaml/fix-s390x-mcontext-fields.patch20
3 files changed, 52 insertions, 23 deletions
diff --git a/community/ocaml/APKBUILD b/community/ocaml/APKBUILD
index 61ca0e271c..79f4dbb8d5 100644
--- a/community/ocaml/APKBUILD
+++ b/community/ocaml/APKBUILD
@@ -5,7 +5,7 @@ pkgver=4.04.1
pkgrel=0
pkgdesc="Main implementation of the Caml programming language"
url="http://caml.inria.fr"
-arch="all !x86 !armhf !ppc64le"
+arch="all !x86 !armhf"
license="LGPLv2"
makedepends="ncurses-dev zlib-dev gdbm-dev"
depends="ncurses-dev"
@@ -15,7 +15,7 @@ source="http://caml.inria.fr/pub/distrib/ocaml-${pkgver%.*}/$pkgname-$pkgver.tar
010_all_execstacks.patch
020_all_configure.patch
050_all_objinfoldflags.patch
- fix-s390x-mcontext-fields.patch
+ fix-mcontext-fields.patch
"
builddir="$srcdir/$pkgname-$pkgver"
@@ -60,4 +60,4 @@ sha512sums="e7ecbd661026d1bb3dfb0416adb15a842514d3b76e85f8b0daa921b10e5773b7d990
71ac807fb1173863b9dcf8e5fb4e651e0155d6cd0e4b327f5457b83fc09e1b5fbe34150c5d8ccd24f0faff1a8419f5ed8310aa60af1f38c2766ccc37dc6c3835 010_all_execstacks.patch
286758402517a1345556d374b0c3fc49eb93f1ec2bb9ccd2ffe1cc043f59d93b154f68eb9ff410020a15d3d8f148b27f249b7f97954b0e8a080cdd32d6014b4a 020_all_configure.patch
61d9cae6c8be7c16ed4aa6fafc533e2879caadbbe0e023775c1d735c0e54e66e94b9ffab8dc0b0b12c19ccf5c389e05f62af822014d202ae54c52943a0639753 050_all_objinfoldflags.patch
-76eeec042f21a3d81487275ac6745e598ceb0d30937870d8aa3f7186bb656ec950d3bd6dc42812a838dbdf6fa28794be5014277761c82a414e2e93b6ee2bea1e fix-s390x-mcontext-fields.patch"
+9e8fb4465256e95b9272e3be43b4bda6a36451cc40b3d21a40fd5224c60e26e2142a77929b2e6609a7d3b8b271c293706b03fc917078e0215762adb088b1bfca fix-mcontext-fields.patch"
diff --git a/community/ocaml/fix-mcontext-fields.patch b/community/ocaml/fix-mcontext-fields.patch
new file mode 100644
index 0000000000..846a0d88d3
--- /dev/null
+++ b/community/ocaml/fix-mcontext-fields.patch
@@ -0,0 +1,49 @@
+diff -Nru a/asmrun/signals_osdep.h b/asmrun/signals_osdep.h
+--- a/asmrun/signals_osdep.h 2016-11-04 16:08:24.000000000 +0000
++++ b/asmrun/signals_osdep.h 2017-05-13 03:16:28.749615533 +0000
+@@ -314,11 +314,11 @@
+ sigact.sa_flags = 0
+
+ typedef unsigned long context_reg;
+- #define CONTEXT_PC (context->sregs->regs.psw.addr)
+- #define CONTEXT_EXCEPTION_POINTER (context->sregs->regs.gprs[13])
+- #define CONTEXT_YOUNG_LIMIT (context->sregs->regs.gprs[10])
+- #define CONTEXT_YOUNG_PTR (context->sregs->regs.gprs[11])
+- #define CONTEXT_SP (context->sregs->regs.gprs[15])
++ #define CONTEXT_PC (context->sregs->psw.addr)
++ #define CONTEXT_EXCEPTION_POINTER (context->sregs->gregs[13])
++ #define CONTEXT_YOUNG_LIMIT (context->sregs->gregs[10])
++ #define CONTEXT_YOUNG_PTR (context->sregs->gregs[11])
++ #define CONTEXT_SP (context->sregs->gregs[15])
+
+ /****************** PowerPC, BSD */
+
+diff -Nru a/asmrun/signals_osdep.h b/asmrun/signals_osdep.h
+--- a/asmrun/signals_osdep.h 2017-05-13 03:19:52.863954544 +0000
++++ b/asmrun/signals_osdep.h 2017-05-13 04:10:48.417194351 +0000
+@@ -297,11 +297,20 @@
+ sigact.sa_flags = 0
+
+ typedef unsigned long context_reg;
+- #define CONTEXT_PC (context->regs->nip)
+- #define CONTEXT_EXCEPTION_POINTER (context->regs->gpr[29])
+- #define CONTEXT_YOUNG_LIMIT (context->regs->gpr[30])
+- #define CONTEXT_YOUNG_PTR (context->regs->gpr[31])
+- #define CONTEXT_SP (context->regs->gpr[1])
++
++ #ifdef __powerpc64__
++ #define CONTEXT_PC (context->regs->gp_regs[32])
++ #define CONTEXT_EXCEPTION_POINTER (context->regs->gp_regs[29])
++ #define CONTEXT_YOUNG_LIMIT (context->regs->gp_regs[30])
++ #define CONTEXT_YOUNG_PTR (context->regs->gp_regs[31])
++ #define CONTEXT_SP (context->regs->gp_regs[1])
++ #else
++ #define CONTEXT_PC (context->regs->nip)
++ #define CONTEXT_EXCEPTION_POINTER (context->regs->gpr[29])
++ #define CONTEXT_YOUNG_LIMIT (context->regs->gpr[30])
++ #define CONTEXT_YOUNG_PTR (context->regs->gpr[31])
++ #define CONTEXT_SP (context->regs->gpr[1])
++ #endif
+
+ /****************** s390x, ELF (Linux) */
+ #elif defined(TARGET_s390x) && defined(SYS_elf)
diff --git a/community/ocaml/fix-s390x-mcontext-fields.patch b/community/ocaml/fix-s390x-mcontext-fields.patch
deleted file mode 100644
index 71435f284a..0000000000
--- a/community/ocaml/fix-s390x-mcontext-fields.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -Nru a/asmrun/signals_osdep.h b/asmrun/signals_osdep.h
---- a/asmrun/signals_osdep.h 2016-11-04 16:08:24.000000000 +0000
-+++ b/asmrun/signals_osdep.h 2017-05-13 03:16:28.749615533 +0000
-@@ -314,11 +314,11 @@
- sigact.sa_flags = 0
-
- typedef unsigned long context_reg;
-- #define CONTEXT_PC (context->sregs->regs.psw.addr)
-- #define CONTEXT_EXCEPTION_POINTER (context->sregs->regs.gprs[13])
-- #define CONTEXT_YOUNG_LIMIT (context->sregs->regs.gprs[10])
-- #define CONTEXT_YOUNG_PTR (context->sregs->regs.gprs[11])
-- #define CONTEXT_SP (context->sregs->regs.gprs[15])
-+ #define CONTEXT_PC (context->sregs->psw.addr)
-+ #define CONTEXT_EXCEPTION_POINTER (context->sregs->gprs[13])
-+ #define CONTEXT_YOUNG_LIMIT (context->sregs->gprs[10])
-+ #define CONTEXT_YOUNG_PTR (context->sregs->gprs[11])
-+ #define CONTEXT_SP (context->sregs->gprs[15])
-
- /****************** PowerPC, BSD */
-