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 6561c03..fb76df3 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 ccc1bf226619608230dc94b26377756719cf7b20 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 24 Jun 2014 22:29:38 +0100 -Subject: [PATCH 01/12] Don't ignore ./configure, it's a real git file. +Subject: [PATCH 01/13] 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 6560bd3..105ac56 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 0e3b6450f6ab803442a809b6da41d5d5c5da650f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 7 Jun 2012 15:36:16 +0100 -Subject: [PATCH 02/12] Ensure empty compilerlibs/ directory is created by git. +Subject: [PATCH 02/13] 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 1d36ccc..4ccc42e 100644 --- a/0003-Don-t-add-rpaths-to-libraries.patch +++ b/0003-Don-t-add-rpaths-to-libraries.patch @@ -1,7 +1,7 @@ From 79f0f91e3e4abbfbd3564c11ea72e53310236afc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 24 Jun 2014 10:00:15 +0100 -Subject: [PATCH 03/12] Don't add rpaths to libraries. +Subject: [PATCH 03/13] 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 5e117b7..8f7c70f 100644 --- a/0004-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch +++ b/0004-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch @@ -1,7 +1,7 @@ From 11b377aee2811891635982a5590fef62f12645b6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 29 May 2012 20:40:36 +0100 -Subject: [PATCH 04/12] ocamlbyteinfo, ocamlplugininfo: Useful utilities from +Subject: [PATCH 04/13] 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 c66d1fb..c3c8967 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 5308c47681201ef3beef3e543ab877f81aa08784 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 29 May 2012 20:44:18 +0100 -Subject: [PATCH 05/12] configure: Allow user defined C compiler flags. +Subject: [PATCH 05/13] 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 ddaf2d3..02215fb 100644 --- a/0006-Add-support-for-ppc64.patch +++ b/0006-Add-support-for-ppc64.patch @@ -1,7 +1,7 @@ -From b97622b54339f810bdca378ba7e58e5ad3152330 Mon Sep 17 00:00:00 2001 +From 3628c89d319ac8286b62ec1405561b72bda4ba0d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 29 May 2012 20:47:07 +0100 -Subject: [PATCH 06/12] Add support for ppc64. +Subject: [PATCH 06/13] Add support for ppc64. Note (1): This patch was rejected upstream because they don't have appropriate hardware for testing. @@ -2105,7 +2105,7 @@ 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 c1133ee..3d258dc 100755 +index c1133ee..954b25e 100755 --- a/configure +++ b/configure @@ -808,6 +808,7 @@ case "$target" in @@ -2120,7 +2120,7 @@ index c1133ee..3d258dc 100755 aspp="/usr/ccs/bin/${TOOLPREF}as -P";; power,elf) as="${TOOLPREF}as -u -m ppc" aspp="${TOOLPREF}gcc -c";; -+ power64,*,elf) as='${TOOLPREF}as -u -m ppc64' ++ power64,elf) as='${TOOLPREF}as -u -m ppc64' + aspp='${TOOLPREF}gcc -c';; power,rhapsody) as="${TOOLPREF}as -arch $model" aspp="$bytecc -c";; diff --git a/0007-Add-support-for-ppc64le.patch b/0007-Add-support-for-ppc64le.patch index b319026..c97eb70 100644 --- a/0007-Add-support-for-ppc64le.patch +++ b/0007-Add-support-for-ppc64le.patch @@ -1,7 +1,7 @@ -From 6e3ca14f2d4dba2612eff59126140cde0d04394f Mon Sep 17 00:00:00 2001 +From ab7ac2b3c241dfd2db8f9b6818d324997c982708 Mon Sep 17 00:00:00 2001 From: Michel Normand Date: Tue, 18 Mar 2014 09:15:47 -0400 -Subject: [PATCH 07/12] Add support for ppc64le. +Subject: [PATCH 07/13] Add support for ppc64le. Signed-off-by: Michel Normand --- @@ -1892,7 +1892,7 @@ index b79252d..049652e 100755 echo powerpc-unknown-linux-${LIBC} exit ;; diff --git a/configure b/configure -index 3d258dc..0bf4ebd 100755 +index 954b25e..cc3cbbf 100755 --- a/configure +++ b/configure @@ -809,6 +809,7 @@ case "$target" in @@ -1905,9 +1905,9 @@ index 3d258dc..0bf4ebd 100755 powerpc-*-openbsd*) arch=power; model=ppc; system=bsd_elf;; @@ -891,6 +892,8 @@ case "$arch,$system" in aspp="${TOOLPREF}gcc -c";; - power64,*,elf) as='${TOOLPREF}as -u -m ppc64' + power64,elf) as='${TOOLPREF}as -u -m ppc64' aspp='${TOOLPREF}gcc -c';; -+ power64le,*,elf) as='${TOOLPREF}as -u -m ppc64' ++ power64le,elf) as='${TOOLPREF}as -u -m ppc64' + aspp='${TOOLPREF}gcc -c';; power,rhapsody) as="${TOOLPREF}as -arch $model" aspp="$bytecc -c";; diff --git a/0008-arm-arm64-Mark-stack-as-non-executable.patch b/0008-arm-arm64-Mark-stack-as-non-executable.patch index 8a44cdb..8929e3a 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 a2a1e564bbe995f44de2023893f6dea51668b51e Mon Sep 17 00:00:00 2001 +From 515d0ac7418f3ec999dae4821ffb4888ef8c9825 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 10 May 2014 03:20:35 -0400 -Subject: [PATCH 08/12] arm, arm64: Mark stack as non-executable. +Subject: [PATCH 08/13] 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 3dbebc9..a47353d 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 0641f11626be99c8bde349520ac28a8d93106856 Mon Sep 17 00:00:00 2001 +From c2783885f93b0394376cc99354f67b3647cfcfc2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 1 Apr 2014 11:17:07 +0100 -Subject: [PATCH 09/12] arg: Add no_arg and get_arg helper functions. +Subject: [PATCH 09/13] 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 d9f7fc9..0eef1bc 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 4d1defe6f017b86b0766fd02005a468bedd9aa88 Mon Sep 17 00:00:00 2001 +From 21a743dc1983b3b41ddaa790c621fe0b46969e1f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 1 Apr 2014 11:21:40 +0100 -Subject: [PATCH 10/12] arg: Allow flags such as --flag=arg as well as --flag +Subject: [PATCH 10/13] 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-PR-6517-use-ISO-C99-types-u-int-32-64-_t-in-preferen.patch b/0011-PR-6517-use-ISO-C99-types-u-int-32-64-_t-in-preferen.patch index cf8f07a..733cda7 100644 --- a/0011-PR-6517-use-ISO-C99-types-u-int-32-64-_t-in-preferen.patch +++ b/0011-PR-6517-use-ISO-C99-types-u-int-32-64-_t-in-preferen.patch @@ -1,7 +1,7 @@ -From 6156d208e6cc6e28a964be5dd34585bd54f6eadf Mon Sep 17 00:00:00 2001 +From 8dcd718671ad2bd5384a9d9ffeed7d33b1b34a27 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Wed, 27 Aug 2014 09:58:33 +0000 -Subject: [PATCH 11/12] PR#6517: use ISO C99 types {,u}int{32,64}_t in +Subject: [PATCH 11/13] PR#6517: use ISO C99 types {,u}int{32,64}_t in preference to our homegrown types {,u}int{32,64}. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15131 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 @@ -1697,7 +1697,7 @@ index 6df440b..603b050 100644 #define HAS_STRERROR #define HAS_SOCKETS diff --git a/configure b/configure -index 0bf4ebd..8a9be78 100755 +index cc3cbbf..ff27aa9 100755 --- a/configure +++ b/configure @@ -615,26 +615,6 @@ case "$target" in diff --git a/0012-ppc-ppc64-ppc64le-Mark-stack-as-non-executable.patch b/0012-ppc-ppc64-ppc64le-Mark-stack-as-non-executable.patch index f6220dd..a3a00bf 100644 --- a/0012-ppc-ppc64-ppc64le-Mark-stack-as-non-executable.patch +++ b/0012-ppc-ppc64-ppc64le-Mark-stack-as-non-executable.patch @@ -1,7 +1,7 @@ -From 4e06fda2060d8696649260937f8a551815de24cf Mon Sep 17 00:00:00 2001 +From 719dd72c791d557ab6bc17a1327a36fb04ea9237 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 11 Sep 2014 14:49:54 +0100 -Subject: [PATCH 12/12] ppc, ppc64, ppc64le: Mark stack as non-executable. +Subject: [PATCH 12/13] ppc, ppc64, ppc64le: Mark stack as non-executable. The same fix as this one, which was only fully applied to i686 & x86-64: diff --git a/0013-ppc64-ppc64le-proc-Interim-definitions-for-op_is_pur.patch b/0013-ppc64-ppc64le-proc-Interim-definitions-for-op_is_pur.patch new file mode 100644 index 0000000..5c0ef52 --- /dev/null +++ b/0013-ppc64-ppc64le-proc-Interim-definitions-for-op_is_pur.patch @@ -0,0 +1,84 @@ +From 0d60237e349595e1022c2258fe6fcb4137d9e128 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 24 Oct 2014 10:10:54 +0100 +Subject: [PATCH 13/13] ppc64/ppc64le: proc: Interim definitions for op_is_pure + and regs_are_volatile. + +See: https://bugzilla.redhat.com/show_bug.cgi?id=1156300 + +These are based somewhat on guesswork and need to be checked by +someone more familiar with the compiler and POWER architecture. +--- + asmcomp/power64/proc.ml | 15 +++++++++++++++ + asmcomp/power64le/proc.ml | 15 +++++++++++++++ + 2 files changed, 30 insertions(+) + +diff --git a/asmcomp/power64/proc.ml b/asmcomp/power64/proc.ml +index 372303d..85a8742 100644 +--- a/asmcomp/power64/proc.ml ++++ b/asmcomp/power64/proc.ml +@@ -202,6 +202,10 @@ let loc_external_results res = + + let loc_exn_bucket = phys_reg 0 + ++(* Volatile registers: none *) ++ ++let regs_are_volatile rs = false ++ + (* Registers destroyed by operations *) + + let destroyed_at_c_call = +@@ -226,6 +230,17 @@ let max_register_pressure = function + Iextcall(_, _) -> [| 15; 18 |] + | _ -> [| 23; 30 |] + ++(* Pure operations (without any side effect besides updating their result ++ registers). *) ++ ++let op_is_pure = function ++ | Icall_ind | Icall_imm _ | Itailcall_ind | Itailcall_imm _ ++ | Iextcall _ | Istackoffset _ | Istore _ | Ialloc _ ++ | Iintop(Icheckbound) | Iintop_imm(Icheckbound, _) -> false ++ | Ispecific(Imultaddf | Imultsubf) -> true ++ | Ispecific _ -> false ++ | _ -> true ++ + (* Layout of the stack *) + + let num_stack_slots = [| 0; 0 |] +diff --git a/asmcomp/power64le/proc.ml b/asmcomp/power64le/proc.ml +index 9b98577..ea956b8 100644 +--- a/asmcomp/power64le/proc.ml ++++ b/asmcomp/power64le/proc.ml +@@ -202,6 +202,10 @@ let loc_external_results res = + + let loc_exn_bucket = phys_reg 0 + ++(* Volatile registers: none *) ++ ++let regs_are_volatile rs = false ++ + (* Registers destroyed by operations *) + + let destroyed_at_c_call = +@@ -226,6 +230,17 @@ let max_register_pressure = function + Iextcall(_, _) -> [| 15; 18 |] + | _ -> [| 23; 30 |] + ++(* Pure operations (without any side effect besides updating their result ++ registers). *) ++ ++let op_is_pure = function ++ | Icall_ind | Icall_imm _ | Itailcall_ind | Itailcall_imm _ ++ | Iextcall _ | Istackoffset _ | Istore _ | Ialloc _ ++ | Iintop(Icheckbound) | Iintop_imm(Icheckbound, _) -> false ++ | Ispecific(Imultaddf | Imultsubf) -> true ++ | Ispecific _ -> false ++ | _ -> true ++ + (* Layout of the stack *) + + let num_stack_slots = [| 0; 0 |] +-- +2.0.4 + diff --git a/ocaml.spec b/ocaml.spec index cc4a0da..bf28026 100644 --- a/ocaml.spec +++ b/ocaml.spec @@ -17,7 +17,7 @@ Name: ocaml Version: 4.02.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: OCaml compiler and programming environment @@ -57,6 +57,7 @@ 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-PR-6517-use-ISO-C99-types-u-int-32-64-_t-in-preferen.patch Patch0012: 0012-ppc-ppc64-ppc64le-Mark-stack-as-non-executable.patch +Patch0013: 0013-ppc64-ppc64le-proc-Interim-definitions-for-op_is_pur.patch # Add BFD support so that ocamlobjinfo supports *.cmxs format (RHBZ#1113735). BuildRequires: binutils-devel @@ -419,6 +420,9 @@ fi %changelog +* Fri Oct 24 2014 Richard W.M. Jones - 4.02.0-5 +- Fixes for ppc64/ppc64le (RHBZ#1156300). + * Mon Oct 20 2014 Richard W.M. Jones - 4.02.0-4 - ocaml-emacs should require emacs(bin) (RHBZ#1154513).