From f67fde615d28eb4e686909c4bf65a02416cd182a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 6 Jun 2012 18:58:06 +0100 Subject: [PATCH] Includes fix for minor heap corruption because of unaligned minor heap register (RHBZ#826649). Unset MAKEFLAGS before running build. --- 0006-Add-support-for-ppc64.patch | 9 ++++++--- ...M-backend-written-by-Benedikt-Meurer-PR-5433.patch | 2 +- ...threads.so-with-lpthread-so-that-pthread_atf.patch | 2 +- ocaml.spec | 11 +++++++++-- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/0006-Add-support-for-ppc64.patch b/0006-Add-support-for-ppc64.patch index 674d6cb..eb3c1db 100644 --- a/0006-Add-support-for-ppc64.patch +++ b/0006-Add-support-for-ppc64.patch @@ -1,4 +1,4 @@ -From 8337a6ef4844c27b83ad89fed63a9ee94381457d Mon Sep 17 00:00:00 2001 +From b25707437651811a22acaab5a9461eb4ab742f6e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 29 May 2012 20:47:07 +0100 Subject: [PATCH 6/8] Add support for ppc64. @@ -14,6 +14,9 @@ David Woodhouse. Includes fix for position of stack arguments to external C functions when there are more than 8 parameters (RHBZ#829187). + +Includes fix for minor heap corruption because of unaligned minor heap +register (RHBZ#826649). --- asmcomp/power64/arch.ml | 83 ++++ asmcomp/power64/emit.mlp | 989 +++++++++++++++++++++++++++++++++++++++++ @@ -125,7 +128,7 @@ index 0000000..55dd593 + fprintf ppf "alloc_far %d" n diff --git a/asmcomp/power64/emit.mlp b/asmcomp/power64/emit.mlp new file mode 100644 -index 0000000..ba54e99 +index 0000000..42f585d --- /dev/null +++ b/asmcomp/power64/emit.mlp @@ -0,0 +1,989 @@ @@ -738,7 +741,7 @@ index 0000000..ba54e99 + ` bge {emit_label lbl}\n`; + record_frame i.live; + ` bl {emit_label !call_gc_label}\n`; (* Must be 4 insns to restart *) -+ `{emit_label lbl}: addi {emit_reg i.res.(0)}, {emit_gpr 31}, 4\n` ++ `{emit_label lbl}: addi {emit_reg i.res.(0)}, {emit_gpr 31}, {emit_int size_addr}\n` + | Lop(Iintop Isub) -> (* subfc has swapped arguments *) + ` subfc {emit_reg i.res.(0)}, {emit_reg i.arg.(1)}, {emit_reg i.arg.(0)}\n` + | Lop(Iintop Imod) -> diff --git a/0007-New-ARM-backend-written-by-Benedikt-Meurer-PR-5433.patch b/0007-New-ARM-backend-written-by-Benedikt-Meurer-PR-5433.patch index ab7f51c..ac31bd6 100644 --- a/0007-New-ARM-backend-written-by-Benedikt-Meurer-PR-5433.patch +++ b/0007-New-ARM-backend-written-by-Benedikt-Meurer-PR-5433.patch @@ -1,4 +1,4 @@ -From d713da1390d4a74f78ca7e37834fa0a47932f948 Mon Sep 17 00:00:00 2001 +From 658145e4aa9a3eb7263012b39c7483241af5b1b3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 29 May 2012 20:50:42 +0100 Subject: [PATCH 7/8] New ARM backend, written by Benedikt Meurer (PR#5433). diff --git a/0008-Link-dllthreads.so-with-lpthread-so-that-pthread_atf.patch b/0008-Link-dllthreads.so-with-lpthread-so-that-pthread_atf.patch index bed6dbe..7514fe0 100644 --- a/0008-Link-dllthreads.so-with-lpthread-so-that-pthread_atf.patch +++ b/0008-Link-dllthreads.so-with-lpthread-so-that-pthread_atf.patch @@ -1,4 +1,4 @@ -From c103b9b4e7c0d50f29d8eec2c9e946d1d52970f5 Mon Sep 17 00:00:00 2001 +From 66eef2038cf9af06e5883be320e3bf7aec35d572 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 5 Jun 2012 22:49:17 +0100 Subject: [PATCH 8/8] Link dllthreads.so with -lpthread so that pthread_atfork diff --git a/ocaml.spec b/ocaml.spec index 67e3c2d..6beffbd 100644 --- a/ocaml.spec +++ b/ocaml.spec @@ -1,6 +1,6 @@ Name: ocaml Version: 3.12.1 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Objective Caml compiler and programming environment @@ -239,6 +239,9 @@ git am %{patches} 1) breaks the build. Therefore we cannot use +# %{?_smp_mflags} nor MAKEFLAGS. +unset MAKEFLAGS CFLAGS="$RPM_OPT_FLAGS" \ ./configure \ -bindir %{_bindir} \ @@ -250,7 +253,6 @@ make world %if %{native_compiler} make opt opt.opt %endif -# %{?_smp_mflags} breaks the build make -C emacs ocamltags # Currently these tools are supplied by Debian, but are expected @@ -496,6 +498,11 @@ fi %changelog +* Wed Jun 6 2012 Richard W.M. Jones 3.12.1-12 +- ppc64: Include fix for minor heap corruption because of unaligned + minor heap register (RHBZ#826649). +- Unset MAKEFLAGS before running build. + * Wed Jun 6 2012 Richard W.M. Jones 3.12.1-11 - ppc64: Fix position of stack arguments to external C functions when there are more than 8 parameters.