diff options
| author | Alfredo Tupone <tupone@gentoo.org> | 2025-11-24 12:36:57 +0100 |
|---|---|---|
| committer | Alfredo Tupone <tupone@gentoo.org> | 2025-11-24 12:36:57 +0100 |
| commit | 23db6834c03a4ad3519dd9067a66a183ed38bfde (patch) | |
| tree | 739e5d6be9255f0150092b298cd7e0d9e888076b /dev-lang/ocaml/files | |
| parent | 38ce58b3dbcf9cd0c5603e7b1825c65cdb126169 (diff) | |
| download | gentoo-23db6834c03a4ad3519dd9067a66a183ed38bfde.tar.gz gentoo-23db6834c03a4ad3519dd9067a66a183ed38bfde.tar.bz2 gentoo-23db6834c03a4ad3519dd9067a66a183ed38bfde.zip | |
dev-lang/ocaml: drop 4.13.1
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'dev-lang/ocaml/files')
| -rw-r--r-- | dev-lang/ocaml/files/ocaml-4.12.0-glibc-2.34.patch | 91 | ||||
| -rw-r--r-- | dev-lang/ocaml/files/ocaml-4.12.1-fix-textrel-riscv.patch | 46 |
2 files changed, 0 insertions, 137 deletions
diff --git a/dev-lang/ocaml/files/ocaml-4.12.0-glibc-2.34.patch b/dev-lang/ocaml/files/ocaml-4.12.0-glibc-2.34.patch deleted file mode 100644 index 486b44846a86..000000000000 --- a/dev-lang/ocaml/files/ocaml-4.12.0-glibc-2.34.patch +++ /dev/null @@ -1,91 +0,0 @@ -https://src.fedoraproject.org/rpms/ocaml/blob/129153b85109944bf0b2922949f77ef8f32b39a1/f/0004-Dynamically-allocate-the-alternate-signal-stack-1026.patch -https://bugs.gentoo.org/816765 - -From 3104d92743614f8f52039e0520116af4179880a5 Mon Sep 17 00:00:00 2001 -From: Xavier Leroy <xavierleroy@users.noreply.github.com> -Date: Fri, 5 Mar 2021 19:14:07 +0100 -Subject: [PATCH 4/4] Dynamically allocate the alternate signal stack (#10266) - -In Glibc 2.34 and later, SIGSTKSZ may not be a compile-time constant. -It is no longer possible to statically allocate the alternate signal -stack for the main thread, as we've been doing for the last 25 years. - -This commit implements dynamic allocation of the alternate signal stack -even for the main thread. It reuses the code already in place to allocate -the alternate signal stack for other threads. - -Fixes: #10250. -(cherry picked from commit fc9534746bf5d08a4c109f22e344cf49d5d46d54) ---- a/runtime/caml/signals.h -+++ b/runtime/caml/signals.h -@@ -87,7 +87,7 @@ value caml_do_pending_actions_exn (void); - value caml_process_pending_actions_with_root (value extra_root); // raises - value caml_process_pending_actions_with_root_exn (value extra_root); - int caml_set_signal_action(int signo, int action); --CAMLextern void caml_setup_stack_overflow_detection(void); -+CAMLextern int caml_setup_stack_overflow_detection(void); - - CAMLextern void (*caml_enter_blocking_section_hook)(void); - CAMLextern void (*caml_leave_blocking_section_hook)(void); ---- a/runtime/signals_byt.c -+++ b/runtime/signals_byt.c -@@ -81,4 +81,4 @@ int caml_set_signal_action(int signo, int action) - return 0; - } - --CAMLexport void caml_setup_stack_overflow_detection(void) {} -+CAMLexport int caml_setup_stack_overflow_detection(void) { return 0; } ---- a/runtime/signals_nat.c -+++ b/runtime/signals_nat.c -@@ -181,8 +181,6 @@ DECLARE_SIGNAL_HANDLER(trap_handler) - #error "CONTEXT_SP is required if HAS_STACK_OVERFLOW_DETECTION is defined" - #endif - --static char sig_alt_stack[SIGSTKSZ]; -- - /* Code compiled with ocamlopt never accesses more than - EXTRA_STACK bytes below the stack pointer. */ - #define EXTRA_STACK 256 -@@ -276,28 +274,33 @@ void caml_init_signals(void) - #endif - - #ifdef HAS_STACK_OVERFLOW_DETECTION -- { -- stack_t stk; -+ if (caml_setup_stack_overflow_detection() != -1) { - struct sigaction act; -- stk.ss_sp = sig_alt_stack; -- stk.ss_size = SIGSTKSZ; -- stk.ss_flags = 0; - SET_SIGACT(act, segv_handler); - act.sa_flags |= SA_ONSTACK | SA_NODEFER; - sigemptyset(&act.sa_mask); -- if (sigaltstack(&stk, NULL) == 0) { sigaction(SIGSEGV, &act, NULL); } -+ sigaction(SIGSEGV, &act, NULL); - } - #endif - } - --CAMLexport void caml_setup_stack_overflow_detection(void) -+/* Allocate and select an alternate stack for handling signals, -+ especially SIGSEGV signals. -+ Each thread needs its own alternate stack. -+ The alternate stack used to be statically-allocated for the main thread, -+ but this is incompatible with Glibc 2.34 and newer, where SIGSTKSZ -+ may not be a compile-time constant (issue #10250). */ -+ -+CAMLexport int caml_setup_stack_overflow_detection(void) - { - #ifdef HAS_STACK_OVERFLOW_DETECTION - stack_t stk; - stk.ss_sp = malloc(SIGSTKSZ); -+ if (stk.ss_sp == NULL) return -1; - stk.ss_size = SIGSTKSZ; - stk.ss_flags = 0; -- if (stk.ss_sp) -- sigaltstack(&stk, NULL); -+ return sigaltstack(&stk, NULL); -+#else -+ return 0; - #endif - } diff --git a/dev-lang/ocaml/files/ocaml-4.12.1-fix-textrel-riscv.patch b/dev-lang/ocaml/files/ocaml-4.12.1-fix-textrel-riscv.patch deleted file mode 100644 index 5ba8582d3a65..000000000000 --- a/dev-lang/ocaml/files/ocaml-4.12.1-fix-textrel-riscv.patch +++ /dev/null @@ -1,46 +0,0 @@ -From ddf99786f8229c8282905af5c7c74360d4f2fbd0 Mon Sep 17 00:00:00 2001 -From: Alex Fan <alex.fan.q@gmail.com> -Date: Tue, 22 Feb 2022 19:28:30 +1100 -Subject: [PATCH] riscv: Generate frametable in data section to improve code - relocatability (#11042) - -Similar to what PowerPC and System-Z have done in commit 24980d3fd9848e281761ef2b8fe383e71261789b - -With this commit ocamlopt produces .so shared libraries and PIE relocatable -executables that contain no relocations in the text segment. - -Upstream status: merged in 4.14 and 5.x ---- - Changes | 5 +++++ - asmcomp/riscv/emit.mlp | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/Changes b/Changes -index 4898e9d69fc..2bec76daac6 100644 ---- a/Changes -+++ b/Changes -@@ -477,6 +477,11 @@ OCaml 4.14.0 - - #10907, #10959: Wrong type inferred from existential types - (Jacques Garrigue and Gabriel Scherer, report by @dyzsr, review by Leo White) - -+- #10688: Move frame descriptor table from `rodata` to `data` section on -+ RISC-V. Improves support for building DLLs and PIEs. In particular, this -+ applies to all binaries in distributions that build PIEs by default (eg -+ Gentoo and Alpine). -+ (Alex Fan, review by Gabriel Scherer) - - OCaml 4.13 maintenance branch - ----------------------------- -diff --git a/asmcomp/riscv/emit.mlp b/asmcomp/riscv/emit.mlp -index 474a3c6857a..b36aa0ea38c 100644 ---- a/asmcomp/riscv/emit.mlp -+++ b/asmcomp/riscv/emit.mlp -@@ -645,7 +645,7 @@ let end_assembly() = - `{emit_symbol lbl_end}:\n`; - ` .quad 0\n`; - (* Emit the frame descriptors *) -- ` {emit_string rodata_space}\n`; -+ ` {emit_string data_space}\n`; (* not rodata because relocations inside *) - let lbl = Compilenv.make_symbol (Some "frametable") in - declare_global_data lbl; - `{emit_symbol lbl}:\n`; |
