mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
ocaml: update to 5.1.1.
This commit is contained in:
parent
a69fb46c43
commit
a316b91d4e
4 changed files with 12 additions and 262 deletions
|
@ -1,11 +0,0 @@
|
||||||
--- a/runtime/signals_osdep.h
|
|
||||||
+++ b/runtime/signals_osdep.h
|
|
||||||
@@ -309,6 +309,8 @@
|
|
||||||
|
|
||||||
#elif defined(TARGET_power) && defined(SYS_elf)
|
|
||||||
|
|
||||||
+ #include <asm/ptrace.h>
|
|
||||||
+
|
|
||||||
#define DECLARE_SIGNAL_HANDLER(name) \
|
|
||||||
static void name(int sig, struct sigcontext * context)
|
|
||||||
|
|
|
@ -1,198 +0,0 @@
|
||||||
--- ocaml-4.08.0/asmcomp/power/arch.ml
|
|
||||||
+++ ocaml-4.08.0/asmcomp/power/arch.ml
|
|
||||||
@@ -28,7 +28,7 @@ type abi = ELF32 | ELF64v1 | ELF64v2
|
|
||||||
let abi =
|
|
||||||
match Config.model with
|
|
||||||
| "ppc" -> ELF32
|
|
||||||
- | "ppc64" -> ELF64v1
|
|
||||||
+ | "ppc64" -> ELF64v2
|
|
||||||
| "ppc64le" -> ELF64v2
|
|
||||||
| _ -> assert false
|
|
||||||
|
|
||||||
--- ocaml-4.10.0/runtime/power.S
|
|
||||||
+++ ocaml-4.10.0/runtime/power.S
|
|
||||||
@@ -13,7 +13,7 @@
|
|
||||||
/* */
|
|
||||||
/**************************************************************************/
|
|
||||||
|
|
||||||
-#if defined(MODEL_ppc64le)
|
|
||||||
+#if _CALL_ELF == 2
|
|
||||||
.abiversion 2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -52,8 +52,7 @@
|
|
||||||
#define TRAP_PREVIOUS_OFFSET 4
|
|
||||||
#define CALLBACK_LINK_SIZE 16
|
|
||||||
#define CALLBACK_LINK_OFFSET 0
|
|
||||||
-#endif
|
|
||||||
-#if defined(MODEL_ppc64)
|
|
||||||
+#elif _CALL_ELF == 1
|
|
||||||
#define RESERVED_STACK 48
|
|
||||||
#define PARAM_SAVE_AREA (8*8)
|
|
||||||
#define LR_SAVE 16
|
|
||||||
@@ -64,8 +63,7 @@
|
|
||||||
#define TRAP_PREVIOUS_OFFSET 64
|
|
||||||
#define CALLBACK_LINK_SIZE 32
|
|
||||||
#define CALLBACK_LINK_OFFSET 48
|
|
||||||
-#endif
|
|
||||||
-#if defined(MODEL_ppc64le)
|
|
||||||
+#elif _CALL_ELF == 2
|
|
||||||
#define RESERVED_STACK 32
|
|
||||||
#define PARAM_SAVE_AREA 0
|
|
||||||
#define LR_SAVE 16
|
|
||||||
@@ -91,9 +89,8 @@
|
|
||||||
#define ENDFUNCTION(name) \
|
|
||||||
.size name, . - name
|
|
||||||
|
|
||||||
-#endif
|
|
||||||
|
|
||||||
-#if defined(MODEL_ppc64)
|
|
||||||
+#elif _CALL_ELF == 1
|
|
||||||
#define FUNCTION(name) \
|
|
||||||
.section ".opd","aw"; \
|
|
||||||
.align 3; \
|
|
||||||
@@ -107,9 +104,8 @@
|
|
||||||
#define ENDFUNCTION(name) \
|
|
||||||
.size name, . - .L.name
|
|
||||||
|
|
||||||
-#endif
|
|
||||||
|
|
||||||
-#if defined(MODEL_ppc64le)
|
|
||||||
+#elif _CALL_ELF == 2
|
|
||||||
#define FUNCTION(name) \
|
|
||||||
.section ".text"; \
|
|
||||||
.globl name; \
|
|
||||||
@@ -151,7 +147,7 @@
|
|
||||||
|
|
||||||
#define Caml_state(var) 8*domain_field_caml_##var(28)
|
|
||||||
|
|
||||||
-#if defined(MODEL_ppc64)
|
|
||||||
+#if _CALL_ELF == 1
|
|
||||||
.section ".opd","aw"
|
|
||||||
#else
|
|
||||||
.section ".text"
|
|
||||||
@@ -332,14 +328,14 @@
|
|
||||||
#if defined(MODEL_ppc)
|
|
||||||
mtctr C_CALL_FUN
|
|
||||||
bctrl
|
|
||||||
-#elif defined(MODEL_ppc64)
|
|
||||||
+#elif _CALL_ELF == 1
|
|
||||||
ld 0, 0(C_CALL_FUN)
|
|
||||||
mr C_CALL_TOC, 2 /* save current TOC in a callee-save register */
|
|
||||||
mtctr 0
|
|
||||||
ld 2, 8(C_CALL_FUN)
|
|
||||||
bctrl
|
|
||||||
mr 2, C_CALL_TOC /* restore current TOC */
|
|
||||||
-#elif defined(MODEL_ppc64le)
|
|
||||||
+#elif _CALL_ELF == 2
|
|
||||||
mtctr C_CALL_FUN
|
|
||||||
mr 12, C_CALL_FUN
|
|
||||||
mr C_CALL_TOC, 2 /* save current TOC in a callee-save register */
|
|
||||||
@@ -515,14 +511,14 @@
|
|
||||||
#if defined(MODEL_ppc)
|
|
||||||
mtctr 12
|
|
||||||
.L105: bctrl
|
|
||||||
-#elif defined(MODEL_ppc64)
|
|
||||||
+#elif _CALL_ELF == 1
|
|
||||||
ld 0, 0(12)
|
|
||||||
mtctr 0
|
|
||||||
std 2, TOC_SAVE(1)
|
|
||||||
ld 2, 8(12)
|
|
||||||
.L105: bctrl
|
|
||||||
ld 2, TOC_SAVE(1)
|
|
||||||
-#elif defined(MODEL_ppc64le)
|
|
||||||
+#elif _CALL_ELF == 2
|
|
||||||
mtctr 12
|
|
||||||
std 2, TOC_SAVE(1)
|
|
||||||
.L105: bctrl
|
|
||||||
@@ -641,7 +637,7 @@
|
|
||||||
b .L102
|
|
||||||
ENDFUNCTION(caml_callback3_asm)
|
|
||||||
|
|
||||||
-#if defined(MODEL_ppc64)
|
|
||||||
+#if _CALL_ELF == 1
|
|
||||||
.section ".opd","aw"
|
|
||||||
#else
|
|
||||||
.section ".text"
|
|
||||||
--- ocaml-4.08.0/testsuite/tools/asmgen_power.S
|
|
||||||
+++ ocaml-4.08.0/testsuite/tools/asmgen_power.S
|
|
||||||
@@ -25,12 +25,10 @@
|
|
||||||
#if defined(MODEL_ppc)
|
|
||||||
#define RESERVED_STACK 16
|
|
||||||
#define LR_SAVE_AREA 4
|
|
||||||
-#endif
|
|
||||||
-#if defined(MODEL_ppc64)
|
|
||||||
+#elif _CALL_ELF == 1
|
|
||||||
#define RESERVED_STACK 48
|
|
||||||
#define LR_SAVE_AREA 16
|
|
||||||
-#endif
|
|
||||||
-#if defined(MODEL_ppc64le)
|
|
||||||
+#elif _CALL_ELF == 2
|
|
||||||
#define RESERVED_STACK 32
|
|
||||||
#define LR_SAVE_AREA 16
|
|
||||||
#endif
|
|
||||||
@@ -44,9 +42,8 @@
|
|
||||||
.type name, @function; \
|
|
||||||
.align 2; \
|
|
||||||
name:
|
|
||||||
-#endif
|
|
||||||
|
|
||||||
-#if defined(MODEL_ppc64)
|
|
||||||
+#elif _CALL_ELF == 1
|
|
||||||
#define FUNCTION(name) \
|
|
||||||
.section ".opd","aw"; \
|
|
||||||
.align 3; \
|
|
||||||
@@ -56,9 +53,8 @@
|
|
||||||
.text; \
|
|
||||||
.align 2; \
|
|
||||||
.L.name:
|
|
||||||
-#endif
|
|
||||||
|
|
||||||
-#if defined(MODEL_ppc64le)
|
|
||||||
+#elif _CALL_ELF == 2
|
|
||||||
#define FUNCTION(name) \
|
|
||||||
.section ".text"; \
|
|
||||||
.globl name; \
|
|
||||||
@@ -118,11 +114,11 @@ FUNCTION(call_gen_code)
|
|
||||||
/* Get function pointer in CTR */
|
|
||||||
#if defined(MODEL_ppc)
|
|
||||||
mtctr 3
|
|
||||||
-#elif defined(MODEL_ppc64)
|
|
||||||
+#elif _CALL_ELF == 1
|
|
||||||
ld 0, 0(3)
|
|
||||||
mtctr 0
|
|
||||||
ld 2, 8(3)
|
|
||||||
-#elif defined(MODEL_ppc64le)
|
|
||||||
+#elif _CALL_ELF == 2
|
|
||||||
mtctr 3
|
|
||||||
mr 12, 3
|
|
||||||
#else
|
|
||||||
@@ -184,11 +180,11 @@ FUNCTION(caml_c_call)
|
|
||||||
/* Jump to C function (address in r28) */
|
|
||||||
#if defined(MODEL_ppc)
|
|
||||||
mtctr 28
|
|
||||||
-#elif defined(MODEL_ppc64)
|
|
||||||
+#elif _CALL_ELF == 1
|
|
||||||
ld 0, 0(28)
|
|
||||||
mtctr 0
|
|
||||||
ld 2, 8(28)
|
|
||||||
-#elif defined(MODEL_ppc64le)
|
|
||||||
+#elif _CALL_ELF == 2
|
|
||||||
mtctr 28
|
|
||||||
mr 12, 28
|
|
||||||
#else
|
|
||||||
--- ocaml-4.08.0/runtime/caml/stack.h
|
|
||||||
+++ ocaml-4.08.0/runtime/caml/stack.h
|
|
||||||
@@ -35,10 +35,10 @@
|
|
||||||
#if defined(MODEL_ppc)
|
|
||||||
#define Saved_return_address(sp) *((intnat *)((sp) - 4))
|
|
||||||
#define Callback_link(sp) ((struct caml_context *)((sp) + 16))
|
|
||||||
-#elif defined(MODEL_ppc64)
|
|
||||||
+#elif _CALL_ELF == 1
|
|
||||||
#define Saved_return_address(sp) *((intnat *)((sp) + 16))
|
|
||||||
#define Callback_link(sp) ((struct caml_context *)((sp) + (48 + 32)))
|
|
||||||
-#elif defined(MODEL_ppc64le)
|
|
||||||
+#elif _CALL_ELF == 2
|
|
||||||
#define Saved_return_address(sp) *((intnat *)((sp) + 16))
|
|
||||||
#define Callback_link(sp) ((struct caml_context *)((sp) + (32 + 32)))
|
|
||||||
#else
|
|
|
@ -1,42 +0,0 @@
|
||||||
--- ocaml-4.11.0/asmcomp/emitaux.ml
|
|
||||||
+++ ocaml-4.11.0/asmcomp/emitaux.ml
|
|
||||||
@@ -268,6 +268,7 @@
|
|
||||||
match rdbg with
|
|
||||||
| [] -> assert false
|
|
||||||
| d :: rest -> emit rs d rest in
|
|
||||||
+ a.efa_align Arch.size_addr;
|
|
||||||
a.efa_word (List.length !frame_descriptors);
|
|
||||||
List.iter emit_frame !frame_descriptors;
|
|
||||||
Label_table.iter emit_debuginfo debuginfos;
|
|
||||||
--- ocaml-4.08.0/runtime/power.S
|
|
||||||
+++ ocaml-4.08.0/runtime/power.S
|
|
||||||
@@ -642,6 +642,7 @@ caml_system__code_end:
|
|
||||||
/* Frame table */
|
|
||||||
|
|
||||||
.section ".data"
|
|
||||||
+ .align wordalign
|
|
||||||
.globl caml_system__frametable
|
|
||||||
.type caml_system__frametable, @object
|
|
||||||
caml_system__frametable:
|
|
||||||
--- ocaml-4.14.0/configure.ac
|
|
||||||
+++ ocaml-4.14.0/configure.ac
|
|
||||||
@@ -1006,7 +1006,7 @@ AS_IF([test $arch != "none" && $arch64 ],
|
|
||||||
# e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
|
|
||||||
|
|
||||||
AS_CASE([$arch],
|
|
||||||
- [amd64|arm64|s390x|none],
|
|
||||||
+ [amd64|arm64|s390x|power|none],
|
|
||||||
# ocamlopt generates PIC code or doesn't generate code at all
|
|
||||||
[],
|
|
||||||
[AS_CASE([$host],
|
|
||||||
--- ocaml-4.14.0/configure
|
|
||||||
+++ ocaml-4.14.0/configure
|
|
||||||
@@ -13886,7 +13886,7 @@
|
|
||||||
# e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
|
|
||||||
|
|
||||||
case $arch in #(
|
|
||||||
- amd64|arm64|s390x|none) :
|
|
||||||
+ amd64|arm64|s390x|power|none) :
|
|
||||||
# ocamlopt generates PIC code or doesn't generate code at all
|
|
||||||
;; #(
|
|
||||||
*) :
|
|
|
@ -1,26 +1,27 @@
|
||||||
# Template file for 'ocaml'
|
# Template file for 'ocaml'
|
||||||
pkgname=ocaml
|
pkgname=ocaml
|
||||||
version=4.14.0
|
version=5.1.1
|
||||||
revision=2
|
revision=1
|
||||||
build_style="gnu-configure"
|
build_style="gnu-configure"
|
||||||
configure_args="--with-pic --libdir=/usr/lib/ocaml"
|
configure_args="--with-pic --libdir=/usr/lib/ocaml"
|
||||||
make_build_target="world.opt"
|
makedepends="libzstd-devel"
|
||||||
makedepends="ncurses-devel libX11-devel"
|
depends="${makedepends}"
|
||||||
short_desc="Main implementation of the Caml language"
|
short_desc="Main implementation of the OCaml language"
|
||||||
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
||||||
license="QPL-1.0, LGPL-2.1-only"
|
license="QPL-1.0, LGPL-2.1-only"
|
||||||
homepage="http://ocaml.org/"
|
homepage="http://ocaml.org/"
|
||||||
distfiles="https://github.com/${pkgname}/${pkgname}/archive/${version}.tar.gz"
|
distfiles="https://github.com/ocaml/ocaml/archive/${version}.tar.gz"
|
||||||
checksum=39f44260382f28d1054c5f9d8bf4753cb7ad64027da792f7938344544da155e8
|
checksum=57f7b382b3d71198413ede405d95ef3506f1cdc480cda1dca1e26b37cb090e17
|
||||||
nocross=yes
|
nocross=yes
|
||||||
|
|
||||||
export ASPP="cc -c"
|
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
# also just segfaults when compiled without PIE (BSS-PLT?)
|
# native code platforms
|
||||||
ppc-musl) broken="/usr/bin/ocamlc: unsupported relocation type 6";;
|
x86_64*|aarch64*|riscv64*) make_build_target="world.opt";;
|
||||||
|
*) make_build_target="world";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
export ASPP="cc -c"
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
vlicense LICENSE
|
vlicense LICENSE
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue