rpms/ocaml-cmigrep/F-9 ocaml-3.10.1-map32bit.patch, NONE, 1.1 ocaml-3.10.1-ppc64.patch, NONE, 1.1 ocaml-3.11-dev12-no-executable-stack.patch, NONE, 1.1 ocaml-cmigrep.spec, 1.2, 1.3

Richard W.M. Jones rjones at fedoraproject.org
Tue Aug 26 10:05:30 UTC 2008


Author: rjones

Update of /cvs/pkgs/rpms/ocaml-cmigrep/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29134

Modified Files:
	ocaml-cmigrep.spec 
Added Files:
	ocaml-3.10.1-map32bit.patch ocaml-3.10.1-ppc64.patch 
	ocaml-3.11-dev12-no-executable-stack.patch 
Log Message:
* Tue Aug 26 2008 Richard W.M. Jones <rjones at redhat.com> - 1.5-2.fc9.1
- Rebuild.

* Mon Jun  9 2008 Richard W.M. Jones <rjones at redhat.com> - 1.5-2
- Include ppc64 compiler patch.
- Include MAP_32BITS compiler patch.
- Include no-executable-stack compiler patch.
- Rebuild for OCaml 3.10.2-4
  (https://bugzilla.redhat.com/show_bug.cgi?id=444428#c5)


ocaml-3.10.1-map32bit.patch:

--- NEW FILE ocaml-3.10.1-map32bit.patch ---
diff -ur ocaml-3.10.1.orig/byterun/unix.c ocaml-3.10.1/byterun/unix.c
--- ocaml-3.10.1.orig/byterun/unix.c	2007-11-20 15:47:41.000000000 +0000
+++ ocaml-3.10.1/byterun/unix.c	2008-05-08 11:54:11.000000000 +0100
@@ -346,6 +346,10 @@
 
 #include <sys/mman.h>
 
+#ifndef MAP_32BIT /* Fedora bug 445545 */
+#define MAP_32BIT 0
+#endif
+
 char *caml_aligned_mmap (asize_t size, int modulo, void **block)
 {
   char *raw_mem;
@@ -354,7 +358,7 @@
 
   Assert (modulo < Page_size);
   raw_mem = (char *) mmap(last_addr, size + Page_size, PROT_READ | PROT_WRITE,
-                          MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+                          MAP_32BIT | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
   if (raw_mem == MAP_FAILED) return NULL;
   last_addr = raw_mem + size + 2 * Page_size;
   *block = raw_mem;

ocaml-3.10.1-ppc64.patch:

--- NEW FILE ocaml-3.10.1-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"
[...1683 lines suppressed...]
+	std	1, 16(29)
+	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.10.1/configure ocaml-3.10.1.ppc64/configure
--- ocaml-3.10.1/configure	2008-01-04 08:26:38.000000000 -0500
+++ ocaml-3.10.1.ppc64/configure	2008-02-29 09:07:05.000000000 -0500
@@ -590,6 +590,7 @@
   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;;
   powerpc-*-darwin*)            arch=power; system=rhapsody
@@ -612,7 +613,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
@@ -670,6 +671,7 @@
   i386,*,*)         aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
   hppa,*,*)         aspp="$cc"; asppflags='-traditional -c -DSYS_$(SYSTEM)';;
   power,*,elf)      aspp='gcc'; asppflags='-c';;
+  power64,*,elf)      aspp='gcc'; asppflags='-c';;
   power,*,bsd)      aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
   power,*,rhapsody) aspp="$bytecc"; asppflags='-c';;
   arm,*,linux)      aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;

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

--- NEW FILE ocaml-3.11-dev12-no-executable-stack.patch ---
Index: asmcomp/alpha/emit.mlp
===================================================================
RCS file: /caml/ocaml/asmcomp/alpha/emit.mlp,v
retrieving revision 1.42
diff -u -r1.42 emit.mlp
--- asmcomp/alpha/emit.mlp	16 Apr 2006 23:28:14 -0000	1.42
+++ asmcomp/alpha/emit.mlp	9 Jun 2008 17:34:32 -0000
@@ -858,4 +858,6 @@
   `{emit_symbol lbl_frame}:\n`;
   `	.quad	{emit_int (List.length !frame_descriptors)}\n`;
   List.iter emit_frame !frame_descriptors;
-  frame_descriptors := []
+  frame_descriptors := [];
+  (* Mark stack as non-executable for GNU tools. *)
+  `	.section .note.GNU-stack,\"\",%progbits; .previous\n`
Index: asmcomp/amd64/emit.mlp
===================================================================
RCS file: /caml/ocaml/asmcomp/amd64/emit.mlp,v
retrieving revision 1.15
diff -u -r1.15 emit.mlp
--- asmcomp/amd64/emit.mlp	11 Jan 2008 16:13:11 -0000	1.15
+++ asmcomp/amd64/emit.mlp	9 Jun 2008 17:34:32 -0000
@@ -752,4 +752,6 @@
       efa_label_rel = (fun lbl ofs ->
                            `	.long	({emit_label lbl} - .) + {emit_int32 ofs}\n`);
       efa_def_label = (fun l -> `{emit_label l}:\n`);
-      efa_string = (fun s -> emit_string_directive "	.asciz	" s) }
+      efa_string = (fun s -> emit_string_directive "	.asciz	" s) };
+  (* Mark stack as non-executable for GNU tools. *)
+  `	.section .note.GNU-stack,\"\",%progbits; .previous\n`
Index: asmcomp/arm/emit.mlp
===================================================================
RCS file: /caml/ocaml/asmcomp/arm/emit.mlp,v
retrieving revision 1.19
diff -u -r1.19 emit.mlp
--- asmcomp/arm/emit.mlp	11 Jan 2008 16:13:11 -0000	1.19
+++ asmcomp/arm/emit.mlp	9 Jun 2008 17:34:33 -0000
@@ -673,4 +673,6 @@
   `{emit_symbol lbl}:\n`;
   `	.word	{emit_int (List.length !frame_descriptors)}\n`;
   List.iter emit_frame !frame_descriptors;
-  frame_descriptors := []
+  frame_descriptors := [];
+  (* Mark stack as non-executable for GNU tools. *)
+  `	.section .note.GNU-stack,\"\",%progbits; .previous\n`
Index: asmcomp/hppa/emit.mlp
===================================================================
RCS file: /caml/ocaml/asmcomp/hppa/emit.mlp,v
retrieving revision 1.20
diff -u -r1.20 emit.mlp
--- asmcomp/hppa/emit.mlp	16 Apr 2006 23:28:14 -0000	1.20
+++ asmcomp/hppa/emit.mlp	9 Jun 2008 17:34:34 -0000
@@ -1037,4 +1037,6 @@
   `	.long	{emit_int (List.length !frame_descriptors)}\n`;
   List.iter emit_frame !frame_descriptors;
   frame_descriptors := [];
-  emit_imports()
+  emit_imports();
+  (* Mark stack as non-executable for GNU tools. *)
+  `	.section .note.GNU-stack,\"\",%progbits; .previous\n`
Index: asmcomp/i386/emit.mlp
===================================================================
RCS file: /caml/ocaml/asmcomp/i386/emit.mlp,v
retrieving revision 1.40
diff -u -r1.40 emit.mlp
--- asmcomp/i386/emit.mlp	11 Jan 2008 16:13:11 -0000	1.40
+++ asmcomp/i386/emit.mlp	9 Jun 2008 17:34:34 -0000
@@ -986,4 +986,6 @@
         if use_ascii_dir
         then emit_string_directive "	.ascii	" s
         else emit_bytes_directive  "	.byte	" s) };
-  if macosx then emit_external_symbols ()
+  if macosx then emit_external_symbols ();
+  (* Mark stack as non-executable for GNU tools. *)
+  `	.section .note.GNU-stack,\"\",%progbits; .previous\n`
Index: asmcomp/ia64/emit.mlp
===================================================================
RCS file: /caml/ocaml/asmcomp/ia64/emit.mlp,v
retrieving revision 1.17
diff -u -r1.17 emit.mlp
--- asmcomp/ia64/emit.mlp	13 Jul 2004 12:18:53 -0000	1.17
+++ asmcomp/ia64/emit.mlp	9 Jun 2008 17:34:36 -0000
@@ -1324,4 +1324,6 @@
   emit_define_symbol (Compilenv.make_symbol (Some "frametable"));
   `	data8	{emit_int (List.length !frame_descriptors)}\n`;
   List.iter emit_frame !frame_descriptors;
-  frame_descriptors := []
+  frame_descriptors := [];
+  (* Mark stack as non-executable for GNU tools. *)
+  `	.section .note.GNU-stack,\"\",%progbits; .previous\n`
Index: asmcomp/mips/emit.mlp
===================================================================
RCS file: /caml/ocaml/asmcomp/mips/emit.mlp,v
retrieving revision 1.18
diff -u -r1.18 emit.mlp
--- asmcomp/mips/emit.mlp	5 Jan 2004 20:25:56 -0000	1.18
+++ asmcomp/mips/emit.mlp	9 Jun 2008 17:34:36 -0000
@@ -591,4 +591,6 @@
   `{emit_symbol lbl}:\n`;
   `	.word	{emit_int (List.length !frame_descriptors)}\n`;
   List.iter emit_frame !frame_descriptors;
-  frame_descriptors := []
+  frame_descriptors := [];
+  (* Mark stack as non-executable for GNU tools. *)
+  `	.section .note.GNU-stack,\"\",%progbits; .previous\n`
Index: asmcomp/power/emit.mlp
===================================================================
RCS file: /caml/ocaml/asmcomp/power/emit.mlp,v
retrieving revision 1.26
diff -u -r1.26 emit.mlp
--- asmcomp/power/emit.mlp	9 Nov 2007 15:06:57 -0000	1.26
+++ asmcomp/power/emit.mlp	9 Jun 2008 17:34:37 -0000
@@ -961,4 +961,6 @@
                            `	.long	({emit_label lbl} - .) + {emit_int32 ofs}\n`);
       efa_def_label = (fun l -> `{emit_label l}:\n`);
       efa_string = (fun s -> emit_bytes_directive "	.byte	" (s ^ "\000"))
-     }
+     };
+  (* Mark stack as non-executable for GNU tools. *)
+  `	.section .note.GNU-stack,\"\",%progbits; .previous\n`
Index: asmcomp/sparc/emit.mlp
===================================================================
RCS file: /caml/ocaml/asmcomp/sparc/emit.mlp,v
retrieving revision 1.24
diff -u -r1.24 emit.mlp
--- asmcomp/sparc/emit.mlp	16 Apr 2006 23:28:15 -0000	1.24
+++ asmcomp/sparc/emit.mlp	9 Jun 2008 17:34:37 -0000
@@ -772,4 +772,6 @@
   `	.word	{emit_int (List.length !frame_descriptors)}\n`;
   List.iter emit_frame !frame_descriptors;
   emit_size lbl;
-  frame_descriptors := []
+  frame_descriptors := [];
+  (* Mark stack as non-executable for GNU tools. *)
+  `	.section .note.GNU-stack,\"\",%progbits; .previous\n`
Index: asmrun/alpha.S
===================================================================
RCS file: /caml/ocaml/asmrun/alpha.S,v
retrieving revision 1.29
diff -u -r1.29 alpha.S
--- asmrun/alpha.S	3 Jan 2004 12:51:18 -0000	1.29
+++ asmrun/alpha.S	9 Jun 2008 17:34:38 -0000
@@ -438,3 +438,7 @@
         .word   -1              /* negative frame size => use callback link */
         .word   0               /* no roots here */
         .align  3
+
+#if defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif
Index: asmrun/amd64.S
===================================================================
RCS file: /caml/ocaml/asmrun/amd64.S,v
retrieving revision 1.11
diff -u -r1.11 amd64.S
--- asmrun/amd64.S	29 Jan 2007 12:10:52 -0000	1.11
+++ asmrun/amd64.S	9 Jun 2008 17:34:38 -0000
@@ -366,3 +366,7 @@
         .align  16
 caml_absf_mask:
 	.quad	0x7FFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF
+
+#if defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif
Index: asmrun/arm.S
===================================================================
RCS file: /caml/ocaml/asmrun/arm.S,v
retrieving revision 1.16
diff -u -r1.16 arm.S
--- asmrun/arm.S	29 Feb 2008 14:21:21 -0000	1.16
+++ asmrun/arm.S	9 Jun 2008 17:34:38 -0000
@@ -342,3 +342,7 @@
         .short  -1              /* negative frame size => use callback link */
         .short  0               /* no roots */
         .align  2
+
+#if defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif
Index: asmrun/hppa.S
===================================================================
RCS file: /caml/ocaml/asmrun/hppa.S,v
retrieving revision 1.26
diff -u -r1.26 hppa.S
--- asmrun/hppa.S	16 Apr 2006 23:28:15 -0000	1.26
+++ asmrun/hppa.S	9 Jun 2008 17:34:38 -0000
@@ -532,3 +532,7 @@
         .long   L104 + 3        /* return address into callback */
         .short  -1              /* negative frame size => use callback link */
         .short  0               /* no roots */
+
+#if defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif
Index: asmrun/i386.S
===================================================================
RCS file: /caml/ocaml/asmrun/i386.S,v
retrieving revision 1.49
diff -u -r1.49 i386.S
--- asmrun/i386.S	11 Jan 2008 16:13:11 -0000	1.49
+++ asmrun/i386.S	9 Jun 2008 17:34:39 -0000
@@ -424,3 +424,7 @@
         hlt ; hlt ; hlt ; hlt ; hlt
         .subsections_via_symbols
 #endif
+
+#if defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif
Index: asmrun/ia64.S
===================================================================
RCS file: /caml/ocaml/asmrun/ia64.S,v
retrieving revision 1.13
diff -u -r1.13 ia64.S
--- asmrun/ia64.S	3 Jan 2004 12:51:19 -0000	1.13
+++ asmrun/ia64.S	9 Jun 2008 17:34:39 -0000
@@ -528,3 +528,7 @@
 
         .common caml_saved_bsp#, 8, 8
         .common caml_saved_rnat#, 8, 8
+
+#if defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif
Index: asmrun/m68k.S
===================================================================
RCS file: /caml/ocaml/asmrun/m68k.S,v
retrieving revision 1.15
diff -u -r1.15 m68k.S
--- asmrun/m68k.S	3 Jan 2004 12:51:19 -0000	1.15
+++ asmrun/m68k.S	9 Jun 2008 17:34:39 -0000
@@ -242,3 +242,7 @@
         .long   L107            | return address into callback
         .word   -1              | negative frame size => use callback link
         .word   0               | no roots here
+
+#if defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif
Index: asmrun/power-aix.S
===================================================================
RCS file: /caml/ocaml/asmrun/power-aix.S,v
retrieving revision 1.15
diff -u -r1.15 power-aix.S
--- asmrun/power-aix.S	3 Jan 2004 12:51:19 -0000	1.15
+++ asmrun/power-aix.S	9 Jun 2008 17:34:40 -0000
@@ -511,3 +511,7 @@
         .csect  caml_callback3_exn[DS]
 caml_callback3_exn:
         .long   .caml_callback3_exn, TOC[tc0], 0
+
+#if defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif
Index: asmrun/power-elf.S
===================================================================
RCS file: /caml/ocaml/asmrun/power-elf.S,v
retrieving revision 1.18
diff -u -r1.18 power-elf.S
--- asmrun/power-elf.S	3 Jan 2004 12:51:19 -0000	1.18
+++ asmrun/power-elf.S	9 Jun 2008 17:34:40 -0000
@@ -419,3 +419,6 @@
         .short  -1              /* negative size count => use callback link */
         .short  0               /* no roots here */
 
+#if defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif
Index: asmrun/power-rhapsody.S
===================================================================
RCS file: /caml/ocaml/asmrun/power-rhapsody.S,v
retrieving revision 1.15
diff -u -r1.15 power-rhapsody.S
--- asmrun/power-rhapsody.S	29 Jan 2007 12:10:52 -0000	1.15
+++ asmrun/power-rhapsody.S	9 Jun 2008 17:34:40 -0000
@@ -472,3 +472,7 @@
         .short  -1              /* negative size count => use callback link */
         .short  0               /* no roots here */
 	.align	X(2,3)
+
+#if defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif
Index: asmrun/sparc.S
===================================================================
RCS file: /caml/ocaml/asmrun/sparc.S,v
retrieving revision 1.26
diff -u -r1.26 sparc.S
--- asmrun/sparc.S	6 Oct 2004 06:33:25 -0000	1.26
+++ asmrun/sparc.S	9 Jun 2008 17:34:41 -0000
@@ -405,3 +405,7 @@
         .type Caml_raise_exception, #function
 	.type Caml_system__frametable, #object
 #endif
+
+#if defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif


Index: ocaml-cmigrep.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ocaml-cmigrep/F-9/ocaml-cmigrep.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ocaml-cmigrep.spec	26 Aug 2008 07:51:15 -0000	1.2
+++ ocaml-cmigrep.spec	26 Aug 2008 10:05:00 -0000	1.3
@@ -6,17 +6,20 @@
 
 Name:           ocaml-cmigrep
 Version:        1.5
-Release:        1%{?dist}.2
+Release:        2%{?dist}.1
 Summary:        Search OCaml compiled interface (cmi) files
 
 Group:          Development/Libraries
 License:        GPLv2+
 URL:            http://homepage.mac.com/letaris/
-Source0:        http://homepage.mac.com/letaris/cmigrep-1.5.tar.bz2
+Source0:        http://homepage.mac.com/letaris/cmigrep-%{version}.tar.bz2
 Source1:        http://caml.inria.fr/distrib/ocaml-%{ocaml_major}/ocaml-%{ocaml_major}.%{ocaml_minor}.tar.bz2
 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
 
 BuildRequires:  ocaml = %{ocaml_major}.%{ocaml_minor}
 BuildRequires:  ocaml-findlib-devel
@@ -43,6 +46,11 @@
 # however in Debian the only packages which actually use
 # compiler-libs are camlp5 & cmigrep.
 bzcat %{SOURCE1} | tar xf -
+pushd ocaml-%{ocaml_major}.%{ocaml_minor}
+%patch1 -p1
+%patch2 -p1
+%patch3 -p0
+popd
 mv ocaml-%{ocaml_major}.%{ocaml_minor} compiler
 
 
@@ -87,8 +95,15 @@
 
 
 %changelog
-* Tue Aug 26 2008 Richard W.M. Jones <rjones at redhat.com> - 1.5-1.2
-- OCaml 3.10.1 for F-9.
+* Tue Aug 26 2008 Richard W.M. Jones <rjones at redhat.com> - 1.5-2.fc9.1
+- Rebuild.
+
+* Mon Jun  9 2008 Richard W.M. Jones <rjones at redhat.com> - 1.5-2
+- Include ppc64 compiler patch.
+- Include MAP_32BITS compiler patch.
+- Include no-executable-stack compiler patch.
+- Rebuild for OCaml 3.10.2-4
+  (https://bugzilla.redhat.com/show_bug.cgi?id=444428#c5)
 
 * Mon Apr 28 2008 Richard W.M. Jones <rjones at redhat.com> - 1.5-1
 - Initial RPM release.




More information about the fedora-extras-commits mailing list