mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-17 14:49:30 -07:00
dev-lang/ocaml: drop 4.11.2-r2
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
DIST ocaml-4.11.2.tar.gz 5075323 BLAKE2B bdc503d9a8d0e39dd11060febcd0287657b460e50ed81e55578a3e778af990ca5d4ef9011753eee4e1a144da33eb76c95b1672dc99b76e65a2e107eee472fe06 SHA512 03d8a9f6e130142c121ff2eb3d54f584f1e7c8475f066a5803bb0edd2fa172ca06a56a3ec548b225f5c8b12112d7a68511b1e16f3ade075b5f02610d4247bbb3
|
||||
DIST ocaml-4.14.2.tar.gz 5505119 BLAKE2B 518c2a69ee32e1c141b574a9800a64efc445381eb2808985b5dbb9d5ec54228aa25042a1c410307c3556488ba12a751980396b0d9a01e60a1ea84ac5b52e6dd6 SHA512 61bfa7961aae02458210f10865a5703f7a50a9be2452379e820cf2dfac2c6037da553c31835145e50a776880bdeb2ec78cd7a3147d65f418e7b3e593534e8a04
|
||||
DIST ocaml-5.3.0.tar.gz 6239856 BLAKE2B a790293d14a31d34b10f2fac22a416e967c2a06f64001b54665e691a6aecdb71caf60dd6217460257f8d18191551ffa01d0d3d62327c6eb9bc63c254c162752e SHA512 73817ada340bdf4091b3edd7b292bd0074c87b4836f202f48ecf0f620a00feaa70ebc9101b97155e8caa6907646dfdf21eff728fa0e14542df3b5e5436229d06
|
||||
DIST ocaml-5.4.0.tar.gz 6448449 BLAKE2B 88a055ac07a7ce126b71d8a242e63b68689bb637f40f0adc08e8f0be28961f7d7a6b3a2a673a137726f5100d4a032b6bba7424b168b283553e859f1bf868b482 SHA512 3684468800f4528c9fd96ef3fdd6aa04f71b77180d3ae8045d429f96b32e23cb3a8a307762c7237b6c56c087f45b59b0dab672a31166e3de254bb0fb9b4eb588
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
--- a/runtime/Makefile
|
||||
+++ b/runtime/Makefile
|
||||
@@ -335,7 +335,7 @@
|
||||
# (without the extension, which is added by the macro)
|
||||
define COMPILE_C_FILE
|
||||
$(1).$(O): %.c
|
||||
- $$(CC) -c $$(OC_CFLAGS) $$(OC_CPPFLAGS) $$(OUTPUTOBJ)$$@ $$<
|
||||
+ $$(CC) -c $$(OC_CFLAGS) $(CFLAGS) $$(OC_CPPFLAGS) $$(OUTPUTOBJ)$$@ $$<
|
||||
endef
|
||||
|
||||
object_types := % %_b %_bd %_bi %_bpic %_n %_nd %_ni %_np %_npic
|
||||
--- a/otherlibs/Makefile.otherlibs.common
|
||||
+++ b/otherlibs/Makefile.otherlibs.common
|
||||
@@ -138,4 +138,4 @@
|
||||
$(CAMLOPT) -c $(COMPFLAGS) $(OPTCOMPFLAGS) $<
|
||||
|
||||
.c.$(O):
|
||||
- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
|
||||
+ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
|
||||
--- a/otherlibs/systhreads/Makefile
|
||||
+++ b/otherlibs/systhreads/Makefile
|
||||
@@ -102,10 +102,10 @@
|
||||
st_stubs_n.$(O): OC_CPPFLAGS += $(NATIVE_CPPFLAGS)
|
||||
|
||||
st_stubs_b.$(O): st_stubs.c $(HEADER)
|
||||
- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
|
||||
+ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
|
||||
|
||||
st_stubs_n.$(O): st_stubs.c $(HEADER)
|
||||
- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
|
||||
+ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
|
||||
|
||||
partialclean:
|
||||
rm -f *.cm*
|
||||
--- a/Makefile.common.in
|
||||
+++ b/Makefile.common.in
|
||||
@@ -79,4 +79,4 @@
|
||||
# general (it supports both .o and .obj)
|
||||
|
||||
%.$(O): %.c
|
||||
- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
|
||||
+ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
|
||||
@@ -1,91 +0,0 @@
|
||||
https://gitlab.com/redhat/centos-stream/rpms/ocaml/-/raw/c9s/0006-Dynamically-allocate-the-alternate-signal-stack-1026.patch
|
||||
https://bugs.gentoo.org/804498
|
||||
|
||||
From 24a9db7784ddfcf0af2d2be2f51616ed960ae7e8 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 6/6] 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
|
||||
@@ -82,7 +82,7 @@ void caml_set_action_pending (void);
|
||||
value caml_do_pending_actions_exn (void);
|
||||
value caml_process_pending_actions_with_root (value extra_root); // raises
|
||||
int caml_set_signal_action(int signo, int action);
|
||||
-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
|
||||
@@ -86,4 +86,4 @@ int caml_set_signal_action(int signo, int action)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-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
|
||||
@@ -195,8 +195,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
|
||||
@@ -282,28 +280,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
|
||||
}
|
||||
|
||||
-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
|
||||
}
|
||||
@@ -7,7 +7,6 @@
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="flambda">Enables the Flambda optimizer: A new intermediate representation (introduced in ocaml 4.03) in the depths of the compiler designed to allow for better inlining.</flag>
|
||||
<flag name="spacetime">Enables the Spacetime memory profiler. See https://caml.inria.fr/pub/docs/manual-ocaml/spacetime.html for more information.</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="github">ocaml/ocaml</remote-id>
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit flag-o-matic
|
||||
|
||||
DESCRIPTION="Programming language supporting functional, imperative & object-oriented styles"
|
||||
HOMEPAGE="https://ocaml.org/"
|
||||
SRC_URI="https://github.com/ocaml/ocaml/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="QPL-1.0 LGPL-2"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="amd64 arm arm64 ~hppa ~mips ~ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
|
||||
IUSE="emacs flambda latex +ocamlopt spacetime xemacs"
|
||||
|
||||
RDEPEND="sys-libs/binutils-libs:=
|
||||
spacetime? ( sys-libs/libunwind:= )"
|
||||
BDEPEND="${RDEPEND}
|
||||
virtual/pkgconfig"
|
||||
PDEPEND="emacs? ( app-emacs/ocaml-mode )
|
||||
xemacs? ( app-xemacs/ocaml )"
|
||||
|
||||
QA_FLAGS_IGNORED='/usr/lib.*/ocaml/bigarray.cmxs'
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-4.11.2-glibc-2.34.patch
|
||||
"${FILESDIR}"/${PN}-4.11.2-cflags.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
cp "${FILESDIR}"/ocaml.conf "${T}" || die
|
||||
|
||||
# Broken until 4.12
|
||||
# bug #818445
|
||||
filter-lto
|
||||
append-flags -fno-strict-aliasing
|
||||
|
||||
# OCaml generates textrels on 32-bit arches
|
||||
# We can't do anything about it, but disabling it means that tests
|
||||
# for OCaml-based packages won't fail on unexpected output
|
||||
# bug #773226
|
||||
if use arm || use ppc || use x86 ; then
|
||||
append-ldflags "-Wl,-z,notext"
|
||||
fi
|
||||
|
||||
# Upstream build ignores LDFLAGS in several places.
|
||||
sed -i -e 's/\(^MKDLL=.*\)/\1 $(LDFLAGS)/' \
|
||||
-e 's/\(^OC_CFLAGS=.*\)/\1 $(LDFLAGS)/' \
|
||||
-e 's/\(^OC_LDFLAGS=.*\)/\1 $(LDFLAGS)/' \
|
||||
Makefile.config.in || die "LDFLAGS fix failed"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local opt=(
|
||||
--bindir="${EPREFIX}/usr/bin"
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)/ocaml"
|
||||
--mandir="${EPREFIX}/usr/share/man"
|
||||
--prefix="${EPREFIX}/usr"
|
||||
$(use_enable flambda)
|
||||
$(use_enable spacetime)
|
||||
)
|
||||
econf ${opt[@]}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use ocamlopt ; then
|
||||
env -u P emake world.opt
|
||||
else
|
||||
env -u P emake world
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use ocamlopt ; then
|
||||
# OCaml tests only work when run sequentially
|
||||
emake -j1 tests
|
||||
else
|
||||
ewarn "${PN} was built without 'ocamlopt' USE flag; skipping tests."
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
dodir /usr/include
|
||||
# Create symlink for header files
|
||||
dosym "../$(get_libdir)/ocaml/caml" /usr/include/caml
|
||||
dodoc Changes README.adoc
|
||||
# Create envd entry for latex input files
|
||||
if use latex ; then
|
||||
echo "TEXINPUTS=\"${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:\"" > "${T}"/99ocamldoc || die
|
||||
doenvd "${T}"/99ocamldoc
|
||||
fi
|
||||
|
||||
sed -i -e "s:lib:$(get_libdir):" "${T}"/ocaml.conf || die
|
||||
|
||||
# Install ocaml-rebuild portage set
|
||||
insinto /usr/share/portage/config/sets
|
||||
doins "${T}"/ocaml.conf
|
||||
}
|
||||
Reference in New Issue
Block a user