From 71bcc7c84cbc977fcf4fc196b652f7a46138c028 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 14 Sep 2013 12:14:22 +0100 Subject: [PATCH] Fix the build on ppc64. --- 0006-Add-support-for-ppc64.patch | 41 +++++++++---------- 0007-yacc-Use-mkstemp-instead-of-mktemp.patch | 2 +- ocaml.spec | 5 ++- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/0006-Add-support-for-ppc64.patch b/0006-Add-support-for-ppc64.patch index c664d25..a979555 100644 --- a/0006-Add-support-for-ppc64.patch +++ b/0006-Add-support-for-ppc64.patch @@ -1,4 +1,4 @@ -From 6a4eb2f692e11312dcec4e73956788ac1e5c2fa6 Mon Sep 17 00:00:00 2001 +From a85437a0d2ffdf7a340d379789500eb583ae4708 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 29 May 2012 20:47:07 +0100 Subject: [PATCH 6/7] Add support for ppc64. @@ -20,17 +20,17 @@ register (RHBZ#826649). Includes updates for OCaml 4.01.0. --- - asmcomp/power64/arch.ml | 87 ++++ - asmcomp/power64/emit.mlp | 989 ++++++++++++++++++++++++++++++++++++++++++ - asmcomp/power64/proc.ml | 241 ++++++++++ + asmcomp/power64/arch.ml | 88 ++++ + asmcomp/power64/emit.mlp | 988 ++++++++++++++++++++++++++++++++++++++++++ + asmcomp/power64/proc.ml | 240 ++++++++++ asmcomp/power64/reload.ml | 18 + asmcomp/power64/scheduling.ml | 65 +++ - asmcomp/power64/selection.ml | 103 +++++ + asmcomp/power64/selection.ml | 101 +++++ asmrun/Makefile | 6 + asmrun/power64-elf.S | 486 +++++++++++++++++++++ asmrun/stack.h | 9 + configure | 3 + - 10 files changed, 2007 insertions(+) + 10 files changed, 2004 insertions(+) create mode 100644 asmcomp/power64/arch.ml create mode 100644 asmcomp/power64/emit.mlp create mode 100644 asmcomp/power64/proc.ml @@ -41,10 +41,10 @@ Includes updates for OCaml 4.01.0. diff --git a/asmcomp/power64/arch.ml b/asmcomp/power64/arch.ml new file mode 100644 -index 0000000..6a14864 +index 0000000..73c516d --- /dev/null +++ b/asmcomp/power64/arch.ml -@@ -0,0 +1,87 @@ +@@ -0,0 +1,88 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) @@ -61,7 +61,6 @@ index 0000000..6a14864 + +(* Specific operations for the PowerPC processor *) + -+open Misc +open Format + +(* Machine-specific command-line options *) @@ -90,6 +89,8 @@ index 0000000..6a14864 +let size_int = size_addr +let size_float = 8 + ++let allow_unaligned_access = false ++ +(* Behavior of division *) + +let division_crashes_on_overflow = false @@ -134,10 +135,10 @@ index 0000000..6a14864 + fprintf ppf "alloc_far %d" n diff --git a/asmcomp/power64/emit.mlp b/asmcomp/power64/emit.mlp new file mode 100644 -index 0000000..42f585d +index 0000000..d84ac5c --- /dev/null +++ b/asmcomp/power64/emit.mlp -@@ -0,0 +1,989 @@ +@@ -0,0 +1,988 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) @@ -156,7 +157,6 @@ index 0000000..42f585d + +module StringSet = Set.Make(struct type t = string let compare = compare end) + -+open Location +open Misc +open Cmm +open Arch @@ -176,7 +176,7 @@ index 0000000..42f585d +(* We have a stack frame of our own if we call other functions (including + use of exceptions, or if we need more than the red zone *) +let has_stack_frame () = -+ if !contains_calls or (num_stack_slots.(0) + num_stack_slots.(1)) > (288-16)/8 then ++ if !contains_calls || (num_stack_slots.(0) + num_stack_slots.(1)) > (288-16)/8 then + true + else + false @@ -960,7 +960,7 @@ index 0000000..42f585d + match i with + {desc = Lend} -> () + | {next = {desc = (Lcondbranch(_, _) | Lcondbranch3(_, _, _))}} -+ when is_simple_instr i & no_interference i.res i.next.arg -> ++ when is_simple_instr i && no_interference i.res i.next.arg -> + emit_instr i.next (Some i); + emit_all i.next.next + | _ -> @@ -1129,10 +1129,10 @@ index 0000000..42f585d + frame_descriptors := [] diff --git a/asmcomp/power64/proc.ml b/asmcomp/power64/proc.ml new file mode 100644 -index 0000000..119ad93 +index 0000000..372303d --- /dev/null +++ b/asmcomp/power64/proc.ml -@@ -0,0 +1,241 @@ +@@ -0,0 +1,240 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) @@ -1372,8 +1372,7 @@ index 0000000..119ad93 + Ccomp.command (Config.asm ^ " -o " ^ + Filename.quote outfile ^ " " ^ Filename.quote infile) + -+open Clflags;; -+open Config;; ++let init () = () diff --git a/asmcomp/power64/reload.ml b/asmcomp/power64/reload.ml new file mode 100644 index 0000000..abcac6c @@ -1471,10 +1470,10 @@ index 0000000..b7bba9b +let fundecl f = (new scheduler)#schedule_fundecl f diff --git a/asmcomp/power64/selection.ml b/asmcomp/power64/selection.ml new file mode 100644 -index 0000000..d2325e1 +index 0000000..53b7828 --- /dev/null +++ b/asmcomp/power64/selection.ml -@@ -0,0 +1,103 @@ +@@ -0,0 +1,101 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) @@ -1491,9 +1490,7 @@ index 0000000..d2325e1 + +(* Instruction selection for the Power PC processor *) + -+open Misc +open Cmm -+open Reg +open Arch +open Mach + diff --git a/0007-yacc-Use-mkstemp-instead-of-mktemp.patch b/0007-yacc-Use-mkstemp-instead-of-mktemp.patch index 06dec68..7085935 100644 --- a/0007-yacc-Use-mkstemp-instead-of-mktemp.patch +++ b/0007-yacc-Use-mkstemp-instead-of-mktemp.patch @@ -1,4 +1,4 @@ -From d7be8e44a95e0c7fad0987869999ecbed8c20769 Mon Sep 17 00:00:00 2001 +From 761242718c3a7513d3b93ca96d24d1f61a4126f0 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 13 Sep 2013 21:29:58 +0100 Subject: [PATCH 7/7] yacc: Use mkstemp instead of mktemp. diff --git a/ocaml.spec b/ocaml.spec index cfc3059..d9ef7a0 100644 --- a/ocaml.spec +++ b/ocaml.spec @@ -1,6 +1,6 @@ Name: ocaml Version: 4.01.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: OCaml compiler and programming environment @@ -521,6 +521,9 @@ fi %changelog +* Sat Sep 14 2013 Richard W.M. Jones - 4.01.0-2 +- Fix the build on ppc64. + * Fri Sep 13 2013 Richard W.M. Jones - 4.01.0-1 - Update to new major version 4.01.0. - Rebase patches.