New upstream version: 4.02.2+rc1.

- Dropped two aarch64 patches which are now included upstream.
- Includes libasmrun_shared.so (RHBZ#1195025).
This commit is contained in:
Richard W.M. Jones 2015-06-16 13:49:56 +01:00
parent 23620d41df
commit c5cb967506
20 changed files with 522 additions and 1811 deletions

View File

@ -1,14 +1,14 @@
From 607ae33eed09f9eafccda1276626e9c509dcbed1 Mon Sep 17 00:00:00 2001
From b57c7d76ec960e35a6b227f8944e5956cb9b381b Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 24 Jun 2014 22:29:38 +0100
Subject: [PATCH 01/18] Don't ignore ./configure, it's a real git file.
Subject: [PATCH 01/16] Don't ignore ./configure, it's a real git file.
---
.gitignore | 1 -
1 file changed, 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 6c66ecc..5d4b626 100644
index 87f7cda..8aad7c2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,7 +19,6 @@

View File

@ -1,7 +1,7 @@
From 89f29afc4aaa324585aa010289a4a58416d53700 Mon Sep 17 00:00:00 2001
From 5afec587989790c5d3f8e0c215672d27aad6d6fe Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 7 Jun 2012 15:36:16 +0100
Subject: [PATCH 02/18] Ensure empty compilerlibs/ directory is created by git.
Subject: [PATCH 02/16] Ensure empty compilerlibs/ directory is created by git.
This directory exists in the OCaml tarball, but is empty. As a
result, git ignores it unless we put a dummy file in it.

View File

@ -1,17 +1,17 @@
From 10209519de242952ebdef608ab5f2f51a6c9e2b3 Mon Sep 17 00:00:00 2001
From 738c7f82c8b5413d83b1599235cebada4bd022c0 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 03/18] Don't add rpaths to libraries.
Subject: [PATCH 03/16] 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 2517434..75a75b4 100644
index 0b90cd3..dc48712 100644
--- a/tools/Makefile.shared
+++ b/tools/Makefile.shared
@@ -112,9 +112,9 @@ ocamlmklibconfig.ml: ../config/Makefile
@@ -113,9 +113,9 @@ ocamlmklibconfig.ml: ../config/Makefile
echo 'let ext_dll = "$(EXT_DLL)"'; \
echo 'let supports_shared_libraries = $(SUPPORTS_SHARED_LIBRARIES)';\
echo 'let mkdll = "$(MKDLL)"'; \

View File

@ -1,7 +1,7 @@
From b360841d9b1eae64201d1ee7a1ff6dc5a5b0fa87 Mon Sep 17 00:00:00 2001
From 15662574d75d041cc3a3a824ac70d6e78ecbb6d0 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 04/18] ocamlbyteinfo, ocamlplugininfo: Useful utilities from
Subject: [PATCH 04/16] ocamlbyteinfo, ocamlplugininfo: Useful utilities from
Debian, sent upstream.
See:

View File

@ -1,17 +1,17 @@
From 6193266853d3667f18048989ebaaa0cbcb74afb5 Mon Sep 17 00:00:00 2001
From bf5117d9018ef5fe22e3ca7ac932eb0d31905028 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 05/18] configure: Allow user defined C compiler flags.
Subject: [PATCH 05/16] configure: Allow user defined C compiler flags.
---
configure | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure b/configure
index 3edb9fd..18b95cd 100755
index 4ea1498..d006010 100755
--- a/configure
+++ b/configure
@@ -1654,6 +1654,10 @@ case "$buggycc" in
@@ -1701,6 +1701,10 @@ case "$buggycc" in
nativecccompopts="$nativecccompopts -fomit-frame-pointer";;
esac

View File

@ -1,7 +1,7 @@
From 5022b33b094d5a88c5c372b0873d81023f0d7bb4 Mon Sep 17 00:00:00 2001
From d6961d937fdb97bc119d31a2d3919a380cdc2b4a Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 May 2012 20:47:07 +0100
Subject: [PATCH 06/18] Add support for ppc64.
Subject: [PATCH 06/16] Add support for ppc64.
Note (1): This patch was rejected upstream because they don't have
appropriate hardware for testing.
@ -1576,12 +1576,12 @@ index 0000000..53b7828
+
+let fundecl f = (new selector)#emit_fundecl f
diff --git a/asmrun/Makefile b/asmrun/Makefile
index 63ff80c..5da022c 100644
index 37b6182..788fee9 100644
--- a/asmrun/Makefile
+++ b/asmrun/Makefile
@@ -93,6 +93,12 @@ power.o: power-$(SYSTEM).o
power.p.o: power-$(SYSTEM).o
cp power-$(SYSTEM).o power.p.o
@@ -122,6 +122,12 @@ power.p.o: power-$(SYSTEM).o
power.pic.o: power-$(SYSTEM).pic.o
cp power-$(SYSTEM).pic.o power.pic.o
+power64.o: power64-$(SYSTEM).o
+ cp power64-$(SYSTEM).o power64.o
@ -2085,7 +2085,7 @@ index 0000000..b2c24d6
+ .align 3
+
diff --git a/asmrun/stack.h b/asmrun/stack.h
index 92b3c28..5202c3a 100644
index 6e55942..81263da 100644
--- a/asmrun/stack.h
+++ b/asmrun/stack.h
@@ -46,6 +46,15 @@
@ -2105,10 +2105,10 @@ index 92b3c28..5202c3a 100644
#define Saved_return_address(sp) *((intnat *)((sp) - 4))
#define Callback_link(sp) ((struct caml_context *)((sp) + 8))
diff --git a/configure b/configure
index 18b95cd..57c8699 100755
index d006010..cb289fb 100755
--- a/configure
+++ b/configure
@@ -814,6 +814,7 @@ case "$target" in
@@ -843,6 +843,7 @@ case "$target" in
fi;;
i[3456]86-*-gnu*) arch=i386; system=gnu;;
i[3456]86-*-mingw*) arch=i386; system=mingw;;
@ -2116,7 +2116,7 @@ index 18b95cd..57c8699 100755
powerpc*-*-linux*) arch=power; model=ppc; system=elf;;
powerpc-*-netbsd*) arch=power; model=ppc; system=elf;;
powerpc-*-openbsd*) arch=power; model=ppc; system=bsd_elf;;
@@ -894,6 +895,8 @@ case "$arch,$system" in
@@ -923,6 +924,8 @@ case "$arch,$system" in
aspp="/usr/ccs/bin/${TOOLPREF}as -P";;
power,elf) as="${TOOLPREF}as -u -m ppc"
aspp="${TOOLPREF}gcc -c";;

View File

@ -1,7 +1,7 @@
From 834644b81c536fc81022a0a13f860fb33e3d78d2 Mon Sep 17 00:00:00 2001
From 755d197c3eca97f8b690d49917a42ef4c7287ce2 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 24 Oct 2014 12:59:23 +0200
Subject: [PATCH 07/18] ppc64: Update for OCaml 4.02.0.
Subject: [PATCH 07/16] ppc64: Update for OCaml 4.02.0.
These are based on the power (ppc32) branch and some guesswork.
In particular, I'm not convinced that my changes to floating

View File

@ -1,7 +1,7 @@
From c89bde7d3563e2c7bb725272334fabf53044bd9c Mon Sep 17 00:00:00 2001
From 7a80efaf43d1832e9a53508835df61c0d43d1105 Mon Sep 17 00:00:00 2001
From: Michel Normand <normand@linux.vnet.ibm.com>
Date: Tue, 18 Mar 2014 09:15:47 -0400
Subject: [PATCH 08/18] Add support for ppc64le.
Subject: [PATCH 08/16] Add support for ppc64le.
Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
---
@ -1556,10 +1556,10 @@ index 0000000..6101d53
+
+let fundecl f = (new selector)#emit_fundecl f
diff --git a/asmrun/Makefile b/asmrun/Makefile
index 5da022c..c0362b6 100644
index 788fee9..a63321e 100644
--- a/asmrun/Makefile
+++ b/asmrun/Makefile
@@ -99,6 +99,12 @@ power64.o: power64-$(SYSTEM).o
@@ -128,6 +128,12 @@ power64.o: power64-$(SYSTEM).o
power64.p.o: power64-$(SYSTEM).o
cp power64-$(SYSTEM).o power64.p.o
@ -1858,7 +1858,7 @@ index 0000000..f49d00c
+power64-elf.S
\ No newline at end of file
diff --git a/asmrun/stack.h b/asmrun/stack.h
index 5202c3a..94b81e4 100644
index 81263da..e23da0c 100644
--- a/asmrun/stack.h
+++ b/asmrun/stack.h
@@ -55,6 +55,15 @@
@ -1892,10 +1892,10 @@ index b79252d..049652e 100755
echo powerpc-unknown-linux-${LIBC}
exit ;;
diff --git a/configure b/configure
index 57c8699..c04272c 100755
index cb289fb..6157157 100755
--- a/configure
+++ b/configure
@@ -815,6 +815,7 @@ case "$target" in
@@ -844,6 +844,7 @@ case "$target" in
i[3456]86-*-gnu*) arch=i386; system=gnu;;
i[3456]86-*-mingw*) arch=i386; system=mingw;;
powerpc64-*-linux*) arch=power64; model=ppc64; system=elf;;
@ -1903,7 +1903,7 @@ index 57c8699..c04272c 100755
powerpc*-*-linux*) arch=power; model=ppc; system=elf;;
powerpc-*-netbsd*) arch=power; model=ppc; system=elf;;
powerpc-*-openbsd*) arch=power; model=ppc; system=bsd_elf;;
@@ -897,6 +898,8 @@ case "$arch,$system" in
@@ -926,6 +927,8 @@ case "$arch,$system" in
aspp="${TOOLPREF}gcc -c";;
power64,elf) as='${TOOLPREF}as -u -m ppc64'
aspp='${TOOLPREF}gcc -c';;

View File

@ -1,7 +1,7 @@
From 8d86aba4983a254f36f2f1758079b3099ba5fc07 Mon Sep 17 00:00:00 2001
From c7ff29a506205aeb9c398e08bfd9c84954709c72 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 24 Oct 2014 12:59:23 +0200
Subject: [PATCH 09/18] ppc64le: Update for OCaml 4.02.0.
Subject: [PATCH 09/16] ppc64le: Update for OCaml 4.02.0.
These are based on the power (ppc32) branch and some guesswork. In
particular, I'm not convinced that my changes to floating point

View File

@ -1,7 +1,7 @@
From 4d08d0e8511e247a96440693b73773c72b04fee2 Mon Sep 17 00:00:00 2001
From a917e3fed4c915c07b01ee07c17aeefd5500cd74 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 10 May 2014 03:20:35 -0400
Subject: [PATCH 10/18] arm, arm64: Mark stack as non-executable.
Subject: [PATCH 10/16] arm, arm64: Mark stack as non-executable.
The same fix as this one, which was only fully applied to
i686 & x86-64:

View File

@ -1,7 +1,7 @@
From 8ee89eee0500d17ffb91aa2febdeb6792ac53f27 Mon Sep 17 00:00:00 2001
From bd549d61c9f6b2d20261afba90b33eb96612b7d6 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 1 Apr 2014 11:17:07 +0100
Subject: [PATCH 11/18] arg: Add no_arg and get_arg helper functions.
Subject: [PATCH 11/16] arg: Add no_arg and get_arg helper functions.
The no_arg function in this patch is a no-op. It will do something
useful in the followups.

View File

@ -1,7 +1,7 @@
From 350eab7918f0adf385e01411ae6fed3e0579145f Mon Sep 17 00:00:00 2001
From a743fad54d002ab6db941cfe249bfcefb55ae6f5 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 1 Apr 2014 11:21:40 +0100
Subject: [PATCH 12/18] arg: Allow flags such as --flag=arg as well as --flag
Subject: [PATCH 12/16] arg: Allow flags such as --flag=arg as well as --flag
arg.
Allow flags to be followed directly by their argument, separated by an '='

View File

@ -1,7 +1,7 @@
From 8e493f90181b8b592185b2f9322575113b5ff7d5 Mon Sep 17 00:00:00 2001
From 03f9a1532f4559bdd8da5edb9915d058f380d633 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 11 Sep 2014 14:49:54 +0100
Subject: [PATCH 14/18] ppc, ppc64, ppc64le: Mark stack as non-executable.
Subject: [PATCH 14/16] ppc, ppc64, ppc64le: Mark stack as non-executable.
The same fix as this one, which was only fully applied to
i686 & x86-64:
@ -16,10 +16,10 @@ http://caml.inria.fr/mantis/view.php?id=4564
5 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/asmcomp/power/emit.mlp b/asmcomp/power/emit.mlp
index 0a26ed1..8e31b58 100644
index 4344085..717ab12 100644
--- a/asmcomp/power/emit.mlp
+++ b/asmcomp/power/emit.mlp
@@ -963,4 +963,5 @@ let end_assembly() =
@@ -927,4 +927,5 @@ let end_assembly() =
` .long ({emit_label lbl} - .) + {emit_int32 ofs}\n`);
efa_def_label = (fun l -> `{emit_label l}:\n`);
efa_string = (fun s -> emit_bytes_directive " .byte " (s ^ "\000"))

View File

@ -1,7 +1,7 @@
From df5201a35d02a13ad7ffd6fb38252851910cae43 Mon Sep 17 00:00:00 2001
From 812ed668f8d37e1153552535070a0673772a2aea Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 24 Oct 2014 10:10:54 +0100
Subject: [PATCH 15/18] ppc64/ppc64le: proc: Interim definitions for op_is_pure
Subject: [PATCH 15/16] ppc64/ppc64le: proc: Interim definitions for op_is_pure
and regs_are_volatile.
See: https://bugzilla.redhat.com/show_bug.cgi?id=1156300

View File

@ -1,79 +0,0 @@
From d3ca0ccc0eccfecd4aa922decf99ca7d67d40fa7 Mon Sep 17 00:00:00 2001
From: Mark Shinwell <mshinwell@janestreet.com>
Date: Wed, 6 May 2015 17:37:43 +0000
Subject: [PATCH 16/18] Fix PR#6490: incorrect backtraces in gdb on AArch64.
(Also fixes the same problem for 32-bit ARM.)
git-svn-id: http://caml.inria.fr/svn/ocaml/version/4.02@16091 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
---
asmcomp/arm/emit.mlp | 4 +++-
asmcomp/arm64/emit.mlp | 6 ++++--
asmcomp/emitaux.ml | 9 +++++++++
asmcomp/emitaux.mli | 1 +
4 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/asmcomp/arm/emit.mlp b/asmcomp/arm/emit.mlp
index 61035b8..4948fb2 100644
--- a/asmcomp/arm/emit.mlp
+++ b/asmcomp/arm/emit.mlp
@@ -852,8 +852,10 @@ let fundecl fundecl =
let n = frame_size() in
if n > 0 then begin
ignore(emit_stack_adjustment (-n));
- if !contains_calls then
+ if !contains_calls then begin
+ cfi_offset ~reg:14 (* lr *) ~offset:(-4);
` str lr, [sp, #{emit_int(n - 4)}]\n`
+ end
end;
`{emit_label !tailrec_entry_point}:\n`;
emit_all 0 fundecl.fun_body;
diff --git a/asmcomp/arm64/emit.mlp b/asmcomp/arm64/emit.mlp
index 734bd23..c5c30d4 100644
--- a/asmcomp/arm64/emit.mlp
+++ b/asmcomp/arm64/emit.mlp
@@ -654,8 +654,10 @@ let fundecl fundecl =
let n = frame_size() in
if n > 0 then
emit_stack_adjustment (-n);
- if !contains_calls then
- ` str x30, [sp, #{emit_int (n-8)}]\n`;
+ if !contains_calls then begin
+ cfi_offset ~reg:30 (* return address *) ~offset:(-8);
+ ` str x30, [sp, #{emit_int (n-8)}]\n`
+ end;
`{emit_label !tailrec_entry_point}:\n`;
emit_all fundecl.fun_body;
List.iter emit_call_gc !call_gc_sites;
diff --git a/asmcomp/emitaux.ml b/asmcomp/emitaux.ml
index 24a621b..ec2e8f0 100644
--- a/asmcomp/emitaux.ml
+++ b/asmcomp/emitaux.ml
@@ -195,6 +195,15 @@ let cfi_adjust_cfa_offset n =
emit_string "\t.cfi_adjust_cfa_offset\t"; emit_int n; emit_string "\n";
end
+let cfi_offset ~reg ~offset =
+ if is_cfi_enabled () then begin
+ emit_string "\t.cfi_offset ";
+ emit_int reg;
+ emit_string ", ";
+ emit_int offset;
+ emit_string "\n"
+ end
+
(* Emit debug information *)
(* This assoc list is expected to be very short *)
diff --git a/asmcomp/emitaux.mli b/asmcomp/emitaux.mli
index 486a583..e943da3 100644
--- a/asmcomp/emitaux.mli
+++ b/asmcomp/emitaux.mli
@@ -56,3 +56,4 @@ val is_generic_function: string -> bool
val cfi_startproc : unit -> unit
val cfi_endproc : unit -> unit
val cfi_adjust_cfa_offset : int -> unit
+val cfi_offset : reg:int -> offset:int -> unit
--
2.3.1

View File

@ -1,7 +1,7 @@
From 5b7d4c5d1407115c2c685987be2669a9b0aafa78 Mon Sep 17 00:00:00 2001
From c1ebccc0e1250d3efc303819b383f713132e66f8 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 28 May 2015 16:13:40 -0400
Subject: [PATCH 17/18] ppc64le: Fix calling convention of external functions
Subject: [PATCH 16/16] ppc64le: Fix calling convention of external functions
with > 8 parameters (RHBZ#1225995).
For external (ie. C) functions with more than 8 parameters, we must

File diff suppressed because it is too large Load Diff

View File

@ -16,8 +16,8 @@
%endif
Name: ocaml
Version: 4.02.1
Release: 7%{?dist}
Version: 4.02.2
Release: 0.rc1.1%{?dist}
Summary: OCaml compiler and programming environment
@ -25,7 +25,9 @@ License: QPL and (LGPLv2+ with exceptions)
URL: http://www.ocaml.org
Source0: http://caml.inria.fr/pub/distrib/ocaml-4.02/%{name}-%{version}.tar.gz
# There's no 4.02.2+rc1 tarball, but you can grab it from github here:
# https://github.com/ocaml/ocaml/tarball/4.02.2+rc1
Source0: ocaml-ocaml-4.02.2-rc1-0-g2eb6db8.tar.gz
Source1: http://caml.inria.fr/pub/distrib/ocaml-4.02/ocaml-4.02-refman-html.tar.gz
Source2: http://caml.inria.fr/pub/distrib/ocaml-4.02/ocaml-4.02-refman.pdf
Source3: http://caml.inria.fr/pub/distrib/ocaml-4.02/ocaml-4.02-refman.info.tar.gz
@ -60,9 +62,7 @@ Patch0012: 0012-arg-Allow-flags-such-as-flag-arg-as-well-as-flag-arg.patch
Patch0013: 0013-PR-6517-use-ISO-C99-types-u-int-32-64-_t-in-preferen.patch
Patch0014: 0014-ppc-ppc64-ppc64le-Mark-stack-as-non-executable.patch
Patch0015: 0015-ppc64-ppc64le-proc-Interim-definitions-for-op_is_pur.patch
Patch0016: 0016-Fix-PR-6490-incorrect-backtraces-in-gdb-on-AArch64.-.patch
Patch0017: 0017-ppc64le-Fix-calling-convention-of-external-functions.patch
Patch0018: 0018-Fix-PR-6878-AArch64-conditional-branches-out-of-rang.patch
Patch0016: 0016-ppc64le-Fix-calling-convention-of-external-functions.patch
# Add BFD support so that ocamlobjinfo supports *.cmxs format (RHBZ#1113735).
BuildRequires: binutils-devel
@ -194,9 +194,12 @@ may not be portable between versions.
%prep
%setup -q -T -b 0 -n %{name}-%{version}
%setup -q -T -D -a 1 -n %{name}-%{version}
%setup -q -T -D -a 3 -n %{name}-%{version}
%setup -q -T -b 0 -n ocaml-ocaml-2eb6db8
%setup -q -T -D -a 1 -n ocaml-ocaml-2eb6db8
%setup -q -T -D -a 3 -n ocaml-ocaml-2eb6db8
#%setup -q -T -b 0 -n %{name}-%{version}
#%setup -q -T -D -a 1 -n %{name}-%{version}
#%setup -q -T -D -a 3 -n %{name}-%{version}
cp %{SOURCE2} refman.pdf
git init
@ -343,6 +346,7 @@ fi
%{_libdir}/ocaml/*.cmxa
%{_libdir}/ocaml/*.cmx
%{_libdir}/ocaml/*.o
%{_libdir}/ocaml/libasmrun_shared.so
%endif
%{_libdir}/ocaml/*.mli
%{_libdir}/ocaml/libcamlrun_shared.so
@ -424,6 +428,11 @@ fi
%changelog
* Tue Jul 16 2015 Richard W.M. Jones <rjones@redhat.com> - 4.02.2-0.rc1.1
- New upstream version: 4.02.2+rc1.
- Dropped two aarch64 patches which are now included upstream.
- Includes libasmrun_shared.so (RHBZ#1195025).
* Wed Jun 10 2015 Richard W.M. Jones <rjones@redhat.com> - 4.02.1-7
- aarch64: Use upstream version of patch that fixes RHBZ#1224815.

View File

@ -1,4 +1,4 @@
20b691d71d36df69f9cb16ab4521ed49 ocaml-4.02-refman-html.tar.gz
265b7db123e925e8b7b70ca2266b4206 ocaml-4.02-refman.info.tar.gz
1d683029a6ef48e34cc24eb1982cdd05 ocaml-4.02-refman.pdf
3c35318eefd201f96797c093c920b343 ocaml-4.02.1.tar.gz
5444ee57d65d457d3524d293a51f3ae8 ocaml-ocaml-4.02.2-rc1-0-g2eb6db8.tar.gz