diff options
author | dholland <dholland@pkgsrc.org> | 2016-07-03 18:52:32 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2016-07-03 18:52:32 +0000 |
commit | 7bc49143a0a57d062487731a934f4bad1f004574 (patch) | |
tree | 4f819072c3f7726b968678d56b61e4d74d0131f4 /lang/smlnj11072 | |
parent | 7eab453b4418c83b2230a50a202e5d15e313a522 (diff) | |
download | pkgsrc-7bc49143a0a57d062487731a934f4bad1f004574.tar.gz |
Sync newer patches (mostly the time handling fixes) from base smlnj package.
Diffstat (limited to 'lang/smlnj11072')
11 files changed, 256 insertions, 3 deletions
diff --git a/lang/smlnj11072/distinfo b/lang/smlnj11072/distinfo index 5eb9ab283a0..49af436d1c9 100644 --- a/lang/smlnj11072/distinfo +++ b/lang/smlnj11072/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.2 2016/07/03 18:49:02 dholland Exp $ +$NetBSD: distinfo,v 1.3 2016/07/03 18:52:32 dholland Exp $ SHA1 (smlnj-110.72/MLRISC.tgz) = 9bb9eb169337533304c2e0e4eb9af263d38c398a RMD160 (smlnj-110.72/MLRISC.tgz) = 484512df036421e216d4afed01beb978d33e16bb @@ -62,7 +62,6 @@ RMD160 (smlnj-110.72/trace-debug-profile.tgz) = 6c85734aefd0672a645497550dacf56f Size (smlnj-110.72/trace-debug-profile.tgz) = 3905 bytes SHA1 (patch-aa) = f738a6284236158b6b95928768fe1213cc77fc20 SHA1 (patch-ab) = 2c9a448c8566d87a2d01528cf6e38ed0dfd9328b -SHA1 (patch-ac) = f6c30285f55a9537a785d363837ecc83cfd384b7 SHA1 (patch-ad) = 67802bbdf42408c60bbce4087f20d000a3445677 SHA1 (patch-ae) = 0ba98fb2b012daf75dcc4ac416cbf0fd3182114b SHA1 (patch-af) = 3a1c1cadd26eb246adafff823d49b4ab7161793b @@ -84,7 +83,7 @@ SHA1 (patch-base_runtime_gc_init-gc.c) = f40e961089beab151290ffc8371a48bc9f84651 SHA1 (patch-base_runtime_kernel_unix-timers.c) = 42f1d2964d5de37fdc232139f74fb9a95f21da07 SHA1 (patch-base_runtime_mach-dep_unix-prof.c) = 1f28a05cfb271c569cfb9778e67076bbfb14d646 SHA1 (patch-base_runtime_objs_mk.x86-netbsd) = 7d716c17c0f6a29acca7b630a1526df4d58e18cf -SHA1 (patch-config___arch-n-opsys) = b0c952b0b9ed6312a115761fdbd4c30aaa208b4c +SHA1 (patch-config___arch-n-opsys) = f6c30285f55a9537a785d363837ecc83cfd384b7 SHA1 (patch-src_runtime_gc_gc-stats.h) = af61db9d1f04e566d4c5c2bc5dcf4c6958f0ea78 SHA1 (patch-src_runtime_gc_init-gc.c) = 5d1d5a13a51d732590dd4f375824bbc389a0525d SHA1 (patch-src_runtime_kernel_unix-timers.c) = 1c1db5bce0ec1e72adafb9380027884cf746c75c diff --git a/lang/smlnj11072/patches/patch-base_runtime_gc_gc-stats.h b/lang/smlnj11072/patches/patch-base_runtime_gc_gc-stats.h new file mode 100644 index 00000000000..c6526ca9cef --- /dev/null +++ b/lang/smlnj11072/patches/patch-base_runtime_gc_gc-stats.h @@ -0,0 +1,44 @@ +$NetBSD: patch-base_runtime_gc_gc-stats.h,v 1.1 2016/07/03 18:52:32 dholland Exp $ + +Use struct timeval instead of blithely assuming that some private +struct declaration is always bit compatible with it. (Because it +isn't.) From PR 40954. + +--- base/runtime/gc/gc-stats.h.orig 2009-03-03 18:23:38.000000000 -0500 ++++ base/runtime/gc/gc-stats.h 2009-03-03 18:25:04.000000000 -0500 +@@ -16,6 +16,7 @@ extern void ReportVM (ml_state_t *msp, i + + #define START_GC_PAUSE(HEAP) { \ + if (StatsOn) { \ ++ struct timeval tv; \ + heap_t *__heap = (HEAP); \ + stat_rec_t *__p = &(StatsBuf[NStatsRecs]); \ + Unsigned32_t __n = (Addr_t)(msp->ml_allocPtr) - \ +@@ -23,7 +24,10 @@ extern void ReportVM (ml_state_t *msp, i + CNTR_INCR(&(__heap->numAlloc), __n); \ + __p->allocCnt = __heap->numAlloc; \ + __p->numGens = 0; \ +- gettimeofday(&(__p->startTime), NIL(struct timezone *)); \ ++ gettimeofday(&tv, NIL(struct timezone *)); \ ++ /* XXX breaks in 2038 */ \ ++ __p->startTime.seconds = tv.tv_sec; \ ++ __p->startTime.uSeconds = tv.tv_usec; \ + } \ + } + +@@ -34,8 +38,11 @@ extern void ReportVM (ml_state_t *msp, i + + #define STOP_GC_PAUSE() { \ + if (StatsOn) { \ +- gettimeofday(&(StatsBuf[NStatsRecs].stopTime), \ +- NIL(struct timezone *)); \ ++ struct timeval tv; \ ++ gettimeofday(&tv, NIL(struct timezone *)); \ ++ /* XXX breaks in 2038 */ \ ++ StatsBuf[NStatsRecs].stopTime.seconds = tv.tv_sec; \ ++ StatsBuf[NStatsRecs].stopTime.uSeconds = tv.tv_usec; \ + STATS_FINISH(); \ + } \ + } + + diff --git a/lang/smlnj11072/patches/patch-base_runtime_gc_init-gc.c b/lang/smlnj11072/patches/patch-base_runtime_gc_init-gc.c new file mode 100644 index 00000000000..fb6cfa2e4e5 --- /dev/null +++ b/lang/smlnj11072/patches/patch-base_runtime_gc_init-gc.c @@ -0,0 +1,27 @@ +$NetBSD: patch-base_runtime_gc_init-gc.c,v 1.1 2016/07/03 18:52:32 dholland Exp $ + +Use struct timeval instead of blithely assuming that some private +struct declaration is always bit compatible with it. (Because it +isn't.) From PR 40954. + +--- base/runtime/gc/init-gc.c.orig 2009-03-03 18:15:36.000000000 -0500 ++++ base/runtime/gc/init-gc.c 2009-03-03 18:17:03.000000000 -0500 +@@ -218,12 +218,16 @@ void InitHeap (ml_state_t *msp, bool_t i + #if defined(COLLECT_STATS) + if (StatsFD > 0) { + stat_hdr_t hdr; ++ struct timeval tv; + CNTR_ZERO(&(heap->numAlloc)); + hdr.mask = STATMASK_ALLOC|STATMASK_NGENS|STATMASK_START|STATMASK_STOP; + hdr.isNewRuntime = 1; + hdr.allocSzB = params->allocSz; + hdr.numGens = params->numGens; +- gettimeofday (&(hdr.startTime), NIL(struct timezone *)); ++ gettimeofday (&tv, NIL(struct timezone *)); ++ /* XXX breaks in 2038 */ ++ hdr.startTime.seconds = tv.tv_sec; ++ hdr.startTime.uSeconds = tv.tv_usec; + write (StatsFD, (char *)&hdr, sizeof(stat_hdr_t)); + } + #endif + diff --git a/lang/smlnj11072/patches/patch-base_runtime_kernel_unix-timers.c b/lang/smlnj11072/patches/patch-base_runtime_kernel_unix-timers.c new file mode 100644 index 00000000000..443e2a2cb75 --- /dev/null +++ b/lang/smlnj11072/patches/patch-base_runtime_kernel_unix-timers.c @@ -0,0 +1,17 @@ +$NetBSD: patch-base_runtime_kernel_unix-timers.c,v 1.1 2016/07/03 18:52:32 dholland Exp $ + +Don't blithely assume that some internal type has the same layout as a +system type. It doesn't. Same issue as PR 40954, but a new case that I +either didn't find at the time or has appeared since. + +--- base/runtime/kernel/unix-timers.c~ 2000-06-01 18:34:03.000000000 +0000 ++++ base/runtime/kernel/unix-timers.c +@@ -18,7 +18,7 @@ typedef struct rusage time_struct_t; + #define GET_TIME(t) getrusage(RUSAGE_SELF, &(t)) + #define SYS_TIME(t) ((t).ru_stime) + #define USR_TIME(t) ((t).ru_utime) +-#define SET_TIME(tp, t) { *((struct timeval *)(tp)) = (t); } ++#define SET_TIME(tp, t) { (tp)->seconds = (t).tv_sec; (tp)->uSeconds = (t).tv_usec; } + + #else /* !HAS_GETRUSAGE */ + diff --git a/lang/smlnj11072/patches/patch-base_runtime_mach-dep_unix-prof.c b/lang/smlnj11072/patches/patch-base_runtime_mach-dep_unix-prof.c new file mode 100644 index 00000000000..a834799213b --- /dev/null +++ b/lang/smlnj11072/patches/patch-base_runtime_mach-dep_unix-prof.c @@ -0,0 +1,15 @@ +$NetBSD: patch-base_runtime_mach-dep_unix-prof.c,v 1.1 2016/07/03 18:52:32 dholland Exp $ + +Use own abstractions correctly. + +--- base/runtime/mach-dep/unix-prof.c~ 2005-01-18 17:58:39.000000000 +0000 ++++ base/runtime/mach-dep/unix-prof.c +@@ -34,7 +34,7 @@ void EnableProfSignals () + */ + void DisableProfSignals () + { +- SIG_SetHandler (SIGVTALRM, SIG_DFL); ++ SIG_SetDefault (SIGVTALRM); + + } /* end of DisableProfSignals */ + diff --git a/lang/smlnj11072/patches/patch-base_runtime_objs_mk.x86-netbsd b/lang/smlnj11072/patches/patch-base_runtime_objs_mk.x86-netbsd new file mode 100644 index 00000000000..20f313d468f --- /dev/null +++ b/lang/smlnj11072/patches/patch-base_runtime_objs_mk.x86-netbsd @@ -0,0 +1,24 @@ +$NetBSD: patch-base_runtime_objs_mk.x86-netbsd,v 1.1 2016/07/03 18:52:32 dholland Exp $ + +Configure for pkgsrc. Build as 32-bit. + +--- base/runtime/objs/mk.x86-netbsd.orig 2015-04-22 07:11:37.000000000 +0000 ++++ base/runtime/objs/mk.x86-netbsd +@@ -7,9 +7,10 @@ SHELL = /bin/sh + + MAKE = gmake + ++AS = as --32 + ARFLAGS = Trcv + CC = gcc -ansi +-CFLAGS = -O2 ++CFLAGS = -O2 -m32 + CPP = gcc -x assembler-with-cpp -E -P + #CPP = /usr/bin/cpp -P + +@@ -23,4 +24,4 @@ VERSION = v-x86-netbsd + RUNTIME = run.x86-netbsd + + all: +- ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME)) ++ ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" AS="$(AS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME)) diff --git a/lang/smlnj11072/patches/patch-src_runtime_gc_gc-stats.h b/lang/smlnj11072/patches/patch-src_runtime_gc_gc-stats.h new file mode 100644 index 00000000000..cb6fc41bd74 --- /dev/null +++ b/lang/smlnj11072/patches/patch-src_runtime_gc_gc-stats.h @@ -0,0 +1,44 @@ +$NetBSD: patch-src_runtime_gc_gc-stats.h,v 1.1 2016/07/03 18:52:32 dholland Exp $ + +Use struct timeval instead of blithely assuming that some private +struct declaration is always bit compatible with it. (Because it +isn't.) From PR 40954. + +--- src/runtime/gc/gc-stats.h.orig 2009-03-03 18:23:38.000000000 -0500 ++++ src/runtime/gc/gc-stats.h 2009-03-03 18:25:04.000000000 -0500 +@@ -16,6 +16,7 @@ extern void ReportVM (ml_state_t *msp, i + + #define START_GC_PAUSE(HEAP) { \ + if (StatsOn) { \ ++ struct timeval tv; \ + heap_t *__heap = (HEAP); \ + stat_rec_t *__p = &(StatsBuf[NStatsRecs]); \ + Unsigned32_t __n = (Addr_t)(msp->ml_allocPtr) - \ +@@ -23,7 +24,10 @@ extern void ReportVM (ml_state_t *msp, i + CNTR_INCR(&(__heap->numAlloc), __n); \ + __p->allocCnt = __heap->numAlloc; \ + __p->numGens = 0; \ +- gettimeofday(&(__p->startTime), NIL(struct timezone *)); \ ++ gettimeofday(&tv, NIL(struct timezone *)); \ ++ /* XXX breaks in 2038 */ \ ++ __p->startTime.seconds = tv.tv_sec; \ ++ __p->startTime.uSeconds = tv.tv_usec; \ + } \ + } + +@@ -34,8 +38,11 @@ extern void ReportVM (ml_state_t *msp, i + + #define STOP_GC_PAUSE() { \ + if (StatsOn) { \ +- gettimeofday(&(StatsBuf[NStatsRecs].stopTime), \ +- NIL(struct timezone *)); \ ++ struct timeval tv; \ ++ gettimeofday(&tv, NIL(struct timezone *)); \ ++ /* XXX breaks in 2038 */ \ ++ StatsBuf[NStatsRecs].stopTime.seconds = tv.tv_sec; \ ++ StatsBuf[NStatsRecs].stopTime.uSeconds = tv.tv_usec; \ + STATS_FINISH(); \ + } \ + } + + diff --git a/lang/smlnj11072/patches/patch-src_runtime_gc_init-gc.c b/lang/smlnj11072/patches/patch-src_runtime_gc_init-gc.c new file mode 100644 index 00000000000..4bc98941bba --- /dev/null +++ b/lang/smlnj11072/patches/patch-src_runtime_gc_init-gc.c @@ -0,0 +1,27 @@ +$NetBSD: patch-src_runtime_gc_init-gc.c,v 1.1 2016/07/03 18:52:32 dholland Exp $ + +Use struct timeval instead of blithely assuming that some private +struct declaration is always bit compatible with it. (Because it +isn't.) From PR 40954. + +--- src/runtime/gc/init-gc.c.orig 2009-03-03 18:15:36.000000000 -0500 ++++ src/runtime/gc/init-gc.c 2009-03-03 18:17:03.000000000 -0500 +@@ -218,12 +218,16 @@ void InitHeap (ml_state_t *msp, bool_t i + #if defined(COLLECT_STATS) + if (StatsFD > 0) { + stat_hdr_t hdr; ++ struct timeval tv; + CNTR_ZERO(&(heap->numAlloc)); + hdr.mask = STATMASK_ALLOC|STATMASK_NGENS|STATMASK_START|STATMASK_STOP; + hdr.isNewRuntime = 1; + hdr.allocSzB = params->allocSz; + hdr.numGens = params->numGens; +- gettimeofday (&(hdr.startTime), NIL(struct timezone *)); ++ gettimeofday (&tv, NIL(struct timezone *)); ++ /* XXX breaks in 2038 */ ++ hdr.startTime.seconds = tv.tv_sec; ++ hdr.startTime.uSeconds = tv.tv_usec; + write (StatsFD, (char *)&hdr, sizeof(stat_hdr_t)); + } + #endif + diff --git a/lang/smlnj11072/patches/patch-src_runtime_kernel_unix-timers.c b/lang/smlnj11072/patches/patch-src_runtime_kernel_unix-timers.c new file mode 100644 index 00000000000..5735dd686ca --- /dev/null +++ b/lang/smlnj11072/patches/patch-src_runtime_kernel_unix-timers.c @@ -0,0 +1,17 @@ +$NetBSD: patch-src_runtime_kernel_unix-timers.c,v 1.1 2016/07/03 18:52:32 dholland Exp $ + +Don't blithely assume that some internal type has the same layout as a +system type. It doesn't. Same issue as PR 40954, but a new case that I +either didn't find at the time or has appeared since. + +--- src/runtime/kernel/unix-timers.c~ 2000-06-01 18:34:03.000000000 +0000 ++++ src/runtime/kernel/unix-timers.c +@@ -18,7 +18,7 @@ typedef struct rusage time_struct_t; + #define GET_TIME(t) getrusage(RUSAGE_SELF, &(t)) + #define SYS_TIME(t) ((t).ru_stime) + #define USR_TIME(t) ((t).ru_utime) +-#define SET_TIME(tp, t) { *((struct timeval *)(tp)) = (t); } ++#define SET_TIME(tp, t) { (tp)->seconds = (t).tv_sec; (tp)->uSeconds = (t).tv_usec; } + + #else /* !HAS_GETRUSAGE */ + diff --git a/lang/smlnj11072/patches/patch-src_runtime_mach-dep_unix-prof.c b/lang/smlnj11072/patches/patch-src_runtime_mach-dep_unix-prof.c new file mode 100644 index 00000000000..96de4abf271 --- /dev/null +++ b/lang/smlnj11072/patches/patch-src_runtime_mach-dep_unix-prof.c @@ -0,0 +1,15 @@ +$NetBSD: patch-src_runtime_mach-dep_unix-prof.c,v 1.1 2016/07/03 18:52:32 dholland Exp $ + +Use own abstractions correctly. + +--- src/runtime/mach-dep/unix-prof.c~ 2005-01-18 17:58:39.000000000 +0000 ++++ src/runtime/mach-dep/unix-prof.c +@@ -34,7 +34,7 @@ void EnableProfSignals () + */ + void DisableProfSignals () + { +- SIG_SetHandler (SIGVTALRM, SIG_DFL); ++ SIG_SetDefault (SIGVTALRM); + + } /* end of DisableProfSignals */ + diff --git a/lang/smlnj11072/patches/patch-src_runtime_objs_mk.x86-netbsd b/lang/smlnj11072/patches/patch-src_runtime_objs_mk.x86-netbsd new file mode 100644 index 00000000000..8757c54c578 --- /dev/null +++ b/lang/smlnj11072/patches/patch-src_runtime_objs_mk.x86-netbsd @@ -0,0 +1,24 @@ +$NetBSD: patch-src_runtime_objs_mk.x86-netbsd,v 1.1 2016/07/03 18:52:32 dholland Exp $ + +Configure for pkgsrc. Build as 32-bit. + +--- src/runtime/objs/mk.x86-netbsd.orig 2015-04-22 07:11:37.000000000 +0000 ++++ src/runtime/objs/mk.x86-netbsd +@@ -7,9 +7,10 @@ SHELL = /bin/sh + + MAKE = gmake + ++AS = as --32 + ARFLAGS = Trcv + CC = gcc -ansi +-CFLAGS = -O2 ++CFLAGS = -O2 -m32 + CPP = gcc -x assembler-with-cpp -E -P + #CPP = /usr/bin/cpp -P + +@@ -23,4 +24,4 @@ VERSION = v-x86-netbsd + RUNTIME = run.x86-netbsd + + all: +- ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME)) ++ ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" AS="$(AS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME)) |