New upstream version 4.13.1
This commit is contained in:
parent
95d7ecd59b
commit
edfb35d875
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@
|
||||
/ocaml-*.tar.xz
|
||||
/ocaml-*-refman.pdf
|
||||
/4.11.0.tar.gz
|
||||
/4.13.1.tar.gz
|
||||
|
@ -1,27 +1,27 @@
|
||||
From db7d6fd991dc43f392c895ee857f7948f5b4fe5e Mon Sep 17 00:00:00 2001
|
||||
From 23f2e84d360208759c7d82b7ff795770ce6cf0b2 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 24 Jun 2014 10:00:15 +0100
|
||||
Subject: [PATCH 1/4] Don't add rpaths to libraries.
|
||||
Subject: [PATCH 1/3] Don't add rpaths to libraries.
|
||||
|
||||
---
|
||||
tools/Makefile | 4 ++--
|
||||
utils/config.mlp | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tools/Makefile b/tools/Makefile
|
||||
index 07e2eda1a..340508a60 100644
|
||||
--- a/tools/Makefile
|
||||
+++ b/tools/Makefile
|
||||
@@ -146,8 +146,8 @@ $(call byte_and_opt,ocamlmklib,ocamlmklibconfig.cmo config.cmo \
|
||||
ocamlmklibconfig.ml: $(ROOTDIR)/Makefile.config Makefile
|
||||
(echo 'let bindir = "$(BINDIR)"'; \
|
||||
echo 'let supports_shared_libraries = $(SUPPORTS_SHARED_LIBRARIES)';\
|
||||
- echo 'let default_rpath = "$(RPATH)"'; \
|
||||
- echo 'let mksharedlibrpath = "$(MKSHAREDLIBRPATH)"'; \
|
||||
+ echo 'let default_rpath = ""'; \
|
||||
+ echo 'let mksharedlibrpath = ""'; \
|
||||
echo 'let toolpref = "$(TOOLPREF)"';) \
|
||||
> ocamlmklibconfig.ml
|
||||
|
||||
diff --git a/utils/config.mlp b/utils/config.mlp
|
||||
index bbb3c5694..57d509cd0 100644
|
||||
--- a/utils/config.mlp
|
||||
+++ b/utils/config.mlp
|
||||
@@ -55,8 +55,8 @@ let native_c_compiler =
|
||||
let native_c_libraries = "%%NATIVECCLIBS%%"
|
||||
let native_pack_linker = "%%PACKLD%%"
|
||||
let ranlib = "%%RANLIBCMD%%"
|
||||
-let default_rpath = "%%RPATH%%"
|
||||
-let mksharedlibrpath = "%%MKSHAREDLIBRPATH%%"
|
||||
+let default_rpath = ""
|
||||
+let mksharedlibrpath = ""
|
||||
let ar = "%%ARCMD%%"
|
||||
let supports_shared_libraries = %%SUPPORTS_SHARED_LIBRARIES%%
|
||||
let mkdll, mkexe, mkmaindll =
|
||||
--
|
||||
2.32.0
|
||||
|
||||
|
@ -1,17 +1,17 @@
|
||||
From bf42dba499e053196b9235aae9987f395c4a4b7e Mon Sep 17 00:00:00 2001
|
||||
From 9966786a7389dc6621f2bc2dce7c690c5a38b67d Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 29 May 2012 20:44:18 +0100
|
||||
Subject: [PATCH 2/4] configure: Allow user defined C compiler flags.
|
||||
Subject: [PATCH 2/3] configure: Allow user defined C compiler flags.
|
||||
|
||||
---
|
||||
configure.ac | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 83455a3b6..213392b25 100644
|
||||
index 3698c7cbf..e2a3cbea0 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -638,6 +638,10 @@ AS_CASE([$host],
|
||||
@@ -669,6 +669,10 @@ AS_CASE([$host],
|
||||
internal_cflags="$cc_warnings"],
|
||||
[common_cflags="-O"])])
|
||||
|
||||
|
@ -1,19 +1,23 @@
|
||||
From 5cc71dbb0f25d4c5b444f099965b93149577ee8f Mon Sep 17 00:00:00 2001
|
||||
From 5eff09224929f8fa1a2e19f9a15befd3a4a395ea Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Fri, 26 Apr 2019 16:16:29 +0100
|
||||
Subject: [PATCH 3/4] configure: Remove incorrect assumption about
|
||||
Subject: [PATCH 3/3] configure: Remove incorrect assumption about
|
||||
cross-compiling.
|
||||
|
||||
See https://github.com/ocaml/ocaml/issues/8647#issuecomment-487094390
|
||||
|
||||
The error seen without this patch is:
|
||||
|
||||
sh: line 1: x86_64-pc-linux-gnu-as: command not found
|
||||
---
|
||||
configure.ac | 11 ++++++-----
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
configure.ac | 31 ++++++++++++++++---------------
|
||||
1 file changed, 16 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 213392b25..c7e594b5d 100644
|
||||
index e2a3cbea0..07c005f09 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -529,10 +529,11 @@ AS_IF(
|
||||
@@ -560,10 +560,11 @@ AS_IF(
|
||||
|
||||
# Are we building a cross-compiler
|
||||
|
||||
@ -29,15 +33,35 @@ index 213392b25..c7e594b5d 100644
|
||||
|
||||
# Checks for programs
|
||||
|
||||
@@ -1072,7 +1073,7 @@ AS_CASE([$arch],
|
||||
@@ -1186,17 +1187,17 @@ AS_CASE([$arch],
|
||||
|
||||
# Assembler
|
||||
|
||||
-AS_IF([test -n "$host_alias"], [toolpref="${host_alias}-"], [toolpref=""])
|
||||
+#AS_IF([test -n "$host_alias"], [toolpref="${host_alias}-"], [toolpref=""])
|
||||
-AS_IF([test -n "$target_alias"],
|
||||
- [toolpref="${target_alias}-"
|
||||
- as_target="$target"
|
||||
- as_cpu="$target_cpu"],
|
||||
- [AS_IF([test -n "$host_alias"],
|
||||
- [toolpref="${host_alias}-"
|
||||
- as_target="$host"
|
||||
- as_cpu="$host_cpu"],
|
||||
- [toolpref=""
|
||||
- as_target="$build"
|
||||
- as_cpu="$build_cpu"])])
|
||||
+dnl AS_IF([test -n "$target_alias"],
|
||||
+dnl [toolpref="${target_alias}-"
|
||||
+dnl as_target="$target"
|
||||
+dnl as_cpu="$target_cpu"],
|
||||
+dnl [AS_IF([test -n "$host_alias"],
|
||||
+dnl [toolpref="${host_alias}-"
|
||||
+dnl as_target="$host"
|
||||
+dnl as_cpu="$host_cpu"],
|
||||
+dnl [toolpref=""
|
||||
+dnl as_target="$build"
|
||||
+dnl as_cpu="$build_cpu"])])
|
||||
|
||||
# We first compute default values for as and aspp
|
||||
# If values have been given by the user then they take precedence over
|
||||
# Finding the assembler
|
||||
# The OCaml build system distinguishes two different assemblers:
|
||||
--
|
||||
2.32.0
|
||||
|
||||
|
@ -1,103 +0,0 @@
|
||||
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)
|
||||
---
|
||||
runtime/caml/signals.h | 2 +-
|
||||
runtime/signals_byt.c | 2 +-
|
||||
runtime/signals_nat.c | 25 ++++++++++++++-----------
|
||||
3 files changed, 16 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/runtime/caml/signals.h b/runtime/caml/signals.h
|
||||
index 3ff152c26..285dbd7fe 100644
|
||||
--- 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);
|
||||
diff --git a/runtime/signals_byt.c b/runtime/signals_byt.c
|
||||
index 2183142da..38eb5e3a4 100644
|
||||
--- 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; }
|
||||
diff --git a/runtime/signals_nat.c b/runtime/signals_nat.c
|
||||
index 8b64ab452..2b4004860 100644
|
||||
--- 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
|
||||
}
|
||||
--
|
||||
2.32.0
|
||||
|
15
ocaml.spec
15
ocaml.spec
@ -30,8 +30,8 @@
|
||||
%global rcver %{nil}
|
||||
|
||||
Name: ocaml
|
||||
Version: 4.12.0
|
||||
Release: 3%{?dist}
|
||||
Version: 4.13.1
|
||||
Release: 1%{?dist}
|
||||
|
||||
Summary: OCaml compiler and programming environment
|
||||
|
||||
@ -39,8 +39,7 @@ License: QPL and (LGPLv2+ with exceptions)
|
||||
|
||||
URL: http://www.ocaml.org
|
||||
|
||||
Source0: https://caml.inria.fr/pub/distrib/ocaml-4.12/ocaml-%{version}.tar.xz
|
||||
#Source0: https://github.com/ocaml/ocaml/archive/%%{version}.tar.gz
|
||||
Source0: https://github.com/ocaml/ocaml/archive/%%{version}.tar.gz
|
||||
|
||||
# IMPORTANT NOTE:
|
||||
#
|
||||
@ -51,7 +50,7 @@ Source0: https://caml.inria.fr/pub/distrib/ocaml-4.12/ocaml-%{version}.ta
|
||||
#
|
||||
# https://pagure.io/fedora-ocaml
|
||||
#
|
||||
# Current branch: fedora-35-4.12.0
|
||||
# Current branch: fedora-36-4.13.1
|
||||
#
|
||||
# ALTERNATIVELY add a patch to the end of the list (leaving the
|
||||
# existing patches unchanged) adding a comment to note that it should
|
||||
@ -60,9 +59,8 @@ Source0: https://caml.inria.fr/pub/distrib/ocaml-4.12/ocaml-%{version}.ta
|
||||
Patch0001: 0001-Don-t-add-rpaths-to-libraries.patch
|
||||
Patch0002: 0002-configure-Allow-user-defined-C-compiler-flags.patch
|
||||
Patch0003: 0003-configure-Remove-incorrect-assumption-about-cross-co.patch
|
||||
Patch0004: 0004-Dynamically-allocate-the-alternate-signal-stack-1026.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: make
|
||||
BuildRequires: git
|
||||
BuildRequires: gcc
|
||||
BuildRequires: autoconf
|
||||
@ -370,6 +368,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Oct 04 2021 Richard W.M. Jones <rjones@redhat.com> - 4.13.1-1
|
||||
- New upstream version 4.13.1
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.12.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (ocaml-4.12.0.tar.xz) = fff347398300097e32dcdd0fabfa158693e3d27d4b0fef23a564be4993950be374e3e436205e621485f4188ab007e489c50b1294e1999dac36312e56ec5b52c9
|
||||
SHA512 (4.13.1.tar.gz) = da3434177438c852da53c0fda7bc2519adcda6384d97d45e44137ed0fd384ffb3da61958a7b51296edb3f88f5a5310ca71b6862f6d756aaa4012d1f54e5955f6
|
||||
|
Loading…
Reference in New Issue
Block a user