OCaml 4.11.0 release (RHBZ#1870368).
This commit is contained in:
parent
cf41d3d77d
commit
1018e3aa3a
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@
|
||||
/ocaml-*.tar.gz
|
||||
/ocaml-*.tar.xz
|
||||
/ocaml-*-refman.pdf
|
||||
/4.11.0.tar.gz
|
||||
|
@ -1,17 +1,17 @@
|
||||
From 1b1a2ad3294327e5bbbc753f306d1199b0a2a583 Mon Sep 17 00:00:00 2001
|
||||
From 455187f2528a6dd987a8add6e7db055978c9b5c4 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/8] Don't add rpaths to libraries.
|
||||
Subject: [PATCH 1/5] 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 96a4244cc..076411a91 100644
|
||||
index dbad0b74f..c920a5337 100644
|
||||
--- a/tools/Makefile
|
||||
+++ b/tools/Makefile
|
||||
@@ -153,8 +153,8 @@ $(call byte_and_opt,ocamlmklib,ocamlmklibconfig.cmo config.cmo \
|
||||
@@ -154,8 +154,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)';\
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 8ea0bc7713a89cd6340e35b4dae048be63c50aec Mon Sep 17 00:00:00 2001
|
||||
From 183e55d0a61a9e50db1b861d1e3918ee2fecc544 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/8] configure: Allow user defined C compiler flags.
|
||||
Subject: [PATCH 2/5] configure: Allow user defined C compiler flags.
|
||||
|
||||
---
|
||||
configure.ac | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index fbd49c1ee..a35da2040 100644
|
||||
index aa5f26f28..5153853b7 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -609,6 +609,10 @@ AS_CASE([$host],
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 39df379f1aa139a073d7b436bb9bd33ef2f70caf Mon Sep 17 00:00:00 2001
|
||||
From 89bd3487c135b4ff51b97e1fde67a45485be4af8 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/8] configure: Remove incorrect assumption about
|
||||
Subject: [PATCH 3/5] configure: Remove incorrect assumption about
|
||||
cross-compiling.
|
||||
|
||||
See https://github.com/ocaml/ocaml/issues/8647#issuecomment-487094390
|
||||
@ -10,7 +10,7 @@ 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 a35da2040..4c9358897 100644
|
||||
index 5153853b7..4e97474a2 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -511,10 +511,11 @@ AS_IF(
|
||||
@ -29,7 +29,7 @@ index a35da2040..4c9358897 100644
|
||||
|
||||
# Checks for programs
|
||||
|
||||
@@ -1018,7 +1019,7 @@ AS_CASE([$arch],
|
||||
@@ -1021,7 +1022,7 @@ AS_CASE([$arch],
|
||||
|
||||
# Assembler
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From e829051c3b35920db3c5e0dd913026f556448675 Mon Sep 17 00:00:00 2001
|
||||
From 38d51966a2f35cc411ceda2d61946edfb62ee8fc 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/8] Remove configure from .gitattributes.
|
||||
Subject: [PATCH 4/5] Remove configure from .gitattributes.
|
||||
|
||||
It's not a binary file.
|
||||
---
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,69 @@
|
||||
From bfde1055d3f945d975092f718952b4764d6a9eb9 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
|
||||
|
@ -1,34 +0,0 @@
|
||||
From d26a313ae92bb515b04865b6a71a63701dd1fe41 Mon Sep 17 00:00:00 2001
|
||||
From: Xavier Leroy <xavier.leroy@college-de-france.fr>
|
||||
Date: Thu, 30 Apr 2020 16:18:06 +0200
|
||||
Subject: [PATCH 6/8] Support FP reg -> int reg moves
|
||||
|
||||
Using instruction fmv.x.d.
|
||||
|
||||
This is necessary to implement the ELF psABI calling conventions,
|
||||
whereas some FP arguments may have to be passed in integer registers.
|
||||
|
||||
(cherry picked from commit 16794b940555315c723411077a2902fc85a33c45)
|
||||
---
|
||||
asmcomp/riscv/emit.mlp | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/asmcomp/riscv/emit.mlp b/asmcomp/riscv/emit.mlp
|
||||
index dc652de42..dbfdc2d40 100644
|
||||
--- a/asmcomp/riscv/emit.mlp
|
||||
+++ b/asmcomp/riscv/emit.mlp
|
||||
@@ -283,8 +283,10 @@ let emit_instr i =
|
||||
match (src, dst) with
|
||||
| {loc = Reg _; typ = (Val | Int | Addr)}, {loc = Reg _} ->
|
||||
` mv {emit_reg dst}, {emit_reg src}\n`
|
||||
- | {loc = Reg _; typ = Float}, {loc = Reg _} ->
|
||||
+ | {loc = Reg _; typ = Float}, {loc = Reg _; typ = Float} ->
|
||||
` fmv.d {emit_reg dst}, {emit_reg src}\n`
|
||||
+ | {loc = Reg _; typ = Float}, {loc = Reg _; typ = (Val | Int | Addr)} ->
|
||||
+ ` fmv.x.d {emit_reg dst}, {emit_reg src}\n`
|
||||
| {loc = Reg _; typ = (Val | Int | Addr)}, {loc = Stack s} ->
|
||||
let ofs = slot_offset s (register_class dst) in
|
||||
emit_store src ofs
|
||||
--
|
||||
2.28.0.rc2
|
||||
|
@ -1,59 +0,0 @@
|
||||
From 5bc92d0cdb5cb26b8d8d517f30914c2b18e85f2b Mon Sep 17 00:00:00 2001
|
||||
From: Xavier Leroy <xavier.leroy@college-de-france.fr>
|
||||
Date: Thu, 30 Apr 2020 16:19:16 +0200
|
||||
Subject: [PATCH 7/8] Update C calling conventions to the RISC-V ELF psABI
|
||||
|
||||
The original implementation of loc_external_arguments and
|
||||
loc_external_results was following an older ABI,
|
||||
where an FP argument passed in an FP register "burns" an integer register.
|
||||
|
||||
In the ELF psABI, integer registers and FP registers are used independently,
|
||||
as in the OCaml calling convention. Plus, if all FP registers are used
|
||||
but an integer register remains, the integer register is used to pass
|
||||
the next FP argument.
|
||||
|
||||
Fixes: #9515
|
||||
(cherry picked from commit ea6896f9f184305cc455d3af18cd1cb75cdcd93d)
|
||||
---
|
||||
asmcomp/riscv/proc.ml | 11 +++++++----
|
||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/asmcomp/riscv/proc.ml b/asmcomp/riscv/proc.ml
|
||||
index 70909cd83..4c7b58612 100644
|
||||
--- a/asmcomp/riscv/proc.ml
|
||||
+++ b/asmcomp/riscv/proc.ml
|
||||
@@ -187,6 +187,8 @@ let loc_results res =
|
||||
first integer args in a0 .. a7
|
||||
first float args in fa0 .. fa7
|
||||
remaining args on stack.
|
||||
+ A FP argument can be passed in an integer register if all FP registers
|
||||
+ are exhausted but integer registers remain.
|
||||
Return values in a0 .. a1 or fa0 .. fa1. *)
|
||||
|
||||
let external_calling_conventions
|
||||
@@ -202,8 +204,7 @@ let external_calling_conventions
|
||||
| Val | Int | Addr as ty ->
|
||||
if !int <= last_int then begin
|
||||
loc.(i) <- [| phys_reg !int |];
|
||||
- incr int;
|
||||
- incr float;
|
||||
+ incr int
|
||||
end else begin
|
||||
loc.(i) <- [| stack_slot (make_stack !ofs) ty |];
|
||||
ofs := !ofs + size_int
|
||||
@@ -211,8 +212,10 @@ let external_calling_conventions
|
||||
| Float ->
|
||||
if !float <= last_float then begin
|
||||
loc.(i) <- [| phys_reg !float |];
|
||||
- incr float;
|
||||
- incr int;
|
||||
+ incr float
|
||||
+ end else if !int <= last_int then begin
|
||||
+ loc.(i) <- [| phys_reg !int |];
|
||||
+ incr int
|
||||
end else begin
|
||||
loc.(i) <- [| stack_slot (make_stack !ofs) Float |];
|
||||
ofs := !ofs + size_float
|
||||
--
|
||||
2.28.0.rc2
|
||||
|
@ -1,49 +0,0 @@
|
||||
From 7364f5081851fe306802883d9a8069da559d4973 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 4 Aug 2020 12:26:12 +0100
|
||||
Subject: [PATCH 8/8] runtime/major_gc.c: Declare caml_fl_merge with proper
|
||||
type.
|
||||
|
||||
When compiling OCaml with LTO enabled (as is now done routinely in
|
||||
Fedora and OpenSUSE) we got a failure because the caml_fl_merge symbol
|
||||
is not declared identically across compilation units. The simple fix
|
||||
is to make sure the declarations are identical, although probably
|
||||
moving the definition to a common header file would be a better
|
||||
long-term fix.
|
||||
|
||||
major_gc.c:66:14: warning: type of 'caml_fl_merge' does not match original declaration [-Wlto-type-mismatch]
|
||||
66 | extern char *caml_fl_merge; /* Defined in freelist.c. */
|
||||
| ^
|
||||
freelist.c:47:7: note: 'caml_fl_merge' was previously declared here
|
||||
47 | value caml_fl_merge = Val_NULL; /* Current insertion pointer. Managed
|
||||
| ^
|
||||
freelist.c:47:7: note: code may be misoptimized unless '-fno-strict-aliasing' is used
|
||||
---
|
||||
runtime/major_gc.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 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);
|
||||
--
|
||||
2.28.0.rc2
|
||||
|
23
ocaml.spec
23
ocaml.spec
@ -31,7 +31,7 @@
|
||||
|
||||
Name: ocaml
|
||||
Version: 4.11.0
|
||||
Release: 0.9.dev2%{?dist}
|
||||
Release: 1%{?dist}
|
||||
|
||||
Summary: OCaml compiler and programming environment
|
||||
|
||||
@ -40,9 +40,7 @@ License: QPL and (LGPLv2+ with exceptions)
|
||||
URL: http://www.ocaml.org
|
||||
|
||||
#Source0: http://caml.inria.fr/pub/distrib/ocaml-4.10/ocaml-%{version}%{rcver}.tar.xz
|
||||
# This is a pre-release of OCaml 4.11.0. See:
|
||||
# https://pagure.io/fedora-ocaml/commits/fedora-33-4.11.0-dev2
|
||||
Source0: ocaml-4.11.0.tar.gz
|
||||
Source0: https://github.com/ocaml/ocaml/archive/%{version}.tar.gz
|
||||
|
||||
# IMPORTANT NOTE:
|
||||
#
|
||||
@ -53,7 +51,7 @@ Source0: ocaml-4.11.0.tar.gz
|
||||
#
|
||||
# https://pagure.io/fedora-ocaml
|
||||
#
|
||||
# Current branch: fedora-33-4.11.0-dev2
|
||||
# Current branch: fedora-34-4.11.0
|
||||
#
|
||||
# ALTERNATIVELY add a patch to the end of the list (leaving the
|
||||
# existing patches unchanged) adding a comment to note that it should
|
||||
@ -64,13 +62,8 @@ 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
|
||||
|
||||
# Add RISC-V backend. This is upstream in 4.12 (not 4.11).
|
||||
Patch0005: 0005-Add-RISC-V-native-code-backend-9441.patch
|
||||
Patch0006: 0006-Support-FP-reg-int-reg-moves.patch
|
||||
Patch0007: 0007-Update-C-calling-conventions-to-the-RISC-V-ELF-psABI.patch
|
||||
|
||||
# Fix compilation with LTO (sent upstream 2020-08-04).
|
||||
Patch0008: 0008-runtime-major_gc.c-Declare-caml_fl_merge-with-proper.patch
|
||||
# Fix compilation with LTO (upstream, but not in 4.11 branch).
|
||||
Patch0005: 0005-Fix-type-mismatches-between-definition-and-declarati.patch
|
||||
|
||||
BuildRequires: git
|
||||
BuildRequires: gcc
|
||||
@ -266,6 +259,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
|
||||
%{_bindir}/ocamlmklib
|
||||
%{_bindir}/ocamlmktop
|
||||
%{_bindir}/ocamlobjinfo
|
||||
%{_bindir}/ocamloptp
|
||||
%{_bindir}/ocamlprof
|
||||
|
||||
# bytecode versions
|
||||
@ -276,6 +270,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
|
||||
%{_bindir}/ocamlmklib.byte
|
||||
%{_bindir}/ocamlmktop.byte
|
||||
%{_bindir}/ocamlobjinfo.byte
|
||||
%{_bindir}/ocamloptp.byte
|
||||
%{_bindir}/ocamlprof.byte
|
||||
|
||||
%if %{native_compiler}
|
||||
@ -287,6 +282,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
|
||||
%{_bindir}/ocamlmklib.opt
|
||||
%{_bindir}/ocamlmktop.opt
|
||||
%{_bindir}/ocamlobjinfo.opt
|
||||
%{_bindir}/ocamloptp.opt
|
||||
%{_bindir}/ocamlprof.opt
|
||||
%endif
|
||||
|
||||
@ -378,6 +374,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 4.11.0-1
|
||||
- OCaml 4.11.0 release (RHBZ#1870368).
|
||||
|
||||
* Tue Aug 04 2020 Richard W.M. Jones <rjones@redhat.com> - 4.11.0-0.9.dev2
|
||||
- Bump and rebuild to fix DWARF versioning issues.
|
||||
- Enable LTO again.
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (ocaml-4.11.0.tar.gz) = b07208b8679ef285f30b2da4070a3cf894cb881b79330e1ee50839fff634e58be1b7c378690658d146d2565ddbfa40aaa12ecec9558d7eab501b1863f50bfc88
|
||||
SHA512 (4.11.0.tar.gz) = 9cb1025d009adff7b6fff247ec53998401919833784bb668cea56980082a60aa51d01c067bebe6afefb52a574a2b8e242a79e62d410f78fb68af1b27fe5b6166
|
||||
|
Loading…
Reference in New Issue
Block a user