OCaml 4.12.0 release (RHBZ#1893381).
Workaround for glibc non-constant SIGSTKSZ (https://github.com/ocaml/ocaml/issues/10250)
This commit is contained in:
parent
2dec79cc2e
commit
b8653f50ff
@ -1,17 +1,17 @@
|
||||
From 4c7732daae8f0d2a622f91f5ff3add5c2248a2e3 Mon Sep 17 00:00:00 2001
|
||||
From db7d6fd991dc43f392c895ee857f7948f5b4fe5e 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/5] Don't add rpaths to libraries.
|
||||
Subject: [PATCH 1/4] Don't add rpaths to libraries.
|
||||
|
||||
---
|
||||
tools/Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tools/Makefile b/tools/Makefile
|
||||
index dbad0b74f..c920a5337 100644
|
||||
index 07e2eda1a..340508a60 100644
|
||||
--- a/tools/Makefile
|
||||
+++ b/tools/Makefile
|
||||
@@ -154,8 +154,8 @@ $(call byte_and_opt,ocamlmklib,ocamlmklibconfig.cmo config.cmo \
|
||||
@@ -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)';\
|
||||
@ -23,5 +23,5 @@ index dbad0b74f..c920a5337 100644
|
||||
> ocamlmklibconfig.ml
|
||||
|
||||
--
|
||||
2.28.0.rc2
|
||||
2.29.0.rc2
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
From 441ad77a0c89f4abdf104c668d579607f338a052 Mon Sep 17 00:00:00 2001
|
||||
From bf42dba499e053196b9235aae9987f395c4a4b7e 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/5] configure: Allow user defined C compiler flags.
|
||||
Subject: [PATCH 2/4] configure: Allow user defined C compiler flags.
|
||||
|
||||
---
|
||||
configure.ac | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index aa5f26f28..5153853b7 100644
|
||||
index 83455a3b6..213392b25 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -609,6 +609,10 @@ AS_CASE([$host],
|
||||
internal_cflags="$gcc_warnings"],
|
||||
@@ -638,6 +638,10 @@ AS_CASE([$host],
|
||||
internal_cflags="$cc_warnings"],
|
||||
[common_cflags="-O"])])
|
||||
|
||||
+# Allow CFLAGS and LDFLAGS to be added.
|
||||
@ -23,5 +23,5 @@ index aa5f26f28..5153853b7 100644
|
||||
|
||||
# Enable SSE2 on x86 mingw to avoid using 80-bit registers.
|
||||
--
|
||||
2.28.0.rc2
|
||||
2.29.0.rc2
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 3318c5b805d8d6ae1d571f18f682c9f701b712e2 Mon Sep 17 00:00:00 2001
|
||||
From 5cc71dbb0f25d4c5b444f099965b93149577ee8f 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/5] configure: Remove incorrect assumption about
|
||||
Subject: [PATCH 3/4] configure: Remove incorrect assumption about
|
||||
cross-compiling.
|
||||
|
||||
See https://github.com/ocaml/ocaml/issues/8647#issuecomment-487094390
|
||||
@ -10,10 +10,10 @@ See https://github.com/ocaml/ocaml/issues/8647#issuecomment-487094390
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 5153853b7..4e97474a2 100644
|
||||
index 213392b25..c7e594b5d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -511,10 +511,11 @@ AS_IF(
|
||||
@@ -529,10 +529,11 @@ AS_IF(
|
||||
|
||||
# Are we building a cross-compiler
|
||||
|
||||
@ -29,7 +29,7 @@ index 5153853b7..4e97474a2 100644
|
||||
|
||||
# Checks for programs
|
||||
|
||||
@@ -1021,7 +1022,7 @@ AS_CASE([$arch],
|
||||
@@ -1072,7 +1073,7 @@ AS_CASE([$arch],
|
||||
|
||||
# Assembler
|
||||
|
||||
@ -39,5 +39,5 @@ index 5153853b7..4e97474a2 100644
|
||||
# We first compute default values for as and aspp
|
||||
# If values have been given by the user then they take precedence over
|
||||
--
|
||||
2.28.0.rc2
|
||||
2.29.0.rc2
|
||||
|
||||
|
@ -1,28 +0,0 @@
|
||||
From 01d8e3f82adb382fb90af15879f722e824834c84 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Sat, 18 Jan 2020 11:31:27 +0000
|
||||
Subject: [PATCH 4/5] Remove configure from .gitattributes.
|
||||
|
||||
It's not a binary file.
|
||||
---
|
||||
.gitattributes | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/.gitattributes b/.gitattributes
|
||||
index 200eb49c6..d871764de 100644
|
||||
--- a/.gitattributes
|
||||
+++ b/.gitattributes
|
||||
@@ -29,10 +29,6 @@
|
||||
|
||||
/boot/menhir/parser.ml* -diff
|
||||
|
||||
-# configure is declared as binary so that it doesn't get included in diffs.
|
||||
-# This also means it will have the correct Unix line-endings, even on Windows.
|
||||
-/configure binary
|
||||
-
|
||||
# 'union' merge driver just unions textual content in case of conflict
|
||||
# http://krlmlr.github.io/using-gitattributes-to-avoid-merge-conflicts/
|
||||
/.mailmap merge=union
|
||||
--
|
||||
2.28.0.rc2
|
||||
|
39
0004-Workaround-for-glibc-non-constant-SIGSTKSZ.patch
Normal file
39
0004-Workaround-for-glibc-non-constant-SIGSTKSZ.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From dfb5e954a04f59b0456cc4c0ddf3acaf22e0ff07 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Sun, 28 Feb 2021 20:45:47 +0000
|
||||
Subject: [PATCH 4/4] Workaround for glibc non-constant SIGSTKSZ
|
||||
|
||||
https://github.com/ocaml/ocaml/issues/10250
|
||||
|
||||
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
|
||||
---
|
||||
runtime/signals_nat.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/runtime/signals_nat.c b/runtime/signals_nat.c
|
||||
index 8b64ab452..7f0a97513 100644
|
||||
--- a/runtime/signals_nat.c
|
||||
+++ b/runtime/signals_nat.c
|
||||
@@ -181,7 +181,19 @@ DECLARE_SIGNAL_HANDLER(trap_handler)
|
||||
#error "CONTEXT_SP is required if HAS_STACK_OVERFLOW_DETECTION is defined"
|
||||
#endif
|
||||
|
||||
+#ifndef __GLIBC__
|
||||
static char sig_alt_stack[SIGSTKSZ];
|
||||
+#else
|
||||
+/* glibc 2.34 has non-constant SIGSTKSZ */
|
||||
+static char *sig_alt_stack;
|
||||
+
|
||||
+static void allocate_sig_alt_stack(void) __attribute__((constructor));
|
||||
+static void
|
||||
+allocate_sig_alt_stack(void)
|
||||
+{
|
||||
+ sig_alt_stack = malloc(SIGSTKSZ);
|
||||
+}
|
||||
+#endif
|
||||
|
||||
/* Code compiled with ocamlopt never accesses more than
|
||||
EXTRA_STACK bytes below the stack pointer. */
|
||||
--
|
||||
2.29.0.rc2
|
||||
|
@ -1,69 +0,0 @@
|
||||
From 122db7141d292d63cfbe2c7d7a4280cc73194ece Mon Sep 17 00:00:00 2001
|
||||
From: Xavier Leroy <xavierleroy@users.noreply.github.com>
|
||||
Date: Wed, 5 Aug 2020 11:17:52 +0200
|
||||
Subject: [PATCH 5/5] Fix type mismatches between definition and declaration
|
||||
(#9830)
|
||||
|
||||
The C global variable caml_fl_merge and the C function
|
||||
caml_spacetime_my_profinfo (bytecode version) were declared and
|
||||
defined with different types. This is undefined behavior and
|
||||
can cause link-time errors with link-time optimization (LTO).
|
||||
|
||||
Closes: #9825
|
||||
---
|
||||
runtime/major_gc.c | 4 ++--
|
||||
runtime/spacetime_byt.c | 7 ++++++-
|
||||
2 files changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/runtime/major_gc.c b/runtime/major_gc.c
|
||||
index 5e4f06bce..c8f5a3281 100644
|
||||
--- a/runtime/major_gc.c
|
||||
+++ b/runtime/major_gc.c
|
||||
@@ -63,7 +63,7 @@ uintnat caml_dependent_size, caml_dependent_allocated;
|
||||
double caml_extra_heap_resources;
|
||||
uintnat caml_fl_wsz_at_phase_change = 0;
|
||||
|
||||
-extern char *caml_fl_merge; /* Defined in freelist.c. */
|
||||
+extern value caml_fl_merge; /* Defined in freelist.c. */
|
||||
|
||||
static char *markhp, *chunk, *limit;
|
||||
static double p_backlog = 0.0; /* backlog for the gc speedup parameter */
|
||||
@@ -570,7 +570,7 @@ static void sweep_slice (intnat work)
|
||||
break;
|
||||
case Caml_blue:
|
||||
/* Only the blocks of the free-list are blue. See [freelist.c]. */
|
||||
- caml_fl_merge = Bp_hp (hp);
|
||||
+ caml_fl_merge = (value) Bp_hp (hp);
|
||||
break;
|
||||
default: /* gray or black */
|
||||
CAMLassert (Color_hd (hd) == Caml_black);
|
||||
diff --git a/runtime/spacetime_byt.c b/runtime/spacetime_byt.c
|
||||
index 2b0bf1dc2..b75fb0980 100644
|
||||
--- a/runtime/spacetime_byt.c
|
||||
+++ b/runtime/spacetime_byt.c
|
||||
@@ -12,8 +12,12 @@
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
+#define CAML_INTERNALS
|
||||
+
|
||||
#include "caml/fail.h"
|
||||
#include "caml/mlvalues.h"
|
||||
+#include "caml/io.h"
|
||||
+#include "caml/spacetime.h"
|
||||
|
||||
int caml_ensure_spacetime_dot_o_is_included = 42;
|
||||
|
||||
@@ -22,7 +26,8 @@ CAMLprim value caml_spacetime_only_works_for_native_code(value foo, ...)
|
||||
caml_failwith("Spacetime profiling only works for native code");
|
||||
}
|
||||
|
||||
-uintnat caml_spacetime_my_profinfo (void)
|
||||
+uintnat caml_spacetime_my_profinfo (spacetime_unwind_info_cache * cached,
|
||||
+ uintnat wosize)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.28.0.rc2
|
||||
|
34
ocaml.spec
34
ocaml.spec
@ -30,8 +30,8 @@
|
||||
%global rcver %{nil}
|
||||
|
||||
Name: ocaml
|
||||
Version: 4.11.1
|
||||
Release: 2%{?dist}
|
||||
Version: 4.12.0
|
||||
Release: 1%{?dist}
|
||||
|
||||
Summary: OCaml compiler and programming environment
|
||||
|
||||
@ -39,7 +39,7 @@ License: QPL and (LGPLv2+ with exceptions)
|
||||
|
||||
URL: http://www.ocaml.org
|
||||
|
||||
Source0: https://caml.inria.fr/pub/distrib/ocaml-4.11/ocaml-%{version}.tar.xz
|
||||
Source0: https://caml.inria.fr/pub/distrib/ocaml-4.12/ocaml-%{version}.tar.xz
|
||||
#Source0: https://github.com/ocaml/ocaml/archive/%%{version}.tar.gz
|
||||
|
||||
# IMPORTANT NOTE:
|
||||
@ -51,7 +51,7 @@ Source0: https://caml.inria.fr/pub/distrib/ocaml-4.11/ocaml-%{version}.ta
|
||||
#
|
||||
# https://pagure.io/fedora-ocaml
|
||||
#
|
||||
# Current branch: fedora-34-4.11.1
|
||||
# Current branch: fedora-35-4.12.0
|
||||
#
|
||||
# ALTERNATIVELY add a patch to the end of the list (leaving the
|
||||
# existing patches unchanged) adding a comment to note that it should
|
||||
@ -60,10 +60,7 @@ Source0: https://caml.inria.fr/pub/distrib/ocaml-4.11/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-Remove-configure-from-.gitattributes.patch
|
||||
|
||||
# Fix compilation with LTO (upstream, but not in 4.11 branch).
|
||||
Patch0005: 0005-Fix-type-mismatches-between-definition-and-declarati.patch
|
||||
Patch0004: 0004-Workaround-for-glibc-non-constant-SIGSTKSZ.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: git
|
||||
@ -233,10 +230,6 @@ chrpath --delete $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.so
|
||||
|
||||
find $RPM_BUILD_ROOT -name .ignore -delete
|
||||
|
||||
# Remove .cmt and .cmti files, for now. We could package them later.
|
||||
# See also: http://www.ocamlpro.com/blog/2012/08/20/ocamlpro-and-4.00.0.html
|
||||
find $RPM_BUILD_ROOT \( -name '*.cmt' -o -name '*.cmti' \) -a -delete
|
||||
|
||||
# Remove this file. It's only created in certain situations and it's
|
||||
# unclear why it is created at all.
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
|
||||
@ -293,8 +286,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
|
||||
%{_bindir}/ocamlopt.opt
|
||||
%endif
|
||||
|
||||
#%{_libdir}/ocaml/addlabels
|
||||
#%{_libdir}/ocaml/scrapelabels
|
||||
#%%{_libdir}/ocaml/addlabels
|
||||
#%%{_libdir}/ocaml/scrapelabels
|
||||
%{_libdir}/ocaml/camlheader
|
||||
%{_libdir}/ocaml/camlheader_ur
|
||||
%{_libdir}/ocaml/expunge
|
||||
@ -313,7 +306,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
|
||||
%endif
|
||||
%{_libdir}/ocaml/*.mli
|
||||
%{_libdir}/ocaml/libcamlrun_shared.so
|
||||
%{_libdir}/ocaml/objinfo_helper
|
||||
#%%{_libdir}/ocaml/objinfo_helper
|
||||
%{_libdir}/ocaml/threads/*.mli
|
||||
%if %{native_compiler}
|
||||
%{_libdir}/ocaml/threads/*.a
|
||||
@ -329,7 +322,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
|
||||
%{_bindir}/ocamlrund
|
||||
%{_bindir}/ocamlruni
|
||||
%dir %{_libdir}/ocaml
|
||||
%{_libdir}/ocaml/VERSION
|
||||
#%%{_libdir}/ocaml/VERSION
|
||||
%{_libdir}/ocaml/*.cmo
|
||||
%{_libdir}/ocaml/*.cmi
|
||||
%{_libdir}/ocaml/*.cma
|
||||
@ -345,6 +338,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
|
||||
%files source
|
||||
%doc LICENSE
|
||||
%{_libdir}/ocaml/*.ml
|
||||
%{_libdir}/ocaml/*.cmt*
|
||||
%{_libdir}/ocaml/*/*.cmt*
|
||||
|
||||
|
||||
%files ocamldoc
|
||||
@ -375,6 +370,13 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Feb 28 2021 Richard W.M. Jones <rjones@redhat.com> - 4.12.0-1
|
||||
- OCaml 4.12.0 release (RHBZ#1893381).
|
||||
- Workaround for glibc non-constant SIGSTKSZ
|
||||
(https://github.com/ocaml/ocaml/issues/10250)
|
||||
- Package *.cmt and *.cmti files.
|
||||
- Remove objinfo_helper since it is no longer built.
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.11.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (ocaml-4.11.1.tar.xz) = ca34655dc22257aa48aeb48a9cf56bde177aa0f0e7f3965f334939934801a206ed5667b7ab0cc291df9e6bf1bb3251f7384f078ea5562e647fde93167ecb1e84
|
||||
SHA512 (ocaml-4.12.0.tar.xz) = fff347398300097e32dcdd0fabfa158693e3d27d4b0fef23a564be4993950be374e3e436205e621485f4188ab007e489c50b1294e1999dac36312e56ec5b52c9
|
||||
|
Loading…
Reference in New Issue
Block a user