Fix broken caml_callback2 on aarch64

http://caml.inria.fr/mantis/view.php?id=6489
This commit is contained in:
Richard W.M. Jones 2014-07-15 22:39:27 +01:00
parent e08cafe6a8
commit fd2e30ff27
12 changed files with 42 additions and 12 deletions

View File

@ -1,7 +1,7 @@
From 73598ab5b5b9c859e900413a31ca6452c324ff3d Mon Sep 17 00:00:00 2001 From 73598ab5b5b9c859e900413a31ca6452c324ff3d Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 24 Jun 2014 22:29:38 +0100 Date: Tue, 24 Jun 2014 22:29:38 +0100
Subject: [PATCH 01/10] Don't ignore ./configure, it's a real git file. Subject: [PATCH 01/11] Don't ignore ./configure, it's a real git file.
--- ---
.gitignore | 1 - .gitignore | 1 -

View File

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

View File

@ -1,7 +1,7 @@
From 8d1cb3e2a169a642a0c75e965bc6fc17184124c8 Mon Sep 17 00:00:00 2001 From 8d1cb3e2a169a642a0c75e965bc6fc17184124c8 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 24 Jun 2014 10:00:15 +0100 Date: Tue, 24 Jun 2014 10:00:15 +0100
Subject: [PATCH 03/10] Don't add rpaths to libraries. Subject: [PATCH 03/11] Don't add rpaths to libraries.
--- ---
tools/Makefile.shared | 6 +++--- tools/Makefile.shared | 6 +++---

View File

@ -1,7 +1,7 @@
From 0112a99407da09f066c9cbaa41fe770370ba6706 Mon Sep 17 00:00:00 2001 From 0112a99407da09f066c9cbaa41fe770370ba6706 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 May 2012 20:40:36 +0100 Date: Tue, 29 May 2012 20:40:36 +0100
Subject: [PATCH 04/10] ocamlbyteinfo, ocamlplugininfo: Useful utilities from Subject: [PATCH 04/11] ocamlbyteinfo, ocamlplugininfo: Useful utilities from
Debian, sent upstream. Debian, sent upstream.
See: See:

View File

@ -1,7 +1,7 @@
From 96ec5173787ce5e03dca7da6527c4cc732772051 Mon Sep 17 00:00:00 2001 From 96ec5173787ce5e03dca7da6527c4cc732772051 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 May 2012 20:44:18 +0100 Date: Tue, 29 May 2012 20:44:18 +0100
Subject: [PATCH 05/10] configure: Allow user defined C compiler flags. Subject: [PATCH 05/11] configure: Allow user defined C compiler flags.
--- ---
configure | 4 ++++ configure | 4 ++++

View File

@ -1,7 +1,7 @@
From 443863864a99a0408c6068ba0b5ba6beddec337a Mon Sep 17 00:00:00 2001 From 443863864a99a0408c6068ba0b5ba6beddec337a Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 May 2012 20:47:07 +0100 Date: Tue, 29 May 2012 20:47:07 +0100
Subject: [PATCH 06/10] Add support for ppc64. Subject: [PATCH 06/11] Add support for ppc64.
Note (1): This patch was rejected upstream because they don't have Note (1): This patch was rejected upstream because they don't have
appropriate hardware for testing. appropriate hardware for testing.

View File

@ -1,7 +1,7 @@
From 69837e1be517082e841d583f59f017edfd7ffa39 Mon Sep 17 00:00:00 2001 From 69837e1be517082e841d583f59f017edfd7ffa39 Mon Sep 17 00:00:00 2001
From: Michel Normand <normand@linux.vnet.ibm.com> From: Michel Normand <normand@linux.vnet.ibm.com>
Date: Tue, 18 Mar 2014 09:15:47 -0400 Date: Tue, 18 Mar 2014 09:15:47 -0400
Subject: [PATCH 07/10] Add support for ppc64le. Subject: [PATCH 07/11] Add support for ppc64le.
Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com> Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
--- ---

View File

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

View File

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

View File

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

View File

@ -0,0 +1,27 @@
From 20a89e9d501a4f90fb6c1bed59fd41bfec349beb Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 15 Jul 2014 21:30:15 +0000
Subject: [PATCH 11/11] arm64: Fix missing close-quote which caused
caml_callback2 to fail.
http://caml.inria.fr/mantis/view.php?id=6489
---
asmrun/arm64.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/asmrun/arm64.S b/asmrun/arm64.S
index a7d4953..50abdae 100644
--- a/asmrun/arm64.S
+++ b/asmrun/arm64.S
@@ -478,7 +478,7 @@ caml_callback2_exn:
/* Initial shuffling of arguments (x0 = closure, x1 = arg1, x2 = arg2) */
mov TMP, x0
mov x0, x1 /* x0 = first arg */
- mov x1, x2 /* x1 = second arg
+ mov x1, x2 /* x1 = second arg */
mov x2, TMP /* x2 = closure environment */
ADDRGLOBAL(ARG, caml_apply2)
b .Ljump_to_caml
--
1.9.0

View File

@ -20,7 +20,7 @@
Name: ocaml Name: ocaml
Version: 4.02.0 Version: 4.02.0
Release: 0.4.git%{shortcommit}%{?dist} Release: 0.5.git%{shortcommit}%{?dist}
Summary: OCaml compiler and programming environment Summary: OCaml compiler and programming environment
@ -58,6 +58,7 @@ Patch0007: 0007-Add-support-for-ppc64le.patch
Patch0008: 0008-arm-arm64-Mark-stack-as-non-executable.patch Patch0008: 0008-arm-arm64-Mark-stack-as-non-executable.patch
Patch0009: 0009-arg-Add-no_arg-and-get_arg-helper-functions.patch Patch0009: 0009-arg-Add-no_arg-and-get_arg-helper-functions.patch
Patch0010: 0010-arg-Allow-flags-such-as-flag-arg-as-well-as-flag-arg.patch Patch0010: 0010-arg-Allow-flags-such-as-flag-arg-as-well-as-flag-arg.patch
Patch0011: 0011-arm64-Fix-missing-close-quote-which-caused-caml_call.patch
# On ARM 32 bit and aarch64, the CSE optimization is broken. See: # On ARM 32 bit and aarch64, the CSE optimization is broken. See:
# http://caml.inria.fr/mantis/view.php?id=6484 (armv7hl) # http://caml.inria.fr/mantis/view.php?id=6484 (armv7hl)
@ -435,8 +436,10 @@ fi
%changelog %changelog
* Tue Jul 15 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02.0-0.4 * Tue Jul 15 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02.0-0.5
- Disable CSE optimization which is broken on armv7hl and aarch64. - Disable CSE optimization which is broken on armv7hl and aarch64.
- Fix broken caml_callback2 on aarch64
http://caml.inria.fr/mantis/view.php?id=6489
* Sat Jul 12 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02.0-0.1 * Sat Jul 12 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02.0-0.1
- Update to 4.02.0-beta1 + patches from the upstream 4.02 branch. - Update to 4.02.0-beta1 + patches from the upstream 4.02 branch.