summaryrefslogtreecommitdiff
path: root/lang/ocaml/patches
diff options
context:
space:
mode:
authorjtb <jtb@pkgsrc.org>2003-06-29 23:04:18 +0000
committerjtb <jtb@pkgsrc.org>2003-06-29 23:04:18 +0000
commitc436359bb462061709b40bf7d6b7bed393f08a83 (patch)
tree75bfebb7e5fc05261cb15ebe4948e9ca75873d1b /lang/ocaml/patches
parent1c88b3ccbefd2236743b9db346e38729fbc0215d (diff)
downloadpkgsrc-c436359bb462061709b40bf7d6b7bed393f08a83.tar.gz
* Use ".L" instead of "L" as label prefix on sparc
* For consistency use SYS_bsd for system type on powerpc. We differ from SYS_elf (presumably Linux) on a few points here anyway. * Fix signal handling on powerpc which caused a seg fault when compiling native code version of coq. * Install ocamllex.opt, camlp4o.opt and camlp4r.opt too.
Diffstat (limited to 'lang/ocaml/patches')
-rw-r--r--lang/ocaml/patches/patch-ac67
-rw-r--r--lang/ocaml/patches/patch-ad15
-rw-r--r--lang/ocaml/patches/patch-ae11
-rw-r--r--lang/ocaml/patches/patch-ag12
-rw-r--r--lang/ocaml/patches/patch-ah83
-rw-r--r--lang/ocaml/patches/patch-ai22
6 files changed, 170 insertions, 40 deletions
diff --git a/lang/ocaml/patches/patch-ac b/lang/ocaml/patches/patch-ac
index c80e1ee3e85..e2cca11e51e 100644
--- a/lang/ocaml/patches/patch-ac
+++ b/lang/ocaml/patches/patch-ac
@@ -1,47 +1,42 @@
-$NetBSD: patch-ac,v 1.1 2003/06/23 20:15:18 jtb Exp $
+$NetBSD: patch-ac,v 1.2 2003/06/29 23:04:19 jtb Exp $
--- asmrun/signals.c.orig
+++ asmrun/signals.c
-@@ -52,10 +52,15 @@
- ((ctx)->__sc_jmpbuf.__jmp_context.__gpr[(regno)])
+@@ -162,6 +162,8 @@
+ void handle_signal(int sig, struct sigcontext * context)
+ #elif defined(TARGET_power) && defined(SYS_rhapsody)
+ void handle_signal(int sig, int code, struct sigcontext * context)
++#elif defined(TARGET_power) && defined(SYS_bsd)
++void handle_signal(int sig, int code, struct sigcontext * context)
#else
- #define STRUCT_SIGCONTEXT struct sigcontext
-+#ifdef __NetBSD__
-+#define CONTEXT_GPR(ctx, regno) \
-+ ((ctx)->sc_frame.fixreg[(regno)])
-+#else
- #define CONTEXT_GPR(ctx, regno) \
- ((ctx)->sc_jmpbuf.jmp_context.gpr[(regno)])
+ void handle_signal(int sig)
#endif
- #endif
-+#endif
-
- volatile int async_signal_mode = 0;
- volatile int pending_signal = 0;
-@@ -199,8 +204,12 @@
- #endif
- #if defined(TARGET_power) && defined(SYS_elf)
+@@ -205,6 +207,10 @@
/* Cached in register 30 */
-+#ifdef __NetBSD__
-+ context->sc_frame.fixreg[30] = (unsigned long) young_limit;
-+#else
- context->regs->gpr[30] = (unsigned long) young_limit;
+ CONTEXT_GPR(context, 30) = (unsigned long) young_limit;
#endif
++#if defined(TARGET_power) && defined(SYS_bsd)
++ /* Cached in register 30 */
++ context->sc_frame.fixreg[30] = (unsigned long) young_limit;
+#endif
- #if defined(TARGET_power) && defined(SYS_rhapsody)
- /* Cached in register 30 */
- CONTEXT_GPR(context, 30) = (unsigned long) young_limit;
-@@ -422,8 +431,13 @@
- static void trap_handler(int sig, struct sigcontext * context)
- {
- /* Recover young_ptr and caml_exception_pointer from registers 31 and 29 */
-+#ifdef __NetBSD__
+ }
+ }
+ }
+@@ -443,6 +449,17 @@
+ }
+ #endif
+
++#if defined(TARGET_power) && defined(SYS_bsd)
++static void trap_handler(int sig, int code, struct sigcontext * context)
++{
++ /* Recover young_ptr and caml_exception_pointer from registers 31 and 29 */
+ caml_exception_pointer = (char *) context->sc_frame.fixreg[29];
+ young_ptr = (char *) context->sc_frame.fixreg[31];
-+#else
- caml_exception_pointer = (char *) context->regs->gpr[29];
- young_ptr = (char *) context->regs->gpr[31];
++ array_bound_error();
++}
+#endif
- array_bound_error();
- }
- #endif
++
++
+ /* Machine- and OS-dependent handling of stack overflow */
+
+ #ifdef HAS_STACK_OVERFLOW_DETECTION
diff --git a/lang/ocaml/patches/patch-ad b/lang/ocaml/patches/patch-ad
index 470203630b8..ebb6e813248 100644
--- a/lang/ocaml/patches/patch-ad
+++ b/lang/ocaml/patches/patch-ad
@@ -1,4 +1,4 @@
-$NetBSD: patch-ad,v 1.1 2003/06/23 20:15:18 jtb Exp $
+$NetBSD: patch-ad,v 1.2 2003/06/29 23:04:19 jtb Exp $
--- configure.orig
+++ configure
@@ -6,14 +6,23 @@ $NetBSD: patch-ad,v 1.1 2003/06/23 20:15:18 jtb Exp $
rs6000-*-aix*) arch=power; model=rs6000; system=aix;;
powerpc-*-aix*) arch=power; model=ppc; system=aix;;
powerpc-*-linux*) arch=power; model=ppc; system=elf;;
-+ powerpc-*-netbsd*) arch=power; model=ppc; system=elf;;
++ powerpc-*-netbsd*) arch=power; model=ppc; system=bsd;;
powerpc-*-rhapsody*) arch=power; model=ppc; system=rhapsody;;
powerpc-*-darwin*) arch=power; model=ppc; system=rhapsody;;
arm*-*-linux*) arch=arm; system=linux;;
-@@ -601,6 +602,8 @@
+@@ -591,6 +592,7 @@
+ power,rs6000,aix) asflags='-u -m pwr -w'; asppflags="$asflags";;
+ power,ppc,aix) asflags='-u -m ppc -w'; asppflags="$asflags";;
+ power,*,elf) aspp='gcc'; asppflags='-c';;
++ power,*,bsd) aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
+ power,*,rhapsody) ;;
+ arm,*,linux) aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
+ ia64,*,linux) asflags=-xexplicit
+@@ -601,6 +603,9 @@
alpha,*,digital) profiling='prof';;
i386,*,linux_elf) profiling='prof';;
i386,*,bsd_elf) profiling='prof';;
++ power,*,bsd) profiling='prof';;
+ power,*,elf) profiling='prof';;
+ sparc,*,bsd) profiling='prof';;
*) profiling='noprof';;
diff --git a/lang/ocaml/patches/patch-ae b/lang/ocaml/patches/patch-ae
index 1487e320434..1eae927ef72 100644
--- a/lang/ocaml/patches/patch-ae
+++ b/lang/ocaml/patches/patch-ae
@@ -1,4 +1,4 @@
-$NetBSD: patch-ae,v 1.1 2003/06/23 20:15:18 jtb Exp $
+$NetBSD: patch-ae,v 1.2 2003/06/29 23:04:19 jtb Exp $
--- asmcomp/sparc/emit.mlp.orig
+++ asmcomp/sparc/emit.mlp
@@ -16,3 +16,12 @@ $NetBSD: patch-ae,v 1.1 2003/06/23 20:15:18 jtb Exp $
let emit_symbol s =
if String.length s >= 1 & s.[0] = '.'
+@@ -79,7 +78,7 @@
+ (* Output a label *)
+
+ let label_prefix =
+- if Config.system = "solaris" || Config.system = "linux" then ".L" else "L"
++ if Config.system = "sunos" then "L" else ".L"
+
+ let emit_label lbl =
+ emit_string label_prefix; emit_int lbl
diff --git a/lang/ocaml/patches/patch-ag b/lang/ocaml/patches/patch-ag
new file mode 100644
index 00000000000..82467122865
--- /dev/null
+++ b/lang/ocaml/patches/patch-ag
@@ -0,0 +1,12 @@
+$NetBSD: patch-ag,v 1.1 2003/06/29 23:04:19 jtb Exp $
+
+--- asmcomp/power/arch.ml.orig
++++ asmcomp/power/arch.ml
+@@ -91,6 +91,5 @@
+ let toc =
+ match Config.system with
+ | "aix" -> true
+- | "elf" -> false
+- | "rhapsody" -> false
++ | "elf" | "rhapsody" | "bsd" -> false
+ | _ -> Misc.fatal_error "wrong $(SYSTEM)"
diff --git a/lang/ocaml/patches/patch-ah b/lang/ocaml/patches/patch-ah
new file mode 100644
index 00000000000..bd94f03d8cf
--- /dev/null
+++ b/lang/ocaml/patches/patch-ah
@@ -0,0 +1,83 @@
+$NetBSD: patch-ah,v 1.1 2003/06/29 23:04:19 jtb Exp $
+
+--- asmcomp/power/emit.mlp.orig
++++ asmcomp/power/emit.mlp
+@@ -65,7 +65,7 @@
+
+ let emit_symbol =
+ match Config.system with
+- "aix" | "elf" -> (fun s -> Emitaux.emit_symbol '.' s)
++ "aix" | "elf" | "bsd" -> (fun s -> Emitaux.emit_symbol '.' s)
+ | "rhapsody" -> (fun s -> emit_char '_'; Emitaux.emit_symbol '$' s)
+ | _ -> assert false
+
+@@ -78,7 +78,7 @@
+ let label_prefix =
+ match Config.system with
+ "aix" -> "L.."
+- | "elf" -> ".L"
++ | "elf" | "bsd" -> ".L"
+ | "rhapsody" -> "L"
+ | _ -> assert false
+
+@@ -90,21 +90,21 @@
+ let data_space =
+ match Config.system with
+ "aix" -> " .csect .data[RW]\n"
+- | "elf" -> " .section \".data\"\n"
++ | "elf" | "bsd" -> " .section \".data\"\n"
+ | "rhapsody" -> " .data\n"
+ | _ -> assert false
+
+ let code_space =
+ match Config.system with
+ "aix" -> " .csect .text[PR]\n"
+- | "elf" -> " .section \".text\"\n"
++ | "elf" | "bsd" -> " .section \".text\"\n"
+ | "rhapsody" -> " .text\n"
+ | _ -> assert false
+
+ let rodata_space =
+ match Config.system with
+ "aix" -> " .csect .data[RW]\n" (* ?? *)
+- | "elf" -> " .section \".rodata\"\n"
++ | "elf" | "bsd" -> " .section \".rodata\"\n"
+ | "rhapsody" -> " .const\n"
+ | _ -> assert false
+
+@@ -157,7 +157,7 @@
+
+ let emit_upper emit_fun arg =
+ match Config.system with
+- "elf" ->
++ "elf" | "bsd" ->
+ emit_fun arg; emit_string "@ha"
+ | "rhapsody" ->
+ emit_string "ha16("; emit_fun arg; emit_string ")"
+@@ -165,7 +165,7 @@
+
+ let emit_lower emit_fun arg =
+ match Config.system with
+- "elf" ->
++ "elf" | "bsd" ->
+ emit_fun arg; emit_string "@l"
+ | "rhapsody" ->
+ emit_string "lo16("; emit_fun arg; emit_string ")"
+@@ -951,7 +951,7 @@
+ ` .csect {emit_symbol fundecl.fun_name}[DS]\n`;
+ `{emit_symbol fundecl.fun_name}:\n`;
+ ` .long .{emit_symbol fundecl.fun_name}, TOC[tc0], 0\n`
+- | "elf" ->
++ | "elf" | "bsd" ->
+ ` .type {emit_symbol fundecl.fun_name}, @function\n`
+ | _ -> ()
+ end;
+@@ -996,7 +996,7 @@
+
+ let declare_global_data s =
+ ` .globl {emit_symbol s}\n`;
+- if Config.system = "elf" then
++ if Config.system = "elf" || Config.system = "bsd" then
+ ` .type {emit_symbol s}, @object\n`
+
+ let emit_item = function
diff --git a/lang/ocaml/patches/patch-ai b/lang/ocaml/patches/patch-ai
new file mode 100644
index 00000000000..bfc6c21d185
--- /dev/null
+++ b/lang/ocaml/patches/patch-ai
@@ -0,0 +1,22 @@
+$NetBSD: patch-ai,v 1.1 2003/06/29 23:04:19 jtb Exp $
+
+--- asmcomp/power/proc.ml.orig
++++ asmcomp/power/proc.ml
+@@ -190,7 +190,7 @@
+ let loc_external_arguments =
+ match Config.system with
+ "aix" | "rhapsody" -> poweropen_external_conventions 0 7 100 112
+- | "elf" -> calling_conventions 0 7 100 107 outgoing 8
++ | "elf" | "bsd" -> calling_conventions 0 7 100 107 outgoing 8
+ | _ -> assert false
+
+ let extcall_use_push = false
+@@ -244,7 +244,7 @@
+ Ccomp.command ("as -u -m " ^ proc ^ " -o " ^ outfile ^ " " ^ infile)
+ | "elf" ->
+ Ccomp.command ("as -u -m ppc -o " ^ outfile ^ " " ^ infile)
+- | "rhapsody" ->
++ | "rhapsody" | "bsd" ->
+ Ccomp.command ("as -o " ^ outfile ^ " " ^ infile)
+ | _ -> assert false
+