aboutsummaryrefslogtreecommitdiff
path: root/lang/smlnj/files
diff options
context:
space:
mode:
authorLi-Wen Hsu <lwhsu@FreeBSD.org>2020-06-16 23:04:38 +0000
committerLi-Wen Hsu <lwhsu@FreeBSD.org>2020-06-16 23:04:38 +0000
commit37c2a65d33b8d106f245c5440756eea79b117f7d (patch)
tree55e4b1b64073372f569bc559e1206a8805c6b68c /lang/smlnj/files
parent9618949f6ace2cf21d4c4308a1020fb359f942ce (diff)
downloadports-37c2a65d33b8d106f245c5440756eea79b117f7d.tar.gz
ports-37c2a65d33b8d106f245c5440756eea79b117f7d.zip
Notes
Diffstat (limited to 'lang/smlnj/files')
-rw-r--r--lang/smlnj/files/do-patch-asdl_config_check__smlnj__heap__suffix.m410
-rw-r--r--lang/smlnj/files/do-patch-asdl_configure10
-rw-r--r--lang/smlnj/files/do-patch-asdl_src_asdlgen_Makefile.in20
-rw-r--r--lang/smlnj/files/do-patch-base_runtime_include_ml-unixdep.h47
-rw-r--r--lang/smlnj/files/do-patch-base_runtime_objs_makefile48
-rw-r--r--lang/smlnj/files/do-patch-base_runtime_objs_mk.amd64-freebsd32
-rw-r--r--lang/smlnj/files/do-patch-base_runtime_objs_mk.x86-freebsd56
-rw-r--r--lang/smlnj/files/do-patch-base_system_Basis_Implementation_date.sml11
-rw-r--r--lang/smlnj/files/do-patch-eXene_lib_protocol_xreply.sml11
-rw-r--r--lang/smlnj/files/do-patch-eXene_lib_protocol_xrequest.sml11
-rw-r--r--lang/smlnj/files/do-patch-eXene_lib_protocol_xsendevt.sml11
-rw-r--r--lang/smlnj/files/patch-config___arch-n-opsys11
-rw-r--r--lang/smlnj/files/patch-config___heap2exec33
-rw-r--r--lang/smlnj/files/patch-config_install.sh37
-rw-r--r--lang/smlnj/files/patch-config_unpack2
15 files changed, 145 insertions, 205 deletions
diff --git a/lang/smlnj/files/do-patch-asdl_config_check__smlnj__heap__suffix.m4 b/lang/smlnj/files/do-patch-asdl_config_check__smlnj__heap__suffix.m4
new file mode 100644
index 000000000000..e5e4e2391ae4
--- /dev/null
+++ b/lang/smlnj/files/do-patch-asdl_config_check__smlnj__heap__suffix.m4
@@ -0,0 +1,10 @@
+--- asdl/config/check_smlnj_heap_suffix.m4.orig 2019-10-21 18:02:45 UTC
++++ asdl/config/check_smlnj_heap_suffix.m4
+@@ -45,6 +45,7 @@ AC_DEFUN([CHECK_SMLNJ_HEAP_SUFFIX], [
+ sparc:solaris3*) SMLNJ_ARCH=sparc; SMLNJ_OPSYS=solaris;;
+ x86_64:linux*) SMLNJ_ARCH=x86_64; SMLNJ_OPSYS=linux;;
+ x86_64:darwin*) SMLNJ_ARCH=x86_64; SMLNJ_OPSYS=darwin;;
++ x86_64:freebsd*) SMLNJ_ARCH=x86_64; SMLNJ_OPSYS=freebsd;;
+ *) $1 ;;
+ esac
+ if test z$SMLNJ_ARCH != z -a z$SMLNJ_OPSYS != z ; then
diff --git a/lang/smlnj/files/do-patch-asdl_configure b/lang/smlnj/files/do-patch-asdl_configure
deleted file mode 100644
index 1a5553800c78..000000000000
--- a/lang/smlnj/files/do-patch-asdl_configure
+++ /dev/null
@@ -1,10 +0,0 @@
---- asdl/configure.orig 2019-06-20 16:01:17 UTC
-+++ asdl/configure
-@@ -4893,6 +4893,7 @@ $as_echo "$SMLNJ_VERSION" >&6; }
- sparc:solaris2*) SMLNJ_ARCH=sparc; SMLNJ_OPSYS=sunos;;
- sparc:solaris3*) SMLNJ_ARCH=sparc; SMLNJ_OPSYS=solaris;;
- x86_64:linux*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=linux;;
-+ x86_64:freebsd*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=freebsd;;
- x86_64:darwin*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=darwin;;
- *)
- as_fn_error $? "unsupported configuration ${host_cpu}-${host_os}" "$LINENO" 5 ;;
diff --git a/lang/smlnj/files/do-patch-asdl_src_asdlgen_Makefile.in b/lang/smlnj/files/do-patch-asdl_src_asdlgen_Makefile.in
index 523120c95426..807546457571 100644
--- a/lang/smlnj/files/do-patch-asdl_src_asdlgen_Makefile.in
+++ b/lang/smlnj/files/do-patch-asdl_src_asdlgen_Makefile.in
@@ -1,6 +1,20 @@
---- asdl/src/asdlgen/Makefile.in.orig 2018-08-28 15:36:58 UTC
+--- asdl/src/asdlgen/Makefile.in.orig 2019-10-21 18:02:45 UTC
+++ asdl/src/asdlgen/Makefile.in
-@@ -54,8 +54,10 @@ CM_FILES = back-end/sml/sources.cm \
+@@ -35,10 +35,11 @@ INSTALL_WRAPPER = @ASDL_ROOT@/bin/install-sml-wrapper.
+
+ # if specified, include the size option as an argument to ml-build
+ #
+-ifneq (@HOSTSIZE@,)
++#ifneq (@HOSTSIZE@,)
++.if defined(@HOSTSIZE@)
+ ML_BUILD_FLAGS += -@HOSTSIZE@
+ ML_MAKEDEPEND_FLAGS += -@HOSTSIZE@
+-endif
++.endif
+
+ #
+ # generator tools
+@@ -62,8 +63,10 @@ CM_FILES = back-end/sml/sources.cm \
CODE_FRAG_DIRS = back-end/sml
@@ -13,7 +27,7 @@
SRCDIR = @ASDLGEN_SRCDIR@
-@@ -94,14 +96,18 @@ back-end/sml/fragments.sml:
+@@ -102,14 +105,18 @@ back-end/sml/fragments.sml:
touch .depend
$(ML_MAKEDEPEND) $(ML_MAKEDEPEND_FLAGS) -n -f .depend $(ROOT_CM) $(HEAP) || rm -f .depend
diff --git a/lang/smlnj/files/do-patch-base_runtime_include_ml-unixdep.h b/lang/smlnj/files/do-patch-base_runtime_include_ml-unixdep.h
index b8f8ef12a268..6fa30f7f315e 100644
--- a/lang/smlnj/files/do-patch-base_runtime_include_ml-unixdep.h
+++ b/lang/smlnj/files/do-patch-base_runtime_include_ml-unixdep.h
@@ -1,43 +1,26 @@
---- base/runtime/include/ml-unixdep.h.orig 2019-06-19 18:37:43 UTC
+--- base/runtime/include/ml-unixdep.h.orig 2019-11-14 19:24:04 UTC
+++ base/runtime/include/ml-unixdep.h
-@@ -37,6 +37,7 @@
+@@ -33,9 +33,10 @@
+ * HAS_UCONTEXT if signal handlers have a ucontext_t argument.
+ * HAS_STRERROR if the system provides the ISO C strerror function.
* INT_GIDLIST if the second argument to getgroups is int[].
++ * HAS_MKSTEMP if OS provides the POSIX mkstemp function.
* STAT_HAS_TIMESPEC if the time fields in the "struct stat" type have
* type "struct timespec".
-+ * HAS_MKSTEMP if OS provides the POSIX mkstemp function.
+- * HAS_NANOSLEEP if the system provides the nanosleep(2) function.
++ * HAS_NANOSLEEP if the system provides the nanosleep(2) function.
*
* Note that only one of the following sets of symbols should be defined:
* { HAS_MMAP, HAS_ANON_MMAP, HAS_VM_ALLOCATE }
-@@ -94,6 +95,7 @@
- # define HAS_POLL
- # define HAS_SIGCONTEXT
+@@ -208,8 +209,11 @@ extern char *sys_errlist[];
+ # define HAS_SELECT
+ # define HAS_UCONTEXT
# define HAS_STRERROR
+# define HAS_MKSTEMP
-
- /* These declarations are not in <errno.h> */
- extern int sys_nerr;
-@@ -204,6 +206,7 @@ extern char *sys_errlist[];
- # define HAS_SIGCONTEXT
- # define HAS_STRERROR
# define STAT_HAS_TIMESPEC
-+# define HAS_MKSTEMP
-
- /* FreeBSD uses MAP_ANON for MAP_ANONYMOUS */
- # define MAP_ANONYMOUS MAP_ANON
-@@ -254,6 +257,16 @@ extern char *sys_errlist[];
-
- #include <features.h>
-
-+#endif
-+
-+#if defined(OPSYS_FREEBSD)
-+# if defined(INCLUDE_FREEBSD_I386__TYPES)
-+# include <sys/cdefs.h>
-+# include INCLUDE_FREEBSD_I386__TYPES
-+# endif
-+# if defined(INCLUDE_FREEBSD_I386_SIGNAL)
-+# include INCLUDE_FREEBSD_I386_SIGNAL
-+# endif
- #endif
+ # define HAS_NANOSLEEP
++/* FreeBSD uses MAP_ANON for MAP_ANONYMOUS */
++# define MAP_ANONYMOUS MAP_ANON
- #include <unistd.h>
+ #elif defined(OPSYS_NETBSD) /* version 3.x */
+ # define OS_NAME "BSD"
diff --git a/lang/smlnj/files/do-patch-base_runtime_objs_makefile b/lang/smlnj/files/do-patch-base_runtime_objs_makefile
index 081ca5914c77..ddd887f5d610 100644
--- a/lang/smlnj/files/do-patch-base_runtime_objs_makefile
+++ b/lang/smlnj/files/do-patch-base_runtime_objs_makefile
@@ -1,4 +1,4 @@
---- base/runtime/objs/makefile.orig 2019-06-18 21:06:21 UTC
+--- base/runtime/objs/makefile.orig 2019-11-10 14:00:54 UTC
+++ base/runtime/objs/makefile
@@ -5,10 +5,12 @@
@@ -6,60 +6,32 @@
MAKE = make
-CC = cc
-CPP = /lib/cpp
+-LD_LIBS =
+-AS = as
+CC ?= cc
++CFLAGS ?=
+CPP ?= /lib/cpp
- LD_LIBS =
--AS = as
++LD_LIBS ?=
+AS ?= as
+ASFLAGS ?=
-+CPPASFLAGS ?=
AR = ar
ARFLAGS = rcv
RANLIB = ranlib
-@@ -38,7 +40,7 @@ BC_DIR = $(ROOT_DIR)/bytecode
+@@ -37,8 +39,6 @@ MP_DIR = $(ROOT_DIR)/mp
CLIB_DIR = $(ROOT_DIR)/c-libs
CONFIG_DIR = $(ROOT_DIR)/config
-CFLAGS = -O
-+CFLAGS ?= -O
-
+-
INCLUDES = -I$(OBJS_DIR) -I$(INC_DIR)
GC_INCLUDES = $(INCLUDES) -I$(GC_DIR)
-@@ -275,8 +277,8 @@ prim.o: $(MACH_DIR)/$(TARGET).prim.asm \
- $(INC_DIR)/asm-base.h \
+ GEN_INCLUDES = -I$(CONFIG_DIR) $(INCLUDES)
+@@ -275,7 +275,7 @@ prim.o: $(MACH_DIR)/$(TARGET).prim.asm \
$(MACH_DIR)/x86-syntax.h \
mlstate-offsets.h
-- $(CPP) -D_ASM_ $(DEFS) $(INCLUDES) $(MACH_DIR)/$(TARGET).prim.asm > prim.s
+ $(CPP) -D_ASM_ $(DEFS) $(INCLUDES) $(MACH_DIR)/$(TARGET).prim.asm > prim.s
- $(AS) -o prim.o prim.s
-+ $(CPP) -D_ASM_ $(DEFS) $(CPPASFLAGS) $(INCLUDES) $(MACH_DIR)/$(TARGET).prim.asm > prim.s
+ $(AS) $(ASFLAGS) -o prim.o prim.s
- $(MACH_DIR)/BYTECODE.prim.asm: bc-instr-def.h $(BC_DIR)/bc-instrs.h $(BC_DIR)/bc.h
-
-@@ -318,7 +320,7 @@ memory-trace.o: $(BC_DIR)/memory-trace.c \
- primops.o: $(BC_DIR)/primops.asm \
- $(INC_DIR)/asm-base.h
- $(CPP) -D_ASM_ $(DEFS) $(INCLUDES) $(BC_DIR)/primops.asm > primops.s
-- $(AS) -o primops.o primops.s
-+ $(AS) $(ASFLAGS) -o primops.o primops.s
-
- bc-instr-def.h: gen-bc-instr-def \
- $(BC_DIR)/bc.h $(BC_DIR)/print-bc.h
-@@ -330,7 +332,7 @@ bc-instr-def.h: gen-bc-instr-def \
#
- MK_ARGS = VERSION="$(VERSION)" \
- MAKE="$(MAKE)" \
-- CC="$(CC)" CFLAGS="$(CFLAGS)" DEFS="$(DEFS)" \
-+ CC="$(CC)" CFLAGS="$(CFLAGS)" DEFS='$(DEFS)' \
- AR="$(AR)" ARFLAGS="$(ARFLAGS)" \
- RANLIB="$(RANLIB)" \
- INCLUDES="$(GC_INCLUDES) -I../bytecode"
-@@ -421,7 +423,7 @@ LIB_INCLUDES = -I$(LIB_OBJS_DIR) -I$(LIB_INC_DIR) -I..
#
- LIB_MK_ARGS = VERSION="$(VERSION)" \
- MAKE="$(MAKE)" \
-- CC="$(CC)" CFLAGS="$(CFLAGS)" DEFS="$(DEFS)" \
-+ CC="$(CC)" CFLAGS="$(CFLAGS)" DEFS='$(DEFS)' \
- AR="$(AR)" ARFLAGS="$(ARFLAGS)" \
- RANLIB="$(RANLIB)" \
- INCLUDES="$(LIB_INCLUDES)"
diff --git a/lang/smlnj/files/do-patch-base_runtime_objs_mk.amd64-freebsd b/lang/smlnj/files/do-patch-base_runtime_objs_mk.amd64-freebsd
new file mode 100644
index 000000000000..1d28d72f24ea
--- /dev/null
+++ b/lang/smlnj/files/do-patch-base_runtime_objs_mk.amd64-freebsd
@@ -0,0 +1,32 @@
+--- base/runtime/objs/mk.amd64-freebsd.orig 2019-11-14 19:33:11 UTC
++++ base/runtime/objs/mk.amd64-freebsd
+@@ -1,4 +1,4 @@
+-# mk.amd64-freebst
++# mk.amd64-freebsd
+ #
+ # makefile for "Free BSD" on the amd64 architecture, which is a BSD 4.4 clone.
+ #
+@@ -6,9 +6,10 @@
+ SHELL = /bin/sh
+
+ MAKE = make
+-AS = as --64
+-CC = cc -std=gnu99
+-CFLAGS = -O2 -m64
++AS ?= cc -x assembler -c
++ASFLAGS ?= -fPIC
++CC ?= cc -std=gnu99
++CFLAGS ?= -O2 -m64 -fPIC
+ CPP = cc -x assembler-with-cpp -E -P
+ XOBJS =
+ XLIBS = ../c-libs/dl/libunix-dynload.a
+@@ -26,6 +27,6 @@ RUNTIME_SO = run.amd64-freebsd.so
+ RUNTIME_A = run.amd64-freebsd.a
+
+ all:
+- ($(MAKE) CHECK_HEAP=$(CHECK_HEAP) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" AS="$(AS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+-# ($(MAKE) RUNTIME="$(RUNTIME_SO)" VERSION="$(VERSION)" AS="$(AS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-shared" $(RUNTIME_SO))
+-# ($(MAKE) RUNTIME_A="$(RUNTIME_A)" VERSION="$(VERSION)" AS="$(AS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="" $(RUNTIME_A))
++ ($(MAKE) CHECK_HEAP=$(CHECK_HEAP) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" AS="$(AS)" ASFLAGS="$(ASFLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ ($(MAKE) RUNTIME="$(RUNTIME_SO)" VERSION="$(VERSION)" AS="$(AS)" ASFLAGS="$(ASFLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-shared -Wl,-z,notext" $(RUNTIME_SO))
++ ($(MAKE) RUNTIME_A="$(RUNTIME_A)" VERSION="$(VERSION)" AS="$(AS)" ASFLAGS="$(ASFLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="" $(RUNTIME_A))
diff --git a/lang/smlnj/files/do-patch-base_runtime_objs_mk.x86-freebsd b/lang/smlnj/files/do-patch-base_runtime_objs_mk.x86-freebsd
index 58bacfb4a14b..81cd6a59f7d6 100644
--- a/lang/smlnj/files/do-patch-base_runtime_objs_mk.x86-freebsd
+++ b/lang/smlnj/files/do-patch-base_runtime_objs_mk.x86-freebsd
@@ -1,37 +1,43 @@
---- base/runtime/objs/mk.x86-freebsd.orig 2006-04-20 15:28:53 UTC
+--- base/runtime/objs/mk.x86-freebsd.orig 2019-11-14 19:19:39 UTC
+++ base/runtime/objs/mk.x86-freebsd
-@@ -5,19 +5,19 @@
-
+@@ -6,20 +6,20 @@
SHELL = /bin/sh
--MAKE = gmake
-+MAKE = make
-
- ARFLAGS = Trcv
--CC = gcc -ansi
--CFLAGS = -O2
--CPP = gcc -x assembler-with-cpp -E -P
-+CC ?= gcc -ansi
-+CFLAGS ?= -O2
-+CPP = $(CC) -x assembler-with-cpp -E -P
- #CPP = /usr/bin/cpp -P
-
+ MAKE = make
+-
+-AS = as --32
+-CC = cc -std=gnu99
+-CFLAGS = -O2 -m32
++AS ?= cc -x assembler -c
++ASFLAGS ?= -fPIC
++CC ?= cc -std=gnu99
++CFLAGS ?= -O2 -m32 -fPIC
+ CPP = cc -x assembler-with-cpp -E -P
+-#CPP = /usr/bin/cpp -P
+-ARFLAGS = Trcv
+-
XOBJS =
XLIBS = ../c-libs/dl/libunix-dynload.a
- LD_LIBS =
+-LD_LIBS =
++LD_LIBS = -ldl
++#CHECK_HEAP = check-heap.o
++XDEFS = -DASSERT_ON
BASE_DEFS =
--DEFS = $(BASE_DEFS) -DHOST_X86 -DTARGET_X86 -DOPSYS_UNIX -DOPSYS_FREEBSD -DDLOPEN
-+DEFS = $(BASE_DEFS) -DHOST_X86 -DTARGET_X86 -DOPSYS_UNIX -DOPSYS_FREEBSD -DDLOPEN $(EXTRA_DEFS)
+-DEFS = $(BASE_DEFS) -DARCH_X86 -DDSIZE_32 -DOPSYS_UNIX -DOPSYS_FREEBSD \
+- -DGNU_ASSEMBLER -DDLOPEN -DINDIRECT_CFUNC
++DEFS = $(XDEFS) $(BASE_DEFS) -DARCH_X86 -DSIZE_32 \
++ -DOPSYS_UNIX -DOPSYS_FREEBSD -D_GNU_SOURCE -DGNU_ASSEMBLER -DDLOPEN \
++ -DINDIRECT_CFUNC
TARGET = X86
VERSION = v-x86-freebsd
RUNTIME = run.x86-freebsd
-@@ -25,6 +25,6 @@ RUNTIME_SO = run.x86-freebsd.so
+@@ -27,6 +27,6 @@ RUNTIME_SO = run.x86-freebsd.so
RUNTIME_A = run.x86-freebsd.a
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_SO)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-shared" $(RUNTIME_SO))
-- ($(MAKE) RUNTIME_A="$(RUNTIME_A)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="" $(RUNTIME_A))
-+ ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" AS="$(AS)" ASFLAGS="$(ASFLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="$(LDFLAGS)" $(RUNTIME))
-+ ($(MAKE) RUNTIME="$(RUNTIME_SO)" VERSION="$(VERSION)" MAKE="$(MAKE)" AS="$(AS)" ASFLAGS="$(ASFLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-shared $(LDFLAGS)" $(RUNTIME_SO))
-+ ($(MAKE) RUNTIME_A="$(RUNTIME_A)" VERSION="$(VERSION)" MAKE="$(MAKE)" AS="$(AS)" ASFLAGS="$(ASFLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="$(LDFLAGS)" $(RUNTIME_A))
+- ($(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))
+-# ($(MAKE) RUNTIME="$(RUNTIME_SO)" VERSION="$(VERSION)" MAKE="$(MAKE)" AS="$(AS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-shared" $(RUNTIME_SO))
+-# ($(MAKE) RUNTIME_A="$(RUNTIME_A)" VERSION="$(VERSION)" MAKE="$(MAKE)" AS="$(AS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="" $(RUNTIME_A))
++ ($(MAKE) CHECK_HEAP=$(CHECK_HEAP) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" AS="$(AS)" ASFLAGS="$(ASFLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ ($(MAKE) RUNTIME="$(RUNTIME_SO)" VERSION="$(VERSION)" AS="$(AS)" ASFLAGS="$(ASFLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-shared -Wl,-z,notext" $(RUNTIME_SO))
++ ($(MAKE) RUNTIME_A="$(RUNTIME_A)" VERSION="$(VERSION)" AS="$(AS)" ASFLAGS="$(ASFLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="" $(RUNTIME_A))
diff --git a/lang/smlnj/files/do-patch-base_system_Basis_Implementation_date.sml b/lang/smlnj/files/do-patch-base_system_Basis_Implementation_date.sml
new file mode 100644
index 000000000000..d28364771f7e
--- /dev/null
+++ b/lang/smlnj/files/do-patch-base_system_Basis_Implementation_date.sml
@@ -0,0 +1,11 @@
+--- base/system/Basis/Implementation/date.sml.orig 2019-06-12 21:16:48 UTC
++++ base/system/Basis/Implementation/date.sml
+@@ -70,7 +70,7 @@ structure Date : DATE =
+ = wrap (CInterface.c_function "SMLNJ-Date" "strfTime")
+
+ (* conversions between integer numbers of seconds (used by runtime) and Time.time values *)
+- fun nsToTime s = Time.fromSeconds (Word64.toLargeInt s)
++ fun nsToTime s = Time.fromNanoseconds (Word64.toLargeInt s)
+ fun timeToNs t = Word64.fromLargeInt (Time.toNanoseconds t)
+
+ val localTime = localTime' o timeToNs
diff --git a/lang/smlnj/files/do-patch-eXene_lib_protocol_xreply.sml b/lang/smlnj/files/do-patch-eXene_lib_protocol_xreply.sml
deleted file mode 100644
index e64fd65b29b7..000000000000
--- a/lang/smlnj/files/do-patch-eXene_lib_protocol_xreply.sml
+++ /dev/null
@@ -1,11 +0,0 @@
---- eXene/lib/protocol/xreply.sml.orig 2006-03-03 03:33:16 UTC
-+++ eXene/lib/protocol/xreply.sml
-@@ -51,7 +51,7 @@ structure XReply =
- fun get32 (s, i) = Word32.fromLargeWord(PackWord32Big.subVec(s, i div 4))
- fun getSigned32 (s, i) =
- Int32.fromLarge(LargeWord.toLargeInt(PackWord32Big.subVecX(s, i div 4)))
-- fun getWord (s, i) = Word.fromLargeWord(get32(s, i))
-+ fun getWord (s, i) = Word.fromLargeWord(PackWord32Big.subVec(s, i div 4))
- fun getInt (s, i) = LargeWord.toIntX(PackWord32Big.subVecX(s, i div 4))
-
- val w8vextract = Word8VectorSlice.vector o Word8VectorSlice.slice
diff --git a/lang/smlnj/files/do-patch-eXene_lib_protocol_xrequest.sml b/lang/smlnj/files/do-patch-eXene_lib_protocol_xrequest.sml
deleted file mode 100644
index 98131746c5b5..000000000000
--- a/lang/smlnj/files/do-patch-eXene_lib_protocol_xrequest.sml
+++ /dev/null
@@ -1,11 +0,0 @@
---- eXene/lib/protocol/xrequest.sml.orig 2005-11-07 23:03:18 UTC
-+++ eXene/lib/protocol/xrequest.sml
-@@ -84,7 +84,7 @@ structure XRequest =
- putSigned16(buf, i+8, border))
-
- fun putTS (buf, i, XTy.CurrentTime) = put32(buf, i, 0w0)
-- | putTS (buf, i, XTy.TimeStamp(XTime.XT t)) = put32(buf, i, t)
-+ | putTS (buf, i, XTy.TimeStamp(XTime.XT t)) = put32(buf, i, Word32.toLarge t)
-
- fun putRGB (buf, i, XTy.RGB{red, green, blue}) = (
- putWord16(buf, i, red);
diff --git a/lang/smlnj/files/do-patch-eXene_lib_protocol_xsendevt.sml b/lang/smlnj/files/do-patch-eXene_lib_protocol_xsendevt.sml
deleted file mode 100644
index fbde34b46486..000000000000
--- a/lang/smlnj/files/do-patch-eXene_lib_protocol_xsendevt.sml
+++ /dev/null
@@ -1,11 +0,0 @@
---- eXene/lib/protocol/xsendevt.sml.orig 2005-11-02 22:24:39 UTC
-+++ eXene/lib/protocol/xsendevt.sml
-@@ -46,7 +46,7 @@ structure XSendEvent =
- | putAtomOption (buf, i, SOME(XTy.XAtom n)) = putWord32 (buf, i, n)
-
- fun putTS (buf, i, XTy.CurrentTime) = put32(buf, i, 0w0)
-- | putTS (buf, i, XTy.TimeStamp(XTime.XT t)) = put32(buf, i, t)
-+ | putTS (buf, i, XTy.TimeStamp(XTime.XT t)) = put32(buf, i, Word32.toLarge t)
-
- (* event codes *)
- val evtKeyPressXEvt = 0w2 : Word8.word
diff --git a/lang/smlnj/files/patch-config___arch-n-opsys b/lang/smlnj/files/patch-config___arch-n-opsys
deleted file mode 100644
index 3d9ca98a4c99..000000000000
--- a/lang/smlnj/files/patch-config___arch-n-opsys
+++ /dev/null
@@ -1,11 +0,0 @@
---- config/_arch-n-opsys.orig 2019-05-31 12:15:03 UTC
-+++ config/_arch-n-opsys
-@@ -97,6 +97,8 @@ case `uname -s` in
- HEAP_OPSYS=bsd
- case `uname -m` in
- *86) ARCH=x86;;
-+ # Fall back to x86 compatibility mode.
-+ amd64) ARCH=x86;;
- *) exit 1;;
- esac
- ;;
diff --git a/lang/smlnj/files/patch-config___heap2exec b/lang/smlnj/files/patch-config___heap2exec
deleted file mode 100644
index a7cc36507053..000000000000
--- a/lang/smlnj/files/patch-config___heap2exec
+++ /dev/null
@@ -1,33 +0,0 @@
---- config/_heap2exec.orig 2019-05-31 12:36:14 UTC
-+++ config/_heap2exec
-@@ -89,6 +89,7 @@ SO_LIBS=
- A_PROG=
- A_FLAGS=
- A_LIBS=
-+AS_FLAGS=
-
- case ${OPSYS} in
- darwin)
-@@ -102,6 +103,13 @@ case ${OPSYS} in
- A_PROG=${CC}
- A_FLAGS=-Wl,--export-dynamic
- A_LIBS=-lm
-+ case `uname -m` in
-+ amd64)
-+ SO_FLAGS="${SO_FLAGS} -m32"
-+ A_FLAGS="${A_FLAGS} -m32"
-+ AS_FLAGS="${AS_FLAGS} -m32"
-+ ;;
-+ esac
- ;;
- linux)
- SO_PROG=${CC}
-@@ -122,7 +130,7 @@ fi
- RESULT=0
- if ${H2A} "$heapfile" "$execfile".s ; then
- if [ -f "$execfile".s ] ; then
-- if ${CC} -c -o "$execfile".o "$execfile".s ; then
-+ if ${CC} -c ${AS_FLAGS} -o "$execfile".o "$execfile".s ; then
- rm "$execfile".s
- else
- rm "$execfile".s
diff --git a/lang/smlnj/files/patch-config_install.sh b/lang/smlnj/files/patch-config_install.sh
index b447053ed3f9..c5b35e6f34c7 100644
--- a/lang/smlnj/files/patch-config_install.sh
+++ b/lang/smlnj/files/patch-config_install.sh
@@ -1,7 +1,7 @@
---- config/install.sh.orig 2019-05-31 12:15:03 UTC
+--- config/install.sh.orig 2019-11-23 16:06:59 UTC
+++ config/install.sh
-@@ -17,6 +17,8 @@ else
- nolib=false
+@@ -56,11 +56,36 @@ if [ x"$SIZE_OPT" = x ] ; then
+ SIZE_OPT="-"$DEFAULT_SIZE
fi
+[ -n "$RECOMPILEDIR" ] && echo "RECOMPILEDIR=$RECOMPILEDIR"
@@ -9,13 +9,12 @@
if [ x${INSTALL_QUIETLY} = xtrue ] ; then
export CM_VERBOSE
CM_VERBOSE=false
-@@ -37,6 +39,28 @@ complain() {
- exit 1
- }
+ fi
+#
+# do_patch patch-file
+# apply a patch file
++#
+do_patch() {
+ patchfile=$FILESDIR/$1
+
@@ -35,10 +34,10 @@
+ fi
+}
+
- this=$0
-
-
-@@ -96,7 +120,28 @@ trap 'cd "$ROOT"; rm -f $tmpfiles' 0 1 2 3 15
+ vsay() {
+ if [ x${INSTALL_DEBUG} = xtrue ] ; then
+ echo "$@"
+@@ -128,7 +153,28 @@ trap 'cd "$ROOT"; rm -f $tmpfiles' 0 1 2 3 15
# Especially important is CM_PATHCONFIG.
#
export CM_PATHCONFIG
@@ -68,7 +67,7 @@
#
# the release version that we are installing
#
-@@ -371,7 +416,12 @@ esac
+@@ -403,7 +449,12 @@ esac
# the name of the bin files directory
#
BOOT_ARCHIVE=boot.$ARCH-unix
@@ -82,7 +81,7 @@
#
# build the run-time system
-@@ -380,9 +430,15 @@ if [ -x "$RUNDIR"/run.$ARCH-$OPSYS ]; then
+@@ -412,9 +463,15 @@ if [ -x "$RUNDIR"/run.$ARCH-$OPSYS ]; then
vsay $this: Run-time system already exists.
else
"$CONFIGDIR"/unpack "$ROOT" runtime
@@ -99,7 +98,7 @@
if [ -x run.$ARCH-$OPSYS ]; then
mv run.$ARCH-$OPSYS "$RUNDIR"
if [ -f runx.$ARCH-$OPSYS ]; then
-@@ -394,7 +450,7 @@ else
+@@ -426,7 +483,7 @@ else
if [ -f run.$ARCH-$OPSYS.a ]; then
mv run.$ARCH-$OPSYS.a "$RUNDIR"
fi
@@ -108,7 +107,7 @@
else
complain "$this: !!! Run-time system build failed for some reason."
fi
-@@ -420,7 +476,7 @@ if [ -r "$HEAPDIR"/sml.$HEAP_SUFFIX ]; then
+@@ -452,7 +509,7 @@ if [ -r "$HEAPDIR"/sml.$HEAP_SUFFIX ]; then
complain "$this !!! Unable to re-create heap image (sml.$HEAP_SUFFIX)."
fi
else
@@ -117,7 +116,7 @@
fish "$ROOT"/"$BOOT_FILES"/smlnj/basis
-@@ -455,7 +511,7 @@ else
+@@ -487,7 +544,7 @@ else
cd "$ROOT"/"$BOOT_FILES"
for anchor in * ; do
if [ -d $anchor ] ; then
@@ -126,7 +125,7 @@
move $anchor "$LIBDIR"/$anchor
fi
done
-@@ -478,6 +534,18 @@ installdriver _ml-build ml-build
+@@ -510,6 +567,18 @@ installdriver _ml-build ml-build
cd "$ROOT"
@@ -145,7 +144,7 @@
#
# Now do all the rest using the precompiled installer
# (see base/system/smlnj/installer for details)
-@@ -487,6 +555,12 @@ if [ $nolib = false ] ; then
+@@ -519,6 +588,12 @@ if [ $nolib = false ] ; then
export ROOT INSTALLDIR CONFIGDIR BINDIR
CM_TOLERATE_TOOL_FAILURES=true
export CM_TOLERATE_TOOL_FAILURES
@@ -155,10 +154,10 @@
+ # propagated to the resulting heaps because the heaps generated
+ # in this stage don't contain the compiler.
+ [ -z "$STAGEDIR" ] || CM_PATHCONFIG=$CM_LOCAL_PATHCONFIG
- if "$BINDIR"/sml -m \$smlnj/installer.cm
+ if "$BINDIR"/sml $SIZE_OPT -m \$smlnj/installer.cm
then
vsay $this: Installation complete.
-@@ -494,5 +568,20 @@ if [ $nolib = false ] ; then
+@@ -526,5 +601,20 @@ if [ $nolib = false ] ; then
complain "$this: !!! Installation of libraries and programs failed."
fi
fi
diff --git a/lang/smlnj/files/patch-config_unpack b/lang/smlnj/files/patch-config_unpack
index be387fc4e14d..e53f3531c3d6 100644
--- a/lang/smlnj/files/patch-config_unpack
+++ b/lang/smlnj/files/patch-config_unpack
@@ -1,4 +1,4 @@
---- config/unpack.orig 2016-08-04 14:38:24 UTC
+--- config/unpack.orig 2019-10-28 14:53:16 UTC
+++ config/unpack
@@ -291,6 +291,9 @@ do
# cd $ROOT/doc