summaryrefslogtreecommitdiff
path: root/lang/ocaml
diff options
context:
space:
mode:
authorjtb <jtb@pkgsrc.org>2003-06-23 20:15:16 +0000
committerjtb <jtb@pkgsrc.org>2003-06-23 20:15:16 +0000
commit1623b75909f21d5588e8c6ed9d3fde381ad81707 (patch)
tree288a060947d4fff3515779681ac361fd4f0eb680 /lang/ocaml
parent66f59974a0fc8fc1fe86785c59624c270ed4879e (diff)
downloadpkgsrc-1623b75909f21d5588e8c6ed9d3fde381ad81707.tar.gz
Enable native code compilers on powerpc and sparc.
Bump PKGREVISION.
Diffstat (limited to 'lang/ocaml')
-rw-r--r--lang/ocaml/Makefile9
-rw-r--r--lang/ocaml/PLIST2
-rw-r--r--lang/ocaml/distinfo6
-rw-r--r--lang/ocaml/patches/patch-ac47
-rw-r--r--lang/ocaml/patches/patch-ad21
-rw-r--r--lang/ocaml/patches/patch-ae18
-rw-r--r--lang/ocaml/patches/patch-af16
7 files changed, 113 insertions, 6 deletions
diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile
index 52a44df24e3..a6ed5514bd0 100644
--- a/lang/ocaml/Makefile
+++ b/lang/ocaml/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.16 2003/05/22 23:58:21 hubertf Exp $
+# $NetBSD: Makefile,v 1.17 2003/06/23 20:15:16 jtb Exp $
#
DISTNAME= ocaml-3.06
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= lang
MASTER_SITES= ftp://ftp.inria.fr/INRIA/cristal/ocaml/${DISTNAME}/
@@ -25,7 +25,8 @@ FIX_RPATH+= OCAML_LDFLAGS
ALL_TARGET= world
post-build:
- if ${TEST} ${MACHINE_ARCH} = 'i386'; then \
+ if ${TEST} ${MACHINE_ARCH} = 'i386' -o ${MACHINE_ARCH} = 'powerpc' \
+ -o ${MACHINE_ARCH} = 'sparc' ; then \
cd ${WRKSRC}; \
${GMAKE} opt; \
${GMAKE} ocamlc.opt; \
@@ -34,7 +35,7 @@ post-build:
.include "../../mk/bsd.prefs.mk"
-.if (${MACHINE_ARCH} == "i386")
+.if (${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "powerpc") || (${MACHINE_ARCH} == "sparc")
PLIST_SRC= ${PKGDIR}/PLIST.opt ${PKGDIR}/PLIST
.endif
diff --git a/lang/ocaml/PLIST b/lang/ocaml/PLIST
index 21bf8c56397..f24385abbde 100644
--- a/lang/ocaml/PLIST
+++ b/lang/ocaml/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.5 2003/05/22 23:58:21 hubertf Exp $
+@comment $NetBSD: PLIST,v 1.6 2003/06/23 20:15:16 jtb Exp $
bin/camlp4
bin/camlp4o
bin/camlp4r
diff --git a/lang/ocaml/distinfo b/lang/ocaml/distinfo
index 7e0a0468eb1..03694e1cf1a 100644
--- a/lang/ocaml/distinfo
+++ b/lang/ocaml/distinfo
@@ -1,6 +1,10 @@
-$NetBSD: distinfo,v 1.7 2003/04/19 00:16:58 jschauma Exp $
+$NetBSD: distinfo,v 1.8 2003/06/23 20:15:17 jtb Exp $
SHA1 (ocaml-3.06.tar.gz) = cf1b053bf751ad566e445ca13c620ffef3a1b863
Size (ocaml-3.06.tar.gz) = 2436887 bytes
SHA1 (patch-aa) = 9e3eedb855d3a3830f58979caee0af48b5b8e670
SHA1 (patch-ab) = 8ebe2173abe3202205e16d31f29c8ded3df485cd
+SHA1 (patch-ac) = fd125a505955f9ee546828622ef030f702539731
+SHA1 (patch-ad) = a933e3d92ccc6f81f93f32fdb0a2b4086dba59fd
+SHA1 (patch-ae) = 71b924d29e6608eced45cf893864249b1b8aa1b3
+SHA1 (patch-af) = eeb03f9ceac69ab36542f2725392789b7cecd48c
diff --git a/lang/ocaml/patches/patch-ac b/lang/ocaml/patches/patch-ac
new file mode 100644
index 00000000000..c80e1ee3e85
--- /dev/null
+++ b/lang/ocaml/patches/patch-ac
@@ -0,0 +1,47 @@
+$NetBSD: patch-ac,v 1.1 2003/06/23 20:15:18 jtb Exp $
+
+--- asmrun/signals.c.orig
++++ asmrun/signals.c
+@@ -52,10 +52,15 @@
+ ((ctx)->__sc_jmpbuf.__jmp_context.__gpr[(regno)])
+ #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)])
+ #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)
+ /* Cached in register 30 */
++#ifdef __NetBSD__
++ context->sc_frame.fixreg[30] = (unsigned long) young_limit;
++#else
+ context->regs->gpr[30] = (unsigned long) young_limit;
+ #endif
++#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__
++ 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];
++#endif
+ array_bound_error();
+ }
+ #endif
diff --git a/lang/ocaml/patches/patch-ad b/lang/ocaml/patches/patch-ad
new file mode 100644
index 00000000000..470203630b8
--- /dev/null
+++ b/lang/ocaml/patches/patch-ad
@@ -0,0 +1,21 @@
+$NetBSD: patch-ad,v 1.1 2003/06/23 20:15:18 jtb Exp $
+
+--- configure.orig
++++ configure
+@@ -528,6 +528,7 @@
+ 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-*-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 @@
+ alpha,*,digital) profiling='prof';;
+ i386,*,linux_elf) profiling='prof';;
+ i386,*,bsd_elf) profiling='prof';;
++ power,*,elf) profiling='prof';;
++ sparc,*,bsd) profiling='prof';;
+ *) profiling='noprof';;
+ esac
+
diff --git a/lang/ocaml/patches/patch-ae b/lang/ocaml/patches/patch-ae
new file mode 100644
index 00000000000..1487e320434
--- /dev/null
+++ b/lang/ocaml/patches/patch-ae
@@ -0,0 +1,18 @@
+$NetBSD: patch-ae,v 1.1 2003/06/23 20:15:18 jtb Exp $
+
+--- asmcomp/sparc/emit.mlp.orig
++++ asmcomp/sparc/emit.mlp
+@@ -57,11 +57,10 @@
+ | {loc = Reg r; typ = Float} -> phys_reg (r + 16)
+ | _ -> fatal_error "Emit.next_in_pair"
+
+-(* Symbols are prefixed with _ under SunOS and BSD but not under Solaris
+- nor Linux *)
++(* Symbols are prefixed with _ under SunOS *)
+
+ let symbol_prefix =
+- if Config.system = "solaris" || Config.system = "linux" then "" else "_"
++ if Config.system = "sunos" then "_" else ""
+
+ let emit_symbol s =
+ if String.length s >= 1 & s.[0] = '.'
diff --git a/lang/ocaml/patches/patch-af b/lang/ocaml/patches/patch-af
new file mode 100644
index 00000000000..ab4d2e25354
--- /dev/null
+++ b/lang/ocaml/patches/patch-af
@@ -0,0 +1,16 @@
+$NetBSD: patch-af,v 1.1 2003/06/23 20:15:18 jtb Exp $
+
+--- asmrun/sparc.S.orig
++++ asmrun/sparc.S
+@@ -16,9 +16,9 @@
+ /* Asm part of the runtime system for the Sparc processor. */
+ /* Must be preprocessed by cpp */
+
+-/* SunOS 4 and BSD prefix identifiers with _, Solaris and Linux do not */
++/* SunOS 4 prefixes identifiers with _ */
+
+-#if defined(SYS_sunos) || defined(SYS_bsd)
++#if defined(SYS_sunos)
+
+ .common _caml_required_size, 4, "bss"
+