From 88f9772d9f15de54efe9175e42946684cc2dc4af Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 8 Aug 2014 17:48:06 +0100 Subject: [PATCH] Add fix for Coq build issue: http://caml.inria.fr/mantis/view.php?id=6507 --- ...ore-.-configure-it-s-a-real-git-file.patch | 2 +- ...pilerlibs-directory-is-created-by-gi.patch | 2 +- 0003-Don-t-add-rpaths-to-libraries.patch | 2 +- ...amlplugininfo-Useful-utilities-from-.patch | 2 +- ...-Allow-user-defined-C-compiler-flags.patch | 2 +- 0006-Add-support-for-ppc64.patch | 2 +- 0007-Add-support-for-ppc64le.patch | 2 +- ...m-arm64-Mark-stack-as-non-executable.patch | 2 +- ...-no_arg-and-get_arg-helper-functions.patch | 2 +- ...such-as-flag-arg-as-well-as-flag-arg.patch | 2 +- 0011-aarch64-Fix-for-mantis-6507.patch | 81 +++++++++++++++++++ ocaml.spec | 7 +- 12 files changed, 97 insertions(+), 11 deletions(-) create mode 100644 0011-aarch64-Fix-for-mantis-6507.patch diff --git a/0001-Don-t-ignore-.-configure-it-s-a-real-git-file.patch b/0001-Don-t-ignore-.-configure-it-s-a-real-git-file.patch index 793b53d..a1f95ef 100644 --- a/0001-Don-t-ignore-.-configure-it-s-a-real-git-file.patch +++ b/0001-Don-t-ignore-.-configure-it-s-a-real-git-file.patch @@ -1,7 +1,7 @@ From 39f4cb65afc38a5012a8cdf694dd5686dd60b727 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" 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 - diff --git a/0002-Ensure-empty-compilerlibs-directory-is-created-by-gi.patch b/0002-Ensure-empty-compilerlibs-directory-is-created-by-gi.patch index bb930e0..cf4c8d4 100644 --- a/0002-Ensure-empty-compilerlibs-directory-is-created-by-gi.patch +++ b/0002-Ensure-empty-compilerlibs-directory-is-created-by-gi.patch @@ -1,7 +1,7 @@ From b766bba6c388a6772d7d918ea7134f84926c41fd Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" 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 result, git ignores it unless we put a dummy file in it. diff --git a/0003-Don-t-add-rpaths-to-libraries.patch b/0003-Don-t-add-rpaths-to-libraries.patch index 4459712..3e4a76d 100644 --- a/0003-Don-t-add-rpaths-to-libraries.patch +++ b/0003-Don-t-add-rpaths-to-libraries.patch @@ -1,7 +1,7 @@ From ba4b5ff5197769c89169697dae4787922c99a92c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" 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 +++--- diff --git a/0004-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch b/0004-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch index f2ec3b2..e69b867 100644 --- a/0004-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch +++ b/0004-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch @@ -1,7 +1,7 @@ From b57344b6f2527f13dfcf6452353f09c85faef940 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" 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. See: diff --git a/0005-configure-Allow-user-defined-C-compiler-flags.patch b/0005-configure-Allow-user-defined-C-compiler-flags.patch index d1112b2..06b2bc6 100644 --- a/0005-configure-Allow-user-defined-C-compiler-flags.patch +++ b/0005-configure-Allow-user-defined-C-compiler-flags.patch @@ -1,7 +1,7 @@ From f90ddd09c1f50a993806632efb46416af3e20e0e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" 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 ++++ diff --git a/0006-Add-support-for-ppc64.patch b/0006-Add-support-for-ppc64.patch index 8be4322..120f38b 100644 --- a/0006-Add-support-for-ppc64.patch +++ b/0006-Add-support-for-ppc64.patch @@ -1,7 +1,7 @@ From 691620fe915dfa850ad0dd126619184db0e0cbf3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" 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 appropriate hardware for testing. diff --git a/0007-Add-support-for-ppc64le.patch b/0007-Add-support-for-ppc64le.patch index 0a1c54e..fad4a3e 100644 --- a/0007-Add-support-for-ppc64le.patch +++ b/0007-Add-support-for-ppc64le.patch @@ -1,7 +1,7 @@ From 925ead0db97e6ae5ed158feabd80b0cc2b67a844 Mon Sep 17 00:00:00 2001 From: Michel Normand 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 --- diff --git a/0008-arm-arm64-Mark-stack-as-non-executable.patch b/0008-arm-arm64-Mark-stack-as-non-executable.patch index c852849..33c2a9a 100644 --- a/0008-arm-arm64-Mark-stack-as-non-executable.patch +++ b/0008-arm-arm64-Mark-stack-as-non-executable.patch @@ -1,7 +1,7 @@ From dab7f94484f21ae05a996a11177bad9b4435b610 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" 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 i686 & x86-64: diff --git a/0009-arg-Add-no_arg-and-get_arg-helper-functions.patch b/0009-arg-Add-no_arg-and-get_arg-helper-functions.patch index 8c4c818..4046636 100644 --- a/0009-arg-Add-no_arg-and-get_arg-helper-functions.patch +++ b/0009-arg-Add-no_arg-and-get_arg-helper-functions.patch @@ -1,7 +1,7 @@ From e195fe3961208a2dd2b668b5a37f5c44fa6445a1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" 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 useful in the followups. diff --git a/0010-arg-Allow-flags-such-as-flag-arg-as-well-as-flag-arg.patch b/0010-arg-Allow-flags-such-as-flag-arg-as-well-as-flag-arg.patch index 1fbfc6d..0926929 100644 --- a/0010-arg-Allow-flags-such-as-flag-arg-as-well-as-flag-arg.patch +++ b/0010-arg-Allow-flags-such-as-flag-arg-as-well-as-flag-arg.patch @@ -1,7 +1,7 @@ From a39906c0ab2560969575d60b3ff74e641027f8a9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" 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. Allow flags to be followed directly by their argument, separated by an '=' diff --git a/0011-aarch64-Fix-for-mantis-6507.patch b/0011-aarch64-Fix-for-mantis-6507.patch new file mode 100644 index 0000000..5b87bf0 --- /dev/null +++ b/0011-aarch64-Fix-for-mantis-6507.patch @@ -0,0 +1,81 @@ +From a887f2e04859d288908ddf7c8835108cdcd1be6b Mon Sep 17 00:00:00 2001 +From: Mark Shinwell +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 + diff --git a/ocaml.spec b/ocaml.spec index 1b87dbc..7abb325 100644 --- a/ocaml.spec +++ b/ocaml.spec @@ -20,7 +20,7 @@ Name: ocaml Version: 4.02.0 -Release: 0.8.git%{shortcommit}%{?dist} +Release: 0.9.git%{shortcommit}%{?dist} 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 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 +Patch0011: 0011-aarch64-Fix-for-mantis-6507.patch # Add BFD support so that ocamlobjinfo supports *.cmxs format (RHBZ#1113735). BuildRequires: binutils-devel @@ -420,6 +421,10 @@ fi %changelog +* Fri Aug 08 2014 Richard W.M. Jones - 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 - 4.02.0-0.8 - Rebase on top of 4.02.0 beta commit 10e45753.