diff options
author | jtb <jtb@pkgsrc.org> | 2003-07-01 23:10:32 +0000 |
---|---|---|
committer | jtb <jtb@pkgsrc.org> | 2003-07-01 23:10:32 +0000 |
commit | e1a5bec25508c9c84dbca9db293715dfdede3f10 (patch) | |
tree | 23c8d0739f15918507f6ad39ef00dc9a778b29d2 /lang/smlnj | |
parent | 0faa6c6dca3b29808235fb3ed8ede0c2ade4c4ea (diff) | |
download | pkgsrc-e1a5bec25508c9c84dbca9db293715dfdede3f10.tar.gz |
Make this work on powerpc.
Diffstat (limited to 'lang/smlnj')
-rw-r--r-- | lang/smlnj/Makefile | 3 | ||||
-rw-r--r-- | lang/smlnj/Makefile.common | 11 | ||||
-rw-r--r-- | lang/smlnj/PLIST | 32 | ||||
-rw-r--r-- | lang/smlnj/distinfo | 16 | ||||
-rw-r--r-- | lang/smlnj/files/targets | 15 | ||||
-rw-r--r-- | lang/smlnj/patches/patch-ab | 29 | ||||
-rw-r--r-- | lang/smlnj/patches/patch-ac | 16 | ||||
-rw-r--r-- | lang/smlnj/patches/patch-ad | 13 | ||||
-rw-r--r-- | lang/smlnj/patches/patch-af | 30 | ||||
-rw-r--r-- | lang/smlnj/patches/patch-ao | 13 | ||||
-rw-r--r-- | lang/smlnj/patches/patch-ap | 13 | ||||
-rw-r--r-- | lang/smlnj/patches/patch-aq | 13 |
12 files changed, 168 insertions, 36 deletions
diff --git a/lang/smlnj/Makefile b/lang/smlnj/Makefile index 2a24e202e09..331fde44c1b 100644 --- a/lang/smlnj/Makefile +++ b/lang/smlnj/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2003/03/29 12:41:32 jmmv Exp $ +# $NetBSD: Makefile,v 1.4 2003/07/01 23:10:32 jtb Exp $ # DISTNAME= boot.${BOX}-unix @@ -68,6 +68,7 @@ post-extract: # resolve definition of SML_BASE, CFLAGS in patched files do-configure: + ${CPP} ${FILESDIR}/targets > ${WRKSRC}/config/targets.customized cd ${WRKDIR}/config; \ for f in ${SML_SCRIPTS}; do \ ${CP} "$${f}" "$${f}.tmp"; \ diff --git a/lang/smlnj/Makefile.common b/lang/smlnj/Makefile.common index 206703db08e..a03ea1a982b 100644 --- a/lang/smlnj/Makefile.common +++ b/lang/smlnj/Makefile.common @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.common,v 1.1 2003/03/21 22:55:01 wiz Exp $ +# $NetBSD: Makefile.common,v 1.2 2003/07/01 23:10:32 jtb Exp $ # smlnj also supports hppa, sparc, ppc, mlrisc & alpha # pkg support for those platforms, and say, solaris-x86 # is left as an (easy) exercise for the reader. -ONLY_FOR_PLATFORM= NetBSD-*-i386 SunOS-*-sparc NetBSD-*-sparc +ONLY_FOR_PLATFORM= NetBSD-*-i386 SunOS-*-sparc NetBSD-*-sparc NetBSD-*-powerpc .include "../../mk/bsd.prefs.mk" @@ -16,10 +16,15 @@ OS= ${LOWER_OPSYS} OS= bsd .endif +NLFFI= # not available on all platforms + .if ${MACHINE_ARCH} == "i386" BOX= x86 +.elif ${MACHINE_ARCH} == "powerpc" +BOX= ppc +NLFFI= "@comment " .elif ${MACHINE_ARCH} == "sparc" BOX= ${MACHINE_ARCH} .endif -PLIST_SUBST+= BOX=${BOX} OS=${OS} +PLIST_SUBST+= BOX=${BOX} OS=${OS} NLFFI=${NLFFI} diff --git a/lang/smlnj/PLIST b/lang/smlnj/PLIST index c4a868cce78..55dd429e683 100644 --- a/lang/smlnj/PLIST +++ b/lang/smlnj/PLIST @@ -1,16 +1,16 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2003/03/21 22:20:56 wiz Exp $ +@comment $NetBSD: PLIST,v 1.2 2003/07/01 23:10:33 jtb Exp $ bin/ml-build bin/ml-burg bin/ml-lex bin/ml-makedepend -bin/ml-nlffigen +${NLFFI}bin/ml-nlffigen bin/ml-yacc bin/nowhere bin/sml lib/smlnj/bin/.arch-n-opsys lib/smlnj/bin/.heap/ml-burg.${BOX}-${OS} lib/smlnj/bin/.heap/ml-lex.${BOX}-${OS} -lib/smlnj/bin/.heap/ml-nlffigen.${BOX}-${OS} +${NLFFI}lib/smlnj/bin/.heap/ml-nlffigen.${BOX}-${OS} lib/smlnj/bin/.heap/ml-yacc.${BOX}-${OS} lib/smlnj/bin/.heap/nowhere.${BOX}-${OS} lib/smlnj/bin/.heap/sml.${BOX}-${OS} @@ -21,7 +21,7 @@ lib/smlnj/bin/ml-build lib/smlnj/bin/ml-burg lib/smlnj/bin/ml-lex lib/smlnj/bin/ml-makedepend -lib/smlnj/bin/ml-nlffigen +${NLFFI}lib/smlnj/bin/ml-nlffigen lib/smlnj/bin/ml-yacc lib/smlnj/bin/nowhere lib/smlnj/bin/sml @@ -38,9 +38,9 @@ lib/smlnj/lib/SMLNJ-MLRISC/CM/${BOX}-unix/SPARC.cm lib/smlnj/lib/SMLNJ-MLRISC/CM/${BOX}-unix/Visual.cm lib/smlnj/lib/basis.cm/CM/${BOX}-unix/basis.cm lib/smlnj/lib/burg-ext.cm/CM/${BOX}-unix/burg-ext.cm -lib/smlnj/lib/c/CM/${BOX}-unix/c.cm -lib/smlnj/lib/c/internals/CM/${BOX}-unix/c-int.cm -lib/smlnj/lib/c/memory/CM/${BOX}-unix/memory.cm +${NLFFI}lib/smlnj/lib/c/CM/${BOX}-unix/c.cm +${NLFFI}lib/smlnj/lib/c/internals/CM/${BOX}-unix/c-int.cm +${NLFFI}lib/smlnj/lib/c/memory/CM/${BOX}-unix/memory.cm lib/smlnj/lib/ckit-lib.cm/CM/${BOX}-unix/ckit-lib.cm lib/smlnj/lib/cml-lib/CM/${BOX}-unix/smlnj-lib.cm lib/smlnj/lib/cml-lib/CM/${BOX}-unix/trace-cml.cm @@ -239,15 +239,15 @@ lib/smlnj/lib/unix-lib.cm/CM/${BOX}-unix/unix-lib.cm @dirrm lib/smlnj/lib/ckit-lib.cm/CM/${BOX}-unix @dirrm lib/smlnj/lib/ckit-lib.cm/CM @dirrm lib/smlnj/lib/ckit-lib.cm -@dirrm lib/smlnj/lib/c/memory/CM/${BOX}-unix -@dirrm lib/smlnj/lib/c/memory/CM -@dirrm lib/smlnj/lib/c/memory -@dirrm lib/smlnj/lib/c/internals/CM/${BOX}-unix -@dirrm lib/smlnj/lib/c/internals/CM -@dirrm lib/smlnj/lib/c/internals -@dirrm lib/smlnj/lib/c/CM/${BOX}-unix -@dirrm lib/smlnj/lib/c/CM -@dirrm lib/smlnj/lib/c +${NLFFI}@dirrm lib/smlnj/lib/c/memory/CM/${BOX}-unix +${NLFFI}@dirrm lib/smlnj/lib/c/memory/CM +${NLFFI}@dirrm lib/smlnj/lib/c/memory +${NLFFI}@dirrm lib/smlnj/lib/c/internals/CM/${BOX}-unix +${NLFFI}@dirrm lib/smlnj/lib/c/internals/CM +${NLFFI}@dirrm lib/smlnj/lib/c/internals +${NLFFI}@dirrm lib/smlnj/lib/c/CM/${BOX}-unix +${NLFFI}@dirrm lib/smlnj/lib/c/CM +${NLFFI}@dirrm lib/smlnj/lib/c @dirrm lib/smlnj/lib/burg-ext.cm/CM/${BOX}-unix @dirrm lib/smlnj/lib/burg-ext.cm/CM @dirrm lib/smlnj/lib/burg-ext.cm diff --git a/lang/smlnj/distinfo b/lang/smlnj/distinfo index 798caa48c36..602892a2050 100644 --- a/lang/smlnj/distinfo +++ b/lang/smlnj/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.2 2003/03/21 22:54:38 wiz Exp $ +$NetBSD: distinfo,v 1.3 2003/07/01 23:10:33 jtb Exp $ SHA1 (smlnj-110.42/MLRISC.tgz) = 55055ed06f7dd2ef178ef365c018f0f38f740528 Size (smlnj-110.42/MLRISC.tgz) = 1173187 bytes -SHA1 (smlnj-110.42/boot.x86-unix.tgz) = 7e85b25459886179be0bcb949cd489f62c0a5424 -Size (smlnj-110.42/boot.x86-unix.tgz) = 5147025 bytes +SHA1 (smlnj-110.42/boot.ppc-unix.tgz) = 50c12d123cbb953283cc01308bda94ba6a004f10 +Size (smlnj-110.42/boot.ppc-unix.tgz) = 5063945 bytes SHA1 (smlnj-110.42/ckit.tgz) = f47599df014c9c6dcd02c0bfcc0fad5d1409451b Size (smlnj-110.42/ckit.tgz) = 168000 bytes SHA1 (smlnj-110.42/cm.tgz) = c102131e974e91426bab1cc30005f8e02f7622b6 @@ -33,10 +33,11 @@ Size (smlnj-110.42/smlnj-lib.tgz) = 251230 bytes SHA1 (smlnj-110.42/system.tgz) = 0b9f61052a6413ac1d391a6b7ddf903875d192ff Size (smlnj-110.42/system.tgz) = 177548 bytes SHA1 (patch-aa) = 370fc94462f60fcf1b28ddad2266311b19d92eca -SHA1 (patch-ac) = b010b0fd5b923ed954023a72dc763e20f8f1b213 -SHA1 (patch-ad) = c05aa7e345ca4827efb1b8de99dee9fb17e1770e +SHA1 (patch-ab) = 3d5946b2d72dee255159afe6fb25240f8fa7e306 +SHA1 (patch-ac) = 7b3ea837db260542d1477ccbe0dba24c6afbc1e2 +SHA1 (patch-ad) = a406bde2f6f7e2d93d652135b94aefd4b7aca494 SHA1 (patch-ae) = 5796401418fd91a795fdfe75060cf654dd315ac1 -SHA1 (patch-af) = 7bb089fbfc11e62f0a78d6cf48b6f0d855a462d8 +SHA1 (patch-af) = 86d999a475b859507f9ff963f066345d6279b672 SHA1 (patch-ag) = dae9c89ccc7ada96bd3ac4b2bae1da6427902fb4 SHA1 (patch-ah) = 4d1f861cf18424db18fbcd19fd2e123b9a0a5247 SHA1 (patch-ai) = dfb45b2c7d59bcd9230edb30d5dfffd4dab5782e @@ -45,3 +46,6 @@ SHA1 (patch-ak) = 55738c10e5adc6b99d909a784f256b24e250990e SHA1 (patch-al) = f2492a36e670dcf2332b01b5769d51dc33a9f609 SHA1 (patch-am) = 06d8cb145217c46ada440e0d3e7420ea99651064 SHA1 (patch-an) = d6e1a75d5fb68423ce3181622de919c2337db2e7 +SHA1 (patch-ao) = 1c66024c5949269291cbf6f815baf6162db47d31 +SHA1 (patch-ap) = 8e9e28548b4e58de68a11982a355a010ea96aa29 +SHA1 (patch-aq) = 7d0734b76d778d7f584d2e70d325fd72e6554b01 diff --git a/lang/smlnj/files/targets b/lang/smlnj/files/targets new file mode 100644 index 00000000000..2837dc51d82 --- /dev/null +++ b/lang/smlnj/files/targets @@ -0,0 +1,15 @@ +request ml-yacc +request ml-lex +request ml-burg +request smlnj-lib +request pgraph-util +request cml +request cml-lib +request eXene +request ckit +#if !defined(__powerpc__) +request ml-nlffi-lib +request ml-nlffigen +#endif +request mlrisc-tools +request nowhere diff --git a/lang/smlnj/patches/patch-ab b/lang/smlnj/patches/patch-ab new file mode 100644 index 00000000000..d099ec8b4b8 --- /dev/null +++ b/lang/smlnj/patches/patch-ab @@ -0,0 +1,29 @@ +$NetBSD: patch-ab,v 1.1 2003/07/01 23:10:34 jtb Exp $ + +--- /dev/null ++++ src/runtime/objs/mk.ppc-netbsd +@@ -0,0 +1,24 @@ ++# mk.ppc-netbsd ++# ++ ++SHELL = /bin/sh ++ ++MAKE = gmake ++GCC = gcc ++ARFLAGS = Trcv ++CFLAGS = @CFLAGS@ ++LDFLAGS= ++CPP = $(GCC) -x c -E -P ++ ++#XOBJS = xmonitor.o ++#LD_LIBS = -lX11 ++#BASE_DEFS = -DHEAP_MONITOR -DPOLL_DEBUG ++XOBJS = ++XLIBS = ++DEFS = $(BASE_DEFS) -DHOST_PPC -DTARGET_PPC -DOPSYS_UNIX -DOPSYS_NETBSD ++TARGET = PPC ++VERSION = v-ppc-netbsd ++RUNTIME = run.ppc-netbsd ++ ++all: ++ ($(MAKE) RUNTIME="$(RUNTIME)" MAKE="$(MAKE)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" AS="$(AS)" AR="$(AR)" RANLIB="$(RANLIB)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME)) diff --git a/lang/smlnj/patches/patch-ac b/lang/smlnj/patches/patch-ac index b47a06f6c49..2a1c70875fb 100644 --- a/lang/smlnj/patches/patch-ac +++ b/lang/smlnj/patches/patch-ac @@ -1,13 +1,19 @@ -$NetBSD: patch-ac,v 1.1.1.1 2003/03/21 22:20:56 wiz Exp $ +$NetBSD: patch-ac,v 1.2 2003/07/01 23:10:34 jtb Exp $ ---- config/_arch-n-opsys.orig Fri Oct 20 18:02:25 2000 -+++ config/_arch-n-opsys Fri Mar 9 14:07:05 2001 -@@ -107,6 +107,7 @@ +--- config/_arch-n-opsys.orig ++++ config/_arch-n-opsys +@@ -106,11 +106,13 @@ + NetBSD) + OPSYS=netbsd + HEAP_OPSYS=bsd +- case `uname -m` in ++ case `uname -p` in + i386) ARCH=x86;; i486) ARCH=x86;; i586) ARCH=x86;; i686) ARCH=x86;; ++ powerpc) ARCH=ppc;; + sparc) ARCH=sparc;; *) exit 1;; esac ;; - diff --git a/lang/smlnj/patches/patch-ad b/lang/smlnj/patches/patch-ad index 9c8962cdd9b..a1a4134b5b3 100644 --- a/lang/smlnj/patches/patch-ad +++ b/lang/smlnj/patches/patch-ad @@ -1,6 +1,6 @@ -$NetBSD: patch-ad,v 1.1.1.1 2003/03/21 22:20:56 wiz Exp $ +$NetBSD: patch-ad,v 1.2 2003/07/01 23:10:34 jtb Exp $ ---- src/runtime/include/asm-base.h.orig Fri Apr 12 13:54:31 2002 +--- src/runtime/include/asm-base.h.orig +++ src/runtime/include/asm-base.h @@ -36,6 +36,11 @@ # define _ASM @@ -14,3 +14,12 @@ $NetBSD: patch-ad,v 1.1.1.1 2003/03/21 22:20:56 wiz Exp $ # endif # define CGLOBAL(ID) .global CSYM(ID) # define LABEL(ID) ID: +@@ -104,7 +109,7 @@ + # define DOUBLE(V) .double V + # define LABEL(ID) ID: + +-# elif (defined(OPSYS_LINUX) && defined(TARGET_PPC)) ++# elif ((defined(OPSYS_LINUX) || defined(OPSYS_NETBSD)) && defined(TARGET_PPC)) + # define CFUNSYM(ID) ID + # define CGLOBAL(ID) .globl CSYM(ID) + # define TEXT .section ".text" diff --git a/lang/smlnj/patches/patch-af b/lang/smlnj/patches/patch-af index 0d4acbcc90f..a8097b18084 100644 --- a/lang/smlnj/patches/patch-af +++ b/lang/smlnj/patches/patch-af @@ -1,8 +1,8 @@ -$NetBSD: patch-af,v 1.1.1.1 2003/03/21 22:20:56 wiz Exp $ +$NetBSD: patch-af,v 1.2 2003/07/01 23:10:34 jtb Exp $ ---- src/runtime/mach-dep/signal-sysdep.h.orig Fri Apr 20 09:26:45 2001 +--- src/runtime/mach-dep/signal-sysdep.h.orig +++ src/runtime/mach-dep/signal-sysdep.h -@@ -151,7 +151,7 @@ extern void SetFSR(int); +@@ -147,7 +147,7 @@ /* disable all FP exceptions */ # define SIG_InitFPE() SetFSR(0) @@ -11,3 +11,27 @@ $NetBSD: patch-af,v 1.1.1.1 2003/03/21 22:20:56 wiz Exp $ /** SPARC, SUNOS **/ # define USE_ZERO_LIMIT_PTR_FN # define SIG_FAULT1 SIGFPE +@@ -318,6 +318,23 @@ + + # define SIG_Flags 0 + ++# elif (defined(TARGET_PPC) && defined(OPSYS_NETBSD)) ++ /* PPC, NetBSD */ ++# include <signal.h> ++ typedef struct sigcontext_t SigContext_t; ++ ++# define SIG_FAULT1 SIGTRAP ++ ++# define INT_DIVZERO(s, c) ((s) == SIGTRAP) ++# define INT_OVFLW(s, c) ((s) == SIGTRAP) ++# define SIG_GetPC(scp) ((scp)->sc_frame.srr0) ++# define SIG_SetPC(scp, addr) { (scp)->sc_frame.srr0 = (long)(addr); } ++# define SIG_ZeroLimitPtr(scp) { ((scp)->sc_frame.fixreg[15] = 0); } /* limitptr = 15 (see src/runtime/mach-dep/PPC.prim.asm) */ ++# define SIG_GetCode(info,scp) (info) ++ typedef void SigReturn_t; ++ ++# define SIG_Flags 0 ++ + + # endif /* HOST_RS6000/HOST_PPC */ + diff --git a/lang/smlnj/patches/patch-ao b/lang/smlnj/patches/patch-ao new file mode 100644 index 00000000000..ebc7150b79f --- /dev/null +++ b/lang/smlnj/patches/patch-ao @@ -0,0 +1,13 @@ +$NetBSD: patch-ao,v 1.1 2003/07/01 23:10:34 jtb Exp $ + +--- src/runtime/kernel/boot.c.orig ++++ src/runtime/kernel/boot.c +@@ -124,7 +124,7 @@ + ml_val_t fileList; + # define SIZE_BUF_LEN 128 /* this should be plenty for two numbers */ + char sizeBuf[SIZE_BUF_LEN]; +- char c; ++ int c; + + numFiles = 0; + diff --git a/lang/smlnj/patches/patch-ap b/lang/smlnj/patches/patch-ap new file mode 100644 index 00000000000..6c2a663fa9e --- /dev/null +++ b/lang/smlnj/patches/patch-ap @@ -0,0 +1,13 @@ +$NetBSD: patch-ap,v 1.1 2003/07/01 23:10:34 jtb Exp $ + +--- src/runtime/include/cache-flush.h.orig ++++ src/runtime/include/cache-flush.h +@@ -40,7 +40,7 @@ + extern FlushICache (void *addr, int nbytes); + + +-#elif (defined(TARGET_PPC) && (defined(OPSYS_LINUX) || defined(OPSYS_DARWIN) )) ++#elif (defined(TARGET_PPC) && (defined(OPSYS_LINUX) || defined(OPSYS_DARWIN) || defined(OPSYS_NETBSD))) + extern FlushICache (void *addr, int nbytes); + + #else diff --git a/lang/smlnj/patches/patch-aq b/lang/smlnj/patches/patch-aq new file mode 100644 index 00000000000..470d5319a51 --- /dev/null +++ b/lang/smlnj/patches/patch-aq @@ -0,0 +1,13 @@ +$NetBSD: patch-aq,v 1.1 2003/07/01 23:10:34 jtb Exp $ + +--- src/runtime/mach-dep/PPC.prim.asm.orig ++++ src/runtime/mach-dep/PPC.prim.asm +@@ -813,7 +813,7 @@ + lfd f31, 136(r3) + blr + +-#if (defined(TARGET_PPC) && (defined(OPSYS_LINUX) || defined(OPSYS_DARWIN) )) ++#if (defined(TARGET_PPC) && (defined(OPSYS_LINUX) || defined(OPSYS_DARWIN) || defined(OPSYS_NETBSD) )) + + #define CACHE_LINE_SZB 32 + #define CACHE_LINE_MASK (CACHE_LINE_SZB-1) |