rpms/ocaml-cmigrep/devel ocaml-3.11.0-ppc64.patch, NONE, 1.1 ocaml-3.11.0-rpath.patch, NONE, 1.1 ocaml-cmigrep-3.11.0-updated-types.patch, NONE, 1.1 ocaml-user-cflags.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 ocaml-cmigrep.spec, 1.5, 1.6 sources, 1.2, 1.3 ocaml-3.10.1-map32bit.patch, 1.1, NONE ocaml-3.10.1-ppc64.patch, 1.1, NONE ocaml-3.11-dev12-no-executable-stack.patch, 1.1, NONE

Richard W.M. Jones rjones at fedoraproject.org
Thu Nov 20 17:26:16 UTC 2008


Author: rjones

Update of /cvs/pkgs/rpms/ocaml-cmigrep/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26703

Modified Files:
	.cvsignore ocaml-cmigrep.spec sources 
Added Files:
	ocaml-3.11.0-ppc64.patch ocaml-3.11.0-rpath.patch 
	ocaml-cmigrep-3.11.0-updated-types.patch 
	ocaml-user-cflags.patch 
Removed Files:
	ocaml-3.10.1-map32bit.patch ocaml-3.10.1-ppc64.patch 
	ocaml-3.11-dev12-no-executable-stack.patch 
Log Message:
* Thu Nov 20 2008 Richard W.M. Jones <rjones at redhat.com> - 1.5-6
- Fix for OCaml 3.11.0+beta1.

* Tue Nov 18 2008 Richard W.M. Jones <rjones at redhat.com> - 1.5-5
- Rebuild against OCaml 3.11.0+beta1.


ocaml-3.11.0-ppc64.patch:

--- NEW FILE ocaml-3.11.0-ppc64.patch ---
diff -uNr ocaml-3.10.1/asmcomp/power64/arch.ml ocaml-3.10.1.ppc64/asmcomp/power64/arch.ml
--- ocaml-3.10.1/asmcomp/power64/arch.ml	1969-12-31 19:00:00.000000000 -0500
+++ ocaml-3.10.1.ppc64/asmcomp/power64/arch.ml	2008-02-29 08:37:45.000000000 -0500
@@ -0,0 +1,84 @@
+(***********************************************************************)
+(*                                                                     *)
+(*                           Objective Caml                            *)
+(*                                                                     *)
+(*            Xavier Leroy, projet Cristal, INRIA Rocquencourt         *)
+(*                                                                     *)
+(*  Copyright 1996 Institut National de Recherche en Informatique et   *)
+(*  en Automatique.  All rights reserved.  This file is distributed    *)
+(*  under the terms of the Q Public License version 1.0.               *)
+(*                                                                     *)
+(***********************************************************************)
+
+(* $Id: arch.ml,v 1.11 2004/06/19 16:13:32 xleroy Exp $ *)
+
+(* Specific operations for the PowerPC processor *)
+
+open Misc
+open Format
+
+(* Machine-specific command-line options *)
+
+let command_line_options = []
+
+(* Specific operations *)
+
+type specific_operation =
+    Imultaddf                           (* multiply and add *)
+  | Imultsubf                           (* multiply and subtract *)
+  | Ialloc_far of int                   (* allocation in large functions *)
+
+(* Addressing modes *)
+
+type addressing_mode =
+    Ibased of string * int              (* symbol + displ *)
+  | Iindexed of int                     (* reg + displ *)
+  | Iindexed2                           (* reg + reg *)
+
+(* Sizes, endianness *)
+
+let big_endian = true
+
+let size_addr = 8
+let size_int = 8
+let size_float = 8
+
+(* Operations on addressing modes *)
+
+let identity_addressing = Iindexed 0
+
+let offset_addressing addr delta =
+  match addr with
+    Ibased(s, n) -> Ibased(s, n + delta)
+  | Iindexed n -> Iindexed(n + delta)
+  | Iindexed2 -> assert false
+
+let num_args_addressing = function
+    Ibased(s, n) -> 0
+  | Iindexed n -> 1
+  | Iindexed2 -> 2
+
+(* Printing operations and addressing modes *)
+
+let print_addressing printreg addr ppf arg =
+  match addr with
+  | Ibased(s, n) ->
+      let idx = if n <> 0 then Printf.sprintf " + %i" n else "" in
+      fprintf ppf "\"%s\"%s" s idx
+  | Iindexed n ->
+      let idx = if n <> 0 then Printf.sprintf " + %i" n else "" in
+      fprintf ppf "%a%s" printreg arg.(0) idx
+  | Iindexed2 ->
+      fprintf ppf "%a + %a" printreg arg.(0) printreg arg.(1)
+
+let print_specific_operation printreg op ppf arg =
+  match op with
+  | Imultaddf ->
+      fprintf ppf "%a *f %a +f %a"
+        printreg arg.(0) printreg arg.(1) printreg arg.(2)
+  | Imultsubf ->
+      fprintf ppf "%a *f %a -f %a"
+        printreg arg.(0) printreg arg.(1) printreg arg.(2)
+  | Ialloc_far n ->
+      fprintf ppf "alloc_far %d" n
+
diff -uNr ocaml-3.10.1/asmcomp/power64/emit.mlp ocaml-3.10.1.ppc64/asmcomp/power64/emit.mlp
--- ocaml-3.10.1/asmcomp/power64/emit.mlp	1969-12-31 19:00:00.000000000 -0500
+++ ocaml-3.10.1.ppc64/asmcomp/power64/emit.mlp	2008-02-29 08:37:45.000000000 -0500
@@ -0,0 +1,989 @@
+(***********************************************************************)
+(*                                                                     *)
+(*                           Objective Caml                            *)
+(*                                                                     *)
+(*            Xavier Leroy, projet Cristal, INRIA Rocquencourt         *)
+(*                                                                     *)
+(*  Copyright 1996 Institut National de Recherche en Informatique et   *)
+(*  en Automatique.  All rights reserved.  This file is distributed    *)
+(*  under the terms of the Q Public License version 1.0.               *)
+(*                                                                     *)
+(***********************************************************************)
+
+(* $Id: emit.mlp,v 1.21 2004/06/19 17:39:34 xleroy Exp $ *)
+
+(* Emission of PowerPC assembly code *)
+
+module StringSet = Set.Make(struct type t = string let compare = compare end)
+
+open Location
+open Misc
+open Cmm
+open Arch
+open Proc
+open Reg
+open Mach
+open Linearize
+open Emitaux
+
+(* Layout of the stack.  The stack is kept 16-aligned. *)
+
+let stack_size_lbl = ref 0
+let stack_slot_lbl = ref 0
+let stack_args_size = ref 0
+let stack_traps_size = ref 0
+
+(* 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
+    true
+  else 
+    false
+
+let frame_size_sans_args () =
+  let size = 8 * num_stack_slots.(0) + 8 * num_stack_slots.(1) + 48 in
+  Misc.align size 16
+
+let slot_offset loc cls =
+  match loc with
+    Local n ->
+      if cls = 0
+      then (!stack_slot_lbl, num_stack_slots.(1) * 8 + n * 8)
+      else (!stack_slot_lbl, n * 8)
+  | Incoming n -> ((if has_stack_frame() then !stack_size_lbl else 0), 48 + n)
+  | Outgoing n -> (0,  n)
+
+(* Output a symbol *)
+
+let emit_symbol =
+  match Config.system with
+  | "elf" | "bsd" -> (fun s -> Emitaux.emit_symbol '.' s)
+  | "rhapsody"    -> (fun s -> emit_char '_'; Emitaux.emit_symbol '$' s)
+  | _ -> assert false
+
+(* Output a label *)
+
+let label_prefix =
+  match Config.system with
+  | "elf" | "bsd" -> ".L"
+  | "rhapsody" -> "L"
+  | _ -> assert false
+
+let emit_label lbl =
+  emit_string label_prefix; emit_int lbl
+
+(* Section switching *)
+
+let toc_space =
+  match Config.system with
+  | "elf" | "bsd" -> "	.section \".toc\",\"aw\"\n"
+  | "rhapsody"    -> "	.toc\n"
+  | _ -> assert false
+
+let data_space =
+  match Config.system with
+  | "elf" | "bsd" -> "	.section \".data\"\n"
+  | "rhapsody"    -> "	.data\n"
+  | _ -> assert false
+
+let code_space =
+  match Config.system with
+  | "elf" | "bsd" -> "	.section \".text\"\n"
+  | "rhapsody"    -> "	.text\n"
+  | _ -> assert false
+
+let rodata_space =
+  match Config.system with
+  | "elf" | "bsd" -> "	.section \".rodata\"\n"
+  | "rhapsody"    -> "	.const\n"
+  | _ -> assert false
+
+(* Output a pseudo-register *)
+
+let emit_reg r =
+  match r.loc with
+    Reg r -> emit_string (register_name r)
+  | _ -> fatal_error "Emit.emit_reg"
[...1684 lines suppressed...]
+	std	2, 24(29)
+        Loadglobal(11, caml_exception_pointer, 11)
+        std     11, 0(29)
+    /* Reload allocation pointers */
+        Loadglobal(31, caml_young_ptr, 11) 
+        Loadglobal(30, caml_young_limit, 11)
+    /* Say we are back into Caml code */
+        li      0, 0
+        Storeglobal(0, caml_last_return_address, 11)
+    /* Call the Caml code */
+	std	2,40(1)
+	ld	2,8(12)
+	ld	12,0(12)
+        mtlr    12
+.L105:
+        blrl
+	ld	2,40(1)
+    /* Pop the trap frame, restoring caml_exception_pointer */
+        ld	9, 0x170(1)
+        Storeglobal(9, caml_exception_pointer, 11)
+    /* Pop the callback link, restoring the global variables */
+.L106:
+        ld     9, 0x150(1)
+        ld     10, 0x158(1)
+        ld     11, 0x160(1)
+        Storeglobal(9, caml_bottom_of_stack, 12) 
+        Storeglobal(10, caml_last_return_address, 12) 
+        Storeglobal(11, caml_gc_regs, 12) 
+    /* Update allocation pointer */
+        Storeglobal(31, caml_young_ptr, 11)
+    /* Restore callee-save registers */
+        addi    11, 1, 48-8
+        ldu    14, 8(11)
+        ldu    15, 8(11)
+        ldu    16, 8(11)
+        ldu    17, 8(11)
+        ldu    18, 8(11)
+        ldu    19, 8(11)
+        ldu    20, 8(11)
+        ldu    21, 8(11)
+        ldu    22, 8(11)
+        ldu    23, 8(11)
+        ldu    24, 8(11)
+        ldu    25, 8(11)
+        ldu    26, 8(11)
+        ldu    27, 8(11)
+        ldu    28, 8(11)
+        ldu    29, 8(11)
+        ldu    30, 8(11)
+        ldu    31, 8(11)
+        lfdu    14, 8(11)
+        lfdu    15, 8(11)
+        lfdu    16, 8(11)
+        lfdu    17, 8(11)
+        lfdu    18, 8(11)
+        lfdu    19, 8(11)
+        lfdu    20, 8(11)
+        lfdu    21, 8(11)
+        lfdu    22, 8(11)
+        lfdu    23, 8(11)
+        lfdu    24, 8(11)
+        lfdu    25, 8(11)
+        lfdu    26, 8(11)
+        lfdu    27, 8(11)
+        lfdu    28, 8(11)
+        lfdu    29, 8(11)
+        lfdu    30, 8(11)
+        lfdu    31, 8(11)
+    /* Return */
+        ld	1,0(1)
+    /* Reload return address */
+        ld     0, 16(1)
+        mtlr    0
+        blr
+
+    /* The trap handler: */
+.L104:
+    /* Update caml_exception_pointer */
+        Storeglobal(29, caml_exception_pointer, 11)
+    /* Encode exception bucket as an exception result and return it */
+        ori     3, 3, 2
+        b       .L106
+	.size .L.caml_start_program,.-.L.caml_start_program
+	
+/* Callback from C to Caml */
+
+        .globl  caml_callback_exn
+        .type   caml_callback_exn, @function
+	.section ".opd","aw"
+	.align 3	
+caml_callback_exn:
+	.quad .L.caml_callback_exn,.TOC. at tocbase
+	.previous
+	.align 2
+.L.caml_callback_exn:
+    /* Initial shuffling of arguments */
+        mr      0, 3            /* Closure */
+        mr      3, 4            /* Argument */
+        mr      4, 0
+        ld     12, 0(4)        /* Code pointer */
+        b       .L102
+	.size .L.caml_callback_exn,.-.L.caml_callback_exn
+
+	
+        .globl  caml_callback2_exn
+        .type   caml_callback2_exn, @function
+	.section ".opd","aw"
+	.align 3	
+caml_callback2_exn:
+	.quad .L.caml_callback2_exn,.TOC. at tocbase
+	.previous
+	.align 2
+.L.caml_callback2_exn:
+        mr      0, 3            /* Closure */
+        mr      3, 4            /* First argument */
+        mr      4, 5            /* Second argument */
+        mr      5, 0
+        Addrglobal(12, caml_apply2)
+        b       .L102
+	.size .L.caml_callback2_exn,.-.L.caml_callback2_exn
+
+	
+        .globl  caml_callback3_exn
+        .type   caml_callback3_exn, @function
+	.section ".opd","aw"
+	.align 3	
+caml_callback3_exn:
+	.quad .L.caml_callback3_exn,.TOC. at tocbase
+	.previous
+	.align 2
+.L.caml_callback3_exn:
+        mr      0, 3            /* Closure */
+        mr      3, 4            /* First argument */
+        mr      4, 5            /* Second argument */
+        mr      5, 6            /* Third argument */
+        mr      6, 0
+        Addrglobal(12, caml_apply3)
+        b       .L102
+	.size .L.caml_callback3_exn,.-.L.caml_callback3_exn
+	
+/* Frame table */
+
+        .section ".data"
+        .globl  caml_system__frametable
+        .type   caml_system__frametable, @object
+caml_system__frametable:
+        .quad   1               /* one descriptor */
+        .quad   .L105 + 4       /* return address into callback */
+        .short  -1              /* negative size count => use callback link */
+        .short  0               /* no roots here */
+        .align  3
+
diff -uNr ocaml-3.10.1/asmrun/stack.h ocaml-3.10.1.ppc64/asmrun/stack.h
--- ocaml-3.10.1/asmrun/stack.h	2007-02-15 13:35:20.000000000 -0500
+++ ocaml-3.10.1.ppc64/asmrun/stack.h	2008-02-29 08:37:45.000000000 -0500
@@ -65,6 +65,15 @@
 #define Callback_link(sp) ((struct caml_context *)((sp) + Trap_frame_size))
 #endif
 
+#ifdef TARGET_power64
+#define Saved_return_address(sp) *((intnat *)((sp) +16))
+#define Already_scanned(sp, retaddr) ((retaddr) & 1)
+#define Mark_scanned(sp, retaddr) (Saved_return_address(sp) = (retaddr) | 1)
+#define Mask_already_scanned(retaddr) ((retaddr) & ~1)
+#define Trap_frame_size 0x150
+#define Callback_link(sp) ((struct caml_context *)((sp) + Trap_frame_size))
+#endif
+
 #ifdef TARGET_m68k
 #define Saved_return_address(sp) *((intnat *)((sp) - 4))
 #define Callback_link(sp) ((struct caml_context *)((sp) + 8))
diff -uNr ocaml-3.11.0+beta1/configure ocaml-3.11.0+beta1.ppc64/configure
--- ocaml-3.11.0+beta1/configure.ppc64	2008-11-18 15:46:57.000000000 +0000
+++ ocaml-3.11.0+beta1/configure	2008-11-18 15:49:19.000000000 +0000
@@ -632,6 +632,7 @@
   hppa2.0*-*-hpux*)             arch=hppa; system=hpux;;
   hppa*-*-linux*)               arch=hppa; system=linux;;
   hppa*-*-gnu*)                 arch=hppa; system=gnu;;
+  powerpc64-*-linux*)           arch=power64; model=ppc64; system=elf;;
   powerpc*-*-linux*)            arch=power; model=ppc; system=elf;;
   powerpc-*-netbsd*)            arch=power; model=ppc; system=elf;;
   powerpc-*-rhapsody*)          arch=power; model=ppc; system=rhapsody;;
@@ -655,7 +656,7 @@
 
 if $arch64; then
   case "$arch,$model" in
-    sparc,default|mips,default|hppa,default|power,ppc)
+    sparc,default|mips,default|hppa,default)
       arch=none; model=default; system=unknown;;
   esac
 fi
@@ -712,6 +713,8 @@
                     aspp='as -n32 -O2';;
   power,*,elf)      as='as -u -m ppc'
                     aspp='gcc -c';;
+  power64,*,elf)    as='as -u -m ppc64'
+		    aspp='gcc -c';;
   power,*,bsd)      as='as'
                     aspp='gcc -c';;
   power,*,rhapsody) as="as -arch $model"

ocaml-3.11.0-rpath.patch:

--- NEW FILE ocaml-3.11.0-rpath.patch ---
--- ocaml-3.11.0+beta1.orig/tools/Makefile.shared	2007-11-22 22:14:43.000000000 +0000
+++ ocaml-3.11.0+beta1/tools/Makefile.shared	2008-11-18 15:42:44.000000000 +0000
@@ -107,9 +107,6 @@
 	sed -e "s|%%BINDIR%%|$(BINDIR)|" \
             -e "s|%%SUPPORTS_SHARED_LIBRARIES%%|$(SUPPORTS_SHARED_LIBRARIES)|" \
             -e "s|%%MKSHAREDLIB%%|$(MKSHAREDLIB)|" \
-            -e "s|%%BYTECCRPATH%%|$(BYTECCRPATH)|" \
-            -e "s|%%NATIVECCRPATH%%|$(NATIVECCRPATH)|" \
-            -e "s|%%MKSHAREDLIBRPATH%%|$(MKSHAREDLIBRPATH)|" \
             -e "s|%%RANLIB%%|$(RANLIB)|" \
           ocamlmklib.mlp >> ocamlmklib.ml
 

ocaml-cmigrep-3.11.0-updated-types.patch:

--- NEW FILE ocaml-cmigrep-3.11.0-updated-types.patch ---
--- cmigrep-1.5.orig/cmigrep.ml	2008-04-02 01:37:07.000000000 +0100
+++ cmigrep-1.5/cmigrep.ml	2008-11-20 17:13:39.000000000 +0000
@@ -304,7 +304,7 @@
     (function
        | Tsig_type (id, type_decl, _rec_status) ->
            begin match type_decl.type_kind with
-           | Type_variant (constructors, _private) ->
+           | Type_variant constructors ->
                List.iter
                  (fun (name, type_exprs) ->
                     if Pcre.pmatch ~rex:exp name then begin
@@ -382,7 +382,7 @@
     (function
        | Tsig_type (id, type_decl, _rec_status) ->
            begin match type_decl.type_kind with
-           | Type_record (labels, _, _) ->
+           | Type_record (labels, _) ->
                List.iter
                  (fun (name, mutable_flag, type_expr) ->
                     if Pcre.pmatch ~rex:exp name then begin

ocaml-user-cflags.patch:

--- NEW FILE ocaml-user-cflags.patch ---
--- ocaml-3.10.0/configure.opt	2007-06-02 16:50:12.000000000 +0200
+++ ocaml-3.10.0/configure	2007-06-02 16:50:34.000000000 +0200
@@ -1425,6 +1425,10 @@
     nativecccompopts="$nativecccompopts -fomit-frame-pointer";;
 esac
 
+# Allow user defined C Compiler flags
+bytecccompopts="$bytecccompopts $CFLAGS"
+nativecccompopts="$nativecccompopts $CFLAGS"
+
 # Finish generated files
 
 cclibs="$cclibs $mathlib"


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/ocaml-cmigrep/devel/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .cvsignore	25 Aug 2008 21:08:05 -0000	1.2
+++ .cvsignore	20 Nov 2008 17:25:46 -0000	1.3
@@ -1,2 +1,2 @@
 cmigrep-1.5.tar.bz2
-ocaml-3.10.2.tar.bz2
+ocaml-3.11.0+beta1.tar.bz2


Index: ocaml-cmigrep.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ocaml-cmigrep/devel/ocaml-cmigrep.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ocaml-cmigrep.spec	26 Aug 2008 10:07:53 -0000	1.5
+++ ocaml-cmigrep.spec	20 Nov 2008 17:25:46 -0000	1.6
@@ -1,14 +1,14 @@
 %define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
 %define debug_package %{nil}
 
-%define ocaml_major 3.10
-%define ocaml_minor 2
+%define ocaml_major 3.11
+%define ocaml_minor 0+beta1
 
 %define _default_patch_fuzz 2
 
 Name:           ocaml-cmigrep
 Version:        1.5
-Release:        4%{?dist}
+Release:        6%{?dist}
 Summary:        Search OCaml compiled interface (cmi) files
 
 Group:          Development/Libraries
@@ -19,9 +19,12 @@
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Patch0:         cmigrep-make-without-godi-debian.patch
-Patch1:         ocaml-3.10.1-ppc64.patch
-Patch2:         ocaml-3.10.1-map32bit.patch
-Patch3:         ocaml-3.11-dev12-no-executable-stack.patch
+Patch1:         ocaml-3.11.0-rpath.patch
+Patch2:         ocaml-user-cflags.patch
+Patch3:         ocaml-3.11.0-ppc64.patch
+
+# Sent upstream on 2008-11-20.
+Patch10:        ocaml-cmigrep-3.11.0-updated-types.patch
 
 BuildRequires:  ocaml = %{ocaml_major}.%{ocaml_minor}
 BuildRequires:  ocaml-findlib-devel
@@ -51,10 +54,12 @@
 pushd ocaml-%{ocaml_major}.%{ocaml_minor}
 %patch1 -p1
 %patch2 -p1
-%patch3 -p0
+%patch3 -p1
 popd
 mv ocaml-%{ocaml_major}.%{ocaml_minor} compiler
 
+%patch10 -p1
+
 
 %build
 # Build the compiler libs.
@@ -97,6 +102,12 @@
 
 
 %changelog
+* Thu Nov 20 2008 Richard W.M. Jones <rjones at redhat.com> - 1.5-6
+- Fix for OCaml 3.11.0+beta1.
+
+* Tue Nov 18 2008 Richard W.M. Jones <rjones at redhat.com> - 1.5-5
+- Rebuild against OCaml 3.11.0+beta1.
+
 * Tue Aug 26 2008 Richard W.M. Jones <rjones at redhat.com> - 1.5-4
 - Restore ordinary patch fuzz.
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/ocaml-cmigrep/devel/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources	25 Aug 2008 21:08:05 -0000	1.2
+++ sources	20 Nov 2008 17:25:46 -0000	1.3
@@ -1,2 +1,2 @@
 869ba6758a773c4218461f14f6ebcb4e  cmigrep-1.5.tar.bz2
-d86f8f8aa4574fa60dd6f89044580307  ocaml-3.10.2.tar.bz2
+77cc67933e451354b6d1ef0ace4f5dc5  ocaml-3.11.0+beta1.tar.bz2


--- ocaml-3.10.1-map32bit.patch DELETED ---


--- ocaml-3.10.1-ppc64.patch DELETED ---


--- ocaml-3.11-dev12-no-executable-stack.patch DELETED ---




More information about the fedora-extras-commits mailing list