New upstream version 4.04.1.

This commit is contained in:
Richard W.M. Jones 2017-05-10 12:50:40 +01:00
parent fcd7508fcd
commit 62c9a887d9
13 changed files with 71 additions and 97 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@
/ocaml-*.tar.gz
/ocaml-*-refman.pdf
/4.04.0+beta2.tar.gz
/ocaml-4.04.1.tar.xz

View File

@ -1,17 +1,17 @@
From fc5ac0d955afce294fe58a20cab8e9dda572de78 Mon Sep 17 00:00:00 2001
From 6adc7bf72e58038638b67393695f26561e456eb4 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 01/10] Don't add rpaths to libraries.
Subject: [PATCH 1/9] Don't add rpaths to libraries.
---
tools/Makefile.shared | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/Makefile.shared b/tools/Makefile.shared
index 2803d78..d6c42bb 100644
index a873bdd98..ba263b88f 100644
--- a/tools/Makefile.shared
+++ b/tools/Makefile.shared
@@ -154,9 +154,9 @@ $(call byte_and_opt,ocamlmklib,ocamlmklibconfig.cmo config.cmo \
@@ -154,9 +154,9 @@ $(call byte_and_opt,ocamlmklib,ocamlmklibconfig.cmo config.cmo misc.cmo \
ocamlmklibconfig.ml: ../config/Makefile Makefile
(echo 'let bindir = "$(BINDIR)"'; \
echo 'let supports_shared_libraries = $(SUPPORTS_SHARED_LIBRARIES)';\
@ -25,5 +25,5 @@ index 2803d78..d6c42bb 100644
sed -n -e 's/^#ml //p' ../config/Makefile) \
> ocamlmklibconfig.ml
--
2.9.3
2.12.0

View File

@ -1,7 +1,7 @@
From 61bdb02cedd1be6ecdc37bc4a80ffe3f19aa5521 Mon Sep 17 00:00:00 2001
From 9b2bdf0f3c63690ad942cf3c5615b9e5205b3da7 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 May 2012 20:40:36 +0100
Subject: [PATCH 02/10] ocamlbyteinfo, ocamlplugininfo: Useful utilities from
Subject: [PATCH 2/9] ocamlbyteinfo, ocamlplugininfo: Useful utilities from
Debian, sent upstream.
See:
@ -15,7 +15,7 @@ http://git.debian.org/?p=pkg-ocaml-maint/packages/ocaml.git;a=tree;f=debian/ocam
diff --git a/ocamlbyteinfo.ml b/ocamlbyteinfo.ml
new file mode 100644
index 0000000..eb9a293
index 000000000..eb9a293e3
--- /dev/null
+++ b/ocamlbyteinfo.ml
@@ -0,0 +1,101 @@
@ -122,7 +122,7 @@ index 0000000..eb9a293
+ perr (Printf.sprintf "Usage: %s filename" Sys.argv.(0))
diff --git a/ocamlplugininfo.ml b/ocamlplugininfo.ml
new file mode 100644
index 0000000..e28800f
index 000000000..e28800f31
--- /dev/null
+++ b/ocamlplugininfo.ml
@@ -0,0 +1,109 @@
@ -236,5 +236,5 @@ index 0000000..e28800f
+ header.units
+ end
--
2.9.3
2.12.0

View File

@ -1,17 +1,17 @@
From 2f93494aea56c9216bb561800a6861b653f409ce Mon Sep 17 00:00:00 2001
From 33f0bc368f005204bb3f7f99bc678ecfab4d94c0 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 03/10] configure: Allow user defined C compiler flags.
Subject: [PATCH 3/9] configure: Allow user defined C compiler flags.
---
configure | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure b/configure
index f43893a..41c9315 100755
index b9ae81a3c..01a7baedf 100755
--- a/configure
+++ b/configure
@@ -1901,6 +1901,10 @@ if $with_fpic; then
@@ -1902,6 +1902,10 @@ if $with_fpic; then
echo "#define CAML_WITH_FPIC" >> m.h
fi
@ -23,5 +23,5 @@ index f43893a..41c9315 100755
cclibs="$cclibs $mathlib"
--
2.9.3
2.12.0

View File

@ -1,7 +1,7 @@
From cdd42ba82210bfaa97cfa010eaac3d805b80cb49 Mon Sep 17 00:00:00 2001
From 88a446ec1637f3ed7e22eabfa27afd728c8e52dc Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 3 Nov 2016 19:50:20 +0000
Subject: [PATCH 04/10] Don't rewrite -Werror.
Subject: [PATCH 4/9] Don't rewrite -Werror.
In Fedora our CFLAGS contains -Wall -Werror=format-security.
@ -12,7 +12,7 @@ which is bogus. Remove this rewriting completely.
1 file changed, 1 deletion(-)
diff --git a/Makefile b/Makefile
index 85be2db..1764d0e 100644
index b30564d00..e8514d41e 100644
--- a/Makefile
+++ b/Makefile
@@ -409,7 +409,6 @@ utils/config.ml: utils/config.mlp config/Makefile
@ -24,5 +24,5 @@ index 85be2db..1764d0e 100644
-e 's|%%BYTECCLIBS%%|$(BYTECCLIBS)|' \
-e 's|%%NATIVECCLIBS%%|$(NATIVECCLIBS)|' \
--
2.9.3
2.12.0

View File

@ -1,14 +1,14 @@
From 427232f0f36bfcaafcb1ec2f8da3d1daad0b1121 Mon Sep 17 00:00:00 2001
From f44dd01468eb9b98e55c6b78b1cf6dc3aecd8b6b Mon Sep 17 00:00:00 2001
From: Nicolas Ojeda Bar <n.oje.bar@gmail.com>
Date: Tue, 8 Nov 2016 23:56:50 +0100
Subject: [PATCH 06/10] Adapt config.guess for RISC-V
Subject: [PATCH 5/9] Adapt config.guess for RISC-V
---
config/gnu/config.guess | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/config/gnu/config.guess b/config/gnu/config.guess
index b79252d..8335398 100755
index b79252d6b..8335398b2 100755
--- a/config/gnu/config.guess
+++ b/config/gnu/config.guess
@@ -2,7 +2,7 @@
@ -31,5 +31,5 @@ index b79252d..8335398 100755
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
--
2.9.3
2.12.0

View File

@ -1,29 +0,0 @@
From d4a20446fc8d00223b0c23726618407e451472e8 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 9 Nov 2016 11:01:15 -0500
Subject: [PATCH 05/10] PR#7405: s390x: Fix address of caml_raise_exn in native
dynlink modules.
This commit started as Fedora patch e732c39340e86939530a087744caa8d8f1247878.
(cherry picked from commit d6f24c5f4ee9408ac9a00e3de84f417450b41215)
---
asmcomp/s390x/emit.mlp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/asmcomp/s390x/emit.mlp b/asmcomp/s390x/emit.mlp
index 5d233a3..f99380a 100644
--- a/asmcomp/s390x/emit.mlp
+++ b/asmcomp/s390x/emit.mlp
@@ -611,7 +611,7 @@ let emit_instr i =
| Lraise k ->
begin match k with
| Cmm.Raise_withtrace ->
- ` brasl %r14, {emit_symbol "caml_raise_exn"}\n`;
+ ` {emit_call "caml_raise_exn"}\n`;
let lbl = record_frame Reg.Set.empty true i.dbg in
`{emit_label lbl}:\n`
| Cmm.Raise_notrace ->
--
2.9.3

View File

@ -1,7 +1,7 @@
From cc3aa63c6892479851786af89b956004491dc84c Mon Sep 17 00:00:00 2001
From 3562730fcdf7f5b3802876980b7cac96a49709de Mon Sep 17 00:00:00 2001
From: Nicolas Ojeda Bar <n.oje.bar@gmail.com>
Date: Fri, 4 Nov 2016 20:39:09 +0100
Subject: [PATCH 07/10] Add RISC-V backend & runtime
Subject: [PATCH 6/9] Add RISC-V backend & runtime
---
README.adoc | 1 +
@ -26,7 +26,7 @@ Subject: [PATCH 07/10] Add RISC-V backend & runtime
create mode 100644 asmrun/riscv.S
diff --git a/README.adoc b/README.adoc
index 480b025..cb6eebf 100644
index 480b0250f..cb6eebf1d 100644
--- a/README.adoc
+++ b/README.adoc
@@ -34,6 +34,7 @@ IA32 (Pentium):: NetBSD, OpenBSD, Solaris 9
@ -39,7 +39,7 @@ index 480b025..cb6eebf 100644
the compiler may work under other operating systems with little work.
diff --git a/asmcomp/riscv/CSE.ml b/asmcomp/riscv/CSE.ml
new file mode 100644
index 0000000..302811a
index 000000000..302811a99
--- /dev/null
+++ b/asmcomp/riscv/CSE.ml
@@ -0,0 +1,36 @@
@ -81,7 +81,7 @@ index 0000000..302811a
+ (new cse)#fundecl f
diff --git a/asmcomp/riscv/arch.ml b/asmcomp/riscv/arch.ml
new file mode 100644
index 0000000..61a38b1
index 000000000..61a38b1dd
--- /dev/null
+++ b/asmcomp/riscv/arch.ml
@@ -0,0 +1,84 @@
@ -171,7 +171,7 @@ index 0000000..61a38b1
+ printreg arg.(0) printreg arg.(1) printreg arg.(2)
diff --git a/asmcomp/riscv/emit.mlp b/asmcomp/riscv/emit.mlp
new file mode 100644
index 0000000..6d0e3ae
index 000000000..6d0e3aefd
--- /dev/null
+++ b/asmcomp/riscv/emit.mlp
@@ -0,0 +1,616 @@
@ -793,7 +793,7 @@ index 0000000..6d0e3ae
+ }
diff --git a/asmcomp/riscv/proc.ml b/asmcomp/riscv/proc.ml
new file mode 100644
index 0000000..c0b0dcd
index 000000000..c0b0dcdb8
--- /dev/null
+++ b/asmcomp/riscv/proc.ml
@@ -0,0 +1,301 @@
@ -1100,7 +1100,7 @@ index 0000000..c0b0dcd
+let init () = ()
diff --git a/asmcomp/riscv/reload.ml b/asmcomp/riscv/reload.ml
new file mode 100644
index 0000000..85b9703
index 000000000..85b970342
--- /dev/null
+++ b/asmcomp/riscv/reload.ml
@@ -0,0 +1,16 @@
@ -1122,7 +1122,7 @@ index 0000000..85b9703
+ (new Reloadgen.reload_generic)#fundecl f
diff --git a/asmcomp/riscv/scheduling.ml b/asmcomp/riscv/scheduling.ml
new file mode 100644
index 0000000..e436be1
index 000000000..e436be1cc
--- /dev/null
+++ b/asmcomp/riscv/scheduling.ml
@@ -0,0 +1,19 @@
@ -1147,7 +1147,7 @@ index 0000000..e436be1
+let fundecl f = f
diff --git a/asmcomp/riscv/selection.ml b/asmcomp/riscv/selection.ml
new file mode 100644
index 0000000..60ec5cb
index 000000000..60ec5cb4e
--- /dev/null
+++ b/asmcomp/riscv/selection.ml
@@ -0,0 +1,85 @@
@ -1238,7 +1238,7 @@ index 0000000..60ec5cb
+let fundecl f = (new selector)#emit_fundecl f
diff --git a/asmrun/riscv.S b/asmrun/riscv.S
new file mode 100644
index 0000000..a82048e
index 000000000..a82048efc
--- /dev/null
+++ b/asmrun/riscv.S
@@ -0,0 +1,424 @@
@ -1667,7 +1667,7 @@ index 0000000..a82048e
+ .align 3
+ .size caml_system__frametable, .-caml_system__frametable
diff --git a/byterun/caml/stack.h b/byterun/caml/stack.h
index fd9d528..781c251 100644
index fd9d528e9..781c2517b 100644
--- a/byterun/caml/stack.h
+++ b/byterun/caml/stack.h
@@ -75,6 +75,11 @@
@ -1683,10 +1683,10 @@ index fd9d528..781c251 100644
struct caml_context {
diff --git a/configure b/configure
index 41c9315..eb3e1f3 100755
index 01a7baedf..9562cfa0d 100755
--- a/configure
+++ b/configure
@@ -819,6 +819,7 @@ if test $with_sharedlibs = "yes"; then
@@ -820,6 +820,7 @@ if test $with_sharedlibs = "yes"; then
arm*-*-freebsd*) natdynlink=true;;
earm*-*-netbsd*) natdynlink=true;;
aarch64-*-linux*) natdynlink=true;;
@ -1694,7 +1694,7 @@ index 41c9315..eb3e1f3 100755
esac
fi
@@ -888,6 +889,8 @@ case "$target" in
@@ -889,6 +890,8 @@ case "$target" in
x86_64-*-mingw*) arch=amd64; system=mingw;;
aarch64-*-linux*) arch=arm64; system=linux;;
x86_64-*-cygwin*) arch=amd64; system=cygwin;;
@ -1703,7 +1703,7 @@ index 41c9315..eb3e1f3 100755
esac
# Some platforms exist both in 32-bit and 64-bit variants, not distinguished
@@ -963,7 +966,7 @@ case "$arch,$system" in
@@ -964,7 +967,7 @@ case "$arch,$system" in
aspp="${TOOLPREF}cc -c";;
*,freebsd) as="${TOOLPREF}as"
aspp="${TOOLPREF}cc -c";;
@ -1713,5 +1713,5 @@ index 41c9315..eb3e1f3 100755
aspp="${TOOLPREF}gcc -c";;
esac
--
2.9.3
2.12.0

View File

@ -1,14 +1,14 @@
From f1be77d69e28ad3bd128c6c757d966e90bbf73d3 Mon Sep 17 00:00:00 2001
From e6d320c5b0f0370b4d1cb8a06f708bbe238a450e Mon Sep 17 00:00:00 2001
From: Nicolas Ojeda Bar <n.oje.bar@gmail.com>
Date: Thu, 10 Nov 2016 14:12:53 +0100
Subject: [PATCH 08/10] Try fix for andi/ori/xori immediates (#1)
Subject: [PATCH 7/9] Try fix for andi/ori/xori immediates (#1)
---
asmcomp/riscv/selection.ml | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/asmcomp/riscv/selection.ml b/asmcomp/riscv/selection.ml
index 60ec5cb..ad2b26e 100644
index 60ec5cb4e..ad2b26e9b 100644
--- a/asmcomp/riscv/selection.ml
+++ b/asmcomp/riscv/selection.ml
@@ -36,11 +36,6 @@ method! select_operation op args =
@ -39,5 +39,5 @@ index 60ec5cb..ad2b26e 100644
method! select_condition = function
--
2.9.3
2.12.0

View File

@ -1,7 +1,7 @@
From b81417ea168c3cf9454eeb41f1f723b66b3210aa Mon Sep 17 00:00:00 2001
From c298ef710b12a4b0f00b21dbea79eab7ef10365a Mon Sep 17 00:00:00 2001
From: Nicolas Ojeda Bar <n.oje.bar@gmail.com>
Date: Tue, 22 Nov 2016 22:30:35 +0100
Subject: [PATCH 09/10] Fix immediates' range when adjusting/indexing sp
Subject: [PATCH 8/9] Fix immediates' range when adjusting/indexing sp
---
asmcomp/riscv/arch.ml | 3 +++
@ -10,7 +10,7 @@ Subject: [PATCH 09/10] Fix immediates' range when adjusting/indexing sp
3 files changed, 44 insertions(+), 14 deletions(-)
diff --git a/asmcomp/riscv/arch.ml b/asmcomp/riscv/arch.ml
index 61a38b1..22c807c 100644
index 61a38b1dd..22c807c49 100644
--- a/asmcomp/riscv/arch.ml
+++ b/asmcomp/riscv/arch.ml
@@ -32,6 +32,9 @@ let spacetime_node_hole_pointer_is_live_before = function
@ -24,7 +24,7 @@ index 61a38b1..22c807c 100644
let big_endian = false
diff --git a/asmcomp/riscv/emit.mlp b/asmcomp/riscv/emit.mlp
index 6d0e3ae..97c49ce 100644
index 6d0e3aefd..97c49ce80 100644
--- a/asmcomp/riscv/emit.mlp
+++ b/asmcomp/riscv/emit.mlp
@@ -93,6 +93,34 @@ let emit_stack r =
@ -139,7 +139,7 @@ index 6d0e3ae..97c49ce 100644
` {emit_string stg} ra, {emit_int(n - size_addr)}(sp)\n`;
`{emit_label !tailrec_entry_point}:\n`;
diff --git a/asmcomp/riscv/selection.ml b/asmcomp/riscv/selection.ml
index ad2b26e..2832336 100644
index ad2b26e9b..283233679 100644
--- a/asmcomp/riscv/selection.ml
+++ b/asmcomp/riscv/selection.ml
@@ -22,7 +22,7 @@ class selector = object (self)
@ -152,5 +152,5 @@ index ad2b26e..2832336 100644
method select_addressing _ = function
| Cop(Cadda, [arg; Cconst_int n]) when self#is_immediate n ->
--
2.9.3
2.12.0

View File

@ -1,14 +1,14 @@
From ab30529b723d451fd0ea8ac64d24fc417af55541 Mon Sep 17 00:00:00 2001
From 21c3a72623492ee22080f1bba2cfa93cbac613e8 Mon Sep 17 00:00:00 2001
From: Nicolas Ojeda Bar <n.oje.bar@gmail.com>
Date: Wed, 23 Nov 2016 12:38:28 +0100
Subject: [PATCH 10/10] Another immediate range fix
Subject: [PATCH 9/9] Another immediate range fix
---
asmcomp/riscv/emit.mlp | 57 ++++++++++++++++++++++++++++++--------------------
1 file changed, 34 insertions(+), 23 deletions(-)
diff --git a/asmcomp/riscv/emit.mlp b/asmcomp/riscv/emit.mlp
index 97c49ce..6cc1908 100644
index 97c49ce80..6cc190864 100644
--- a/asmcomp/riscv/emit.mlp
+++ b/asmcomp/riscv/emit.mlp
@@ -85,14 +85,6 @@ let emit_reg = function
@ -127,5 +127,5 @@ index 97c49ce..6cc1908 100644
emit_all fundecl.fun_body;
List.iter emit_call_gc !call_gc_sites;
--
2.9.3
2.12.0

View File

@ -26,8 +26,8 @@
%global no_parallel_build_arches aarch64
Name: ocaml
Version: 4.04.0
Release: 9%{?dist}
Version: 4.04.1
Release: 1%{?dist}
Summary: OCaml compiler and programming environment
@ -35,7 +35,7 @@ License: QPL and (LGPLv2+ with exceptions)
URL: http://www.ocaml.org
Source0: http://caml.inria.fr/pub/distrib/ocaml-4.04/ocaml-%{version}.tar.gz
Source0: http://caml.inria.fr/pub/distrib/ocaml-4.04/ocaml-%{version}.tar.xz
Source1: http://caml.inria.fr/pub/distrib/ocaml-4.04/ocaml-4.04-refman-html.tar.gz
Source2: http://caml.inria.fr/pub/distrib/ocaml-4.04/ocaml-4.04-refman.pdf
@ -50,7 +50,7 @@ Source3: http://caml.inria.fr/pub/distrib/ocaml-4.04/ocaml-4.04-refman.in
#
# https://pagure.io/fedora-ocaml
#
# Current branch: fedora-26-4.04.0
# Current branch: fedora-27-4.04.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,14 +60,13 @@ Patch0001: 0001-Don-t-add-rpaths-to-libraries.patch
Patch0002: 0002-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch
Patch0003: 0003-configure-Allow-user-defined-C-compiler-flags.patch
Patch0004: 0004-Don-t-rewrite-Werror.patch
Patch0005: 0005-PR-7405-s390x-Fix-address-of-caml_raise_exn-in-nativ.patch
# Out of tree patches from
# https://github.com/nojb/riscv-ocaml
Patch0006: 0006-Adapt-config.guess-for-RISC-V.patch
Patch0007: 0007-Add-RISC-V-backend-runtime.patch
Patch0008: 0008-Try-fix-for-andi-ori-xori-immediates-1.patch
Patch0009: 0009-Fix-immediates-range-when-adjusting-indexing-sp.patch
Patch0010: 0010-Another-immediate-range-fix.patch
Patch0005: 0005-Adapt-config.guess-for-RISC-V.patch
Patch0006: 0006-Add-RISC-V-backend-runtime.patch
Patch0007: 0007-Try-fix-for-andi-ori-xori-immediates-1.patch
Patch0008: 0008-Fix-immediates-range-when-adjusting-indexing-sp.patch
Patch0009: 0009-Another-immediate-range-fix.patch
BuildRequires: binutils-devel
BuildRequires: ncurses-devel
@ -454,6 +453,9 @@ fi
%changelog
* Wed May 10 2017 Richard W.M. Jones <rjones@redhat.com> - 4.04.1-1
- New upstream version 4.04.1.
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.04.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

View File

@ -1,4 +1,4 @@
496f99822133bb905171bae8f64b7be4 ocaml-4.04.0.tar.gz
5c58a4fce99b20e02c3208ad956bcb9d ocaml-4.04-refman-html.tar.gz
8c9df1da0e36a69817f43115fa87360c ocaml-4.04-refman.info.tar.gz
69342c456bcc7ef1c3a76cca1e9c0ec8 ocaml-4.04-refman.pdf
SHA512 (ocaml-4.04.1.tar.xz) = 908bb3afc0a37c33faf9fcb00506bbe44b94f9d45bb6e28312c92c7f46e070bdffec30da65285864a984db70dc7b9bfcefe03b8b7a04da39a7efc9093ea8a297
SHA512 (ocaml-4.04-refman-html.tar.gz) = 027ad5ea08488beb5ce65ec97a8aaf04197317d7d3194de771a4170dea9f8b90fc4309fd917b4176cd930dd0835c84448771b84fa92a735cfc60668ef0a6a413
SHA512 (ocaml-4.04-refman.info.tar.gz) = e83a28e8fb6af198471d26e790ce64ae11d6a2262110ecd5a7b150f9248c221847b1bde3e076b38a7e412ea1d709e0c1bfbf890ccbd5721869ea98d6d9dcc052
SHA512 (ocaml-4.04-refman.pdf) = 9194d0a9cddb1cde3f86f90fbe6e23740ef0e4e49515f40708fe5a2acc3318f6c3839377f93163e2520770357ad0ce7145c5cfb1424503e8873106b17338e4b6