Add fix for Coq build issue:

http://caml.inria.fr/mantis/view.php?id=6507
This commit is contained in:
Richard W.M. Jones 2014-08-08 17:48:06 +01:00
parent f482b154ca
commit 88f9772d9f
12 changed files with 97 additions and 11 deletions

View File

@ -1,7 +1,7 @@
From 39f4cb65afc38a5012a8cdf694dd5686dd60b727 Mon Sep 17 00:00:00 2001 From 39f4cb65afc38a5012a8cdf694dd5686dd60b727 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 b766bba6c388a6772d7d918ea7134f84926c41fd Mon Sep 17 00:00:00 2001 From b766bba6c388a6772d7d918ea7134f84926c41fd 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 ba4b5ff5197769c89169697dae4787922c99a92c Mon Sep 17 00:00:00 2001 From ba4b5ff5197769c89169697dae4787922c99a92c 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 b57344b6f2527f13dfcf6452353f09c85faef940 Mon Sep 17 00:00:00 2001 From b57344b6f2527f13dfcf6452353f09c85faef940 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 f90ddd09c1f50a993806632efb46416af3e20e0e Mon Sep 17 00:00:00 2001 From f90ddd09c1f50a993806632efb46416af3e20e0e 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 691620fe915dfa850ad0dd126619184db0e0cbf3 Mon Sep 17 00:00:00 2001 From 691620fe915dfa850ad0dd126619184db0e0cbf3 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 925ead0db97e6ae5ed158feabd80b0cc2b67a844 Mon Sep 17 00:00:00 2001 From 925ead0db97e6ae5ed158feabd80b0cc2b67a844 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 dab7f94484f21ae05a996a11177bad9b4435b610 Mon Sep 17 00:00:00 2001 From dab7f94484f21ae05a996a11177bad9b4435b610 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 e195fe3961208a2dd2b668b5a37f5c44fa6445a1 Mon Sep 17 00:00:00 2001 From e195fe3961208a2dd2b668b5a37f5c44fa6445a1 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 a39906c0ab2560969575d60b3ff74e641027f8a9 Mon Sep 17 00:00:00 2001 From a39906c0ab2560969575d60b3ff74e641027f8a9 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,81 @@
From a887f2e04859d288908ddf7c8835108cdcd1be6b Mon Sep 17 00:00:00 2001
From: Mark Shinwell <mshinwell@janestreet.com>
Date: Fri, 8 Aug 2014 14:38:12 +0100
Subject: [PATCH 11/11] aarch64: Fix for mantis 6507.
http://caml.inria.fr/mantis/view.php?id=6507
---
asmrun/arm64.S | 26 +++++++++++++++++++++-----
1 file changed, 21 insertions(+), 5 deletions(-)
diff --git a/asmrun/arm64.S b/asmrun/arm64.S
index 50abdae..0dcb3a8 100644
--- a/asmrun/arm64.S
+++ b/asmrun/arm64.S
@@ -83,10 +83,10 @@ caml_call_gc:
PROFILE
/* Record return address */
STOREGLOBAL(x30, caml_last_return_address)
-.Lcaml_call_gc:
/* Record lowest stack address */
mov TMP, sp
STOREGLOBAL(TMP, caml_bottom_of_stack)
+.Lcaml_call_gc:
/* Set up stack space, saving return address and frame pointer */
/* (2 regs RA/GP, 24 allocatable int regs, 24 caller-save float regs) * 8 */
stp x29, x30, [sp, -400]!
@@ -175,7 +175,14 @@ caml_alloc1:
ret
2: stp x29, x30, [sp, -16]!
CFI_ADJUST(16)
- add x29, sp, #0
+ /* Record the lowest address of the caller's stack frame. This is the address
+ immediately above the pair of words (x29 and x30) we just pushed. Those must
+ not be included since otherwise the distance from [caml_bottom_of_stack] to the
+ highest address in the caller's stack frame won't match the frame size contained
+ in the relevant frame descriptor. */
+ add x29, sp, #16
+ STOREGLOBAL(x29, caml_bottom_of_stack)
+ sub x29, x29, #16
/* Record return address */
STOREGLOBAL(x30, caml_last_return_address)
/* Call GC */
@@ -200,7 +207,10 @@ caml_alloc2:
ret
2: stp x29, x30, [sp, -16]!
CFI_ADJUST(16)
- add x29, sp, #0
+ /* Record the lowest address of the caller's stack frame. See comment above. */
+ add x29, sp, #16
+ STOREGLOBAL(x29, caml_bottom_of_stack)
+ sub x29, x29, #16
/* Record return address */
STOREGLOBAL(x30, caml_last_return_address)
/* Call GC */
@@ -225,7 +235,10 @@ caml_alloc3:
ret
2: stp x29, x30, [sp, -16]!
CFI_ADJUST(16)
- add x29, sp, #0
+ /* Record the lowest address of the caller's stack frame. See comment above. */
+ add x29, sp, #16
+ STOREGLOBAL(x29, caml_bottom_of_stack)
+ sub x29, x29, #16
/* Record return address */
STOREGLOBAL(x30, caml_last_return_address)
/* Call GC */
@@ -250,7 +263,10 @@ caml_allocN:
ret
2: stp x29, x30, [sp, -16]!
CFI_ADJUST(16)
- add x29, sp, #0
+ /* Record the lowest address of the caller's stack frame. See comment above. */
+ add x29, sp, #16
+ STOREGLOBAL(x29, caml_bottom_of_stack)
+ sub x29, x29, #16
/* Record return address */
STOREGLOBAL(x30, caml_last_return_address)
/* Call GC. This preserves ARG */
--
1.9.3

View File

@ -20,7 +20,7 @@
Name: ocaml Name: ocaml
Version: 4.02.0 Version: 4.02.0
Release: 0.8.git%{shortcommit}%{?dist} Release: 0.9.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-aarch64-Fix-for-mantis-6507.patch
# Add BFD support so that ocamlobjinfo supports *.cmxs format (RHBZ#1113735). # Add BFD support so that ocamlobjinfo supports *.cmxs format (RHBZ#1113735).
BuildRequires: binutils-devel BuildRequires: binutils-devel
@ -420,6 +421,10 @@ fi
%changelog %changelog
* Fri Aug 08 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02.0-0.9
- Add fix for Coq build issue:
http://caml.inria.fr/mantis/view.php?id=6507
* Fri Aug 01 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02.0-0.8 * Fri Aug 01 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02.0-0.8
- Rebase on top of 4.02.0 beta commit 10e45753. - Rebase on top of 4.02.0 beta commit 10e45753.