summaryrefslogtreecommitdiff
path: root/lang/mlton/files
diff options
context:
space:
mode:
Diffstat (limited to 'lang/mlton/files')
-rw-r--r--lang/mlton/files/add-local-cross18
-rw-r--r--lang/mlton/files/patch-..-mlton-bootstrap-lib-mlton-include-cenv.h11
-rw-r--r--lang/mlton/files/patch-Makefile23
-rw-r--r--lang/mlton/files/patch-bin-mlton_script18
-rw-r--r--lang/mlton/files/patch-mlton-Makefile11
-rw-r--r--lang/mlton/files/patch-runtime-Makefile71
-rw-r--r--lang/mlton/files/patch-runtime-cenv.h11
-rw-r--r--lang/mlton/files/patch-runtime-mingw.c43
-rw-r--r--lang/mlton/files/patch-runtime-mingw.h20
9 files changed, 46 insertions, 180 deletions
diff --git a/lang/mlton/files/add-local-cross b/lang/mlton/files/add-local-cross
index 01bc3ef4d942..c76d482ddd5c 100644
--- a/lang/mlton/files/add-local-cross
+++ b/lang/mlton/files/add-local-cross
@@ -101,24 +101,19 @@ $MAKE -C runtime COMPILE_FAST=yes OMIT_BYTECODE=yes TARGET=$crossTarget \
echo "* Running make dirs runtime in $tmp."
$MAKE TARGET=$crossTarget TARGET_ARCH=$crossArch TARGET_OS=$crossOS dirs runtime
-echo "* Copy from tmp to build (build/lib/$crossTarget)."
+echo "* Copy from tmp to build (build/lib/targets/$crossTarget)."
# ssh $machine "cd $tmp/build/lib/self && tar cf - ." |
# ( cd "$lib/$crossTarget" && tar xf - )
-cp -pfR "$tmp/build/lib/$crossTarget" "$lib/"
+mkdir -p "$lib/targets"
+cp -pfR "$tmp/build/lib/targets/$crossTarget" "$lib/targets/"
-echo "* Copy from $crossArch-$crossOS (basis-library/config/c/$crossArch-crossOS)."
-#ssh $machine "cd $tmp/basis-library/config/c && tar cf - $crossArch-$crossOS" |
-# ( cd "$lib/sml/basis/config/c" && tar xf - )
-cp -pfR "$tmp/basis-library/config/c/$crossArch-$crossOS" \
- "$lib/sml/basis/config/c/"
-
-echo "* Running make mlbpathmap targetmap in $src."
+echo "* Running make mlbpathmap in $src."
#( cd "$src" &&
# mmake TARGET=$crossTarget TARGET_ARCH=$crossArch TARGET_OS=$crossOS \
# mlbpathmap targetmap )
cd "$src"
$MAKE TARGET=$crossTarget TARGET_ARCH=$crossArch TARGET_OS=$crossOS \
- mlbpathmap targetmap
+ mlbpathmap
case "$crossOS" in
mingw)
@@ -191,7 +186,6 @@ cd "$tmp/runtime/"
$GCC $archOpts $osOpts -I. -o $exe $exe.c libmlton.a libgdtoa.a -lgmp -lm $libs
#ssh $machine "$tmp/runtime/$exe$suf" >"$lib/$crossTarget/constants"
-$RUN "$tmp/runtime/$exe$suf" > "$lib/$crossTarget/constants"
+$RUN "$tmp/runtime/$exe$suf" > "$lib/targets/$crossTarget/constants"
#ssh $machine "rm -rf $tmp"
# rm -rf "$tmp"
-
diff --git a/lang/mlton/files/patch-..-mlton-bootstrap-lib-mlton-include-cenv.h b/lang/mlton/files/patch-..-mlton-bootstrap-lib-mlton-include-cenv.h
deleted file mode 100644
index d2284f1c914b..000000000000
--- a/lang/mlton/files/patch-..-mlton-bootstrap-lib-mlton-include-cenv.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ../mlton-bootstrap/lib/mlton/include/cenv.h.orig 2007-11-24 15:52:08.000000000 +0100
-+++ ../mlton-bootstrap/lib/mlton/include/cenv.h 2010-06-22 12:36:33.111364813 +0200
-@@ -116,7 +116,7 @@
- #error unknown platform arch
- #endif
-
--#include "gmp.h"
-+#include "/usr/local/include/gmp.h"
-
- COMPILE_TIME_ASSERT(sizeof_uintptr_t__is__sizeof_voidStar,
- sizeof(uintptr_t) == sizeof(void*));
diff --git a/lang/mlton/files/patch-Makefile b/lang/mlton/files/patch-Makefile
index 7a88aa70a2c1..96c0aa5633c1 100644
--- a/lang/mlton/files/patch-Makefile
+++ b/lang/mlton/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig 2007-08-27 07:04:14.000000000 +1000
-+++ Makefile 2008-04-28 10:23:28.000000000 +1000
+--- Makefile.orig 2010-06-11 06:35:30.000000000 -0700
++++ Makefile 2013-03-25 20:23:46.000000000 -0700
@@ -34,7 +34,11 @@
PATH := $(BIN):$(SRC)/bin:$(shell echo $$PATH)
CP := /bin/cp -fpR
@@ -12,11 +12,14 @@
# If we're compiling with another version of MLton, then we want to do
# another round of compilation so that we get a MLton built without
-@@ -410,6 +414,7 @@
- install-no-docs:
- mkdir -p "$(TLIB)" "$(TBIN)" "$(TMAN)"
- $(CP) "$(LIB)/." "$(TLIB)/"
-+ -rm "$(TLIB)/mlton.x86-bsd"
- sed "/^lib=/s;.*;lib='$(prefix)/$(ULIB)';" \
- <"$(BIN)/mlton" >"$(TBIN)/mlton"
- chmod a+x "$(TBIN)/mlton"
+@@ -401,6 +405,10 @@
+ cd "$(TLIB)/sml"; for i in */[Dd]oc; do mv "$$i" "$(TDOC)/$$i"; done
+ cd "$(TLIB)/sml"; for i in */README*; do mv "$$i" "$(TDOC)/$$i"; done
+
++remove-docs:
++ cd "$(TLIB)/sml"; for i in */[Dd]oc; do rm -rf "$$i"; done
++ cd "$(TLIB)/sml"; for i in */README*; do rm -rf "$$i"; done
++
+ .PHONY: release
+ release: version
+ tar cvzf ../mlton-$(VERSION).tar.gz \
diff --git a/lang/mlton/files/patch-bin-mlton_script b/lang/mlton/files/patch-bin-mlton_script
deleted file mode 100644
index 88f9a5bb587a..000000000000
--- a/lang/mlton/files/patch-bin-mlton_script
+++ /dev/null
@@ -1,18 +0,0 @@
---- bin/mlton-script.orig 2008-04-22 21:15:23.000000000 +1000
-+++ bin/mlton-script 2008-04-22 21:18:33.000000000 +1000
-@@ -19,14 +19,7 @@
- mlton="$lib/mlton-compile$exe"
- world="$lib/world.mlton"
- nj='sml'
--# Try to use the SML/NJ .arch-n-opsys
--if .arch-n-opsys >/dev/null 2>&1; then
-- eval `.arch-n-opsys`
-- njHeap="$lib/mlton.$HEAP_SUFFIX"
-- unset `.arch-n-opsys | sed 's#=[^ ]*##g'`
--else
-- njHeap="$lib/mlton.$HOST_ARCH-$HOST_OS"
--fi
-+njHeap="$lib/mlton.x86-bsd"
-
- declare -a rargs
- case "$1" in
diff --git a/lang/mlton/files/patch-mlton-Makefile b/lang/mlton/files/patch-mlton-Makefile
deleted file mode 100644
index ed38b322df28..000000000000
--- a/lang/mlton/files/patch-mlton-Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- mlton/Makefile.orig 2007-12-22 22:09:47.000000000 +0100
-+++ mlton/Makefile 2007-12-22 22:09:56.000000000 +0100
-@@ -18,7 +18,7 @@
- UP := upgrade-basis.sml
- PATH := $(BIN):$(shell echo $$PATH)
-
--FLAGS := @MLton ram-slop 0.7 gc-summary $(RUNTIME_ARGS) --
-+FLAGS := @MLton max-heap 680m gc-summary $(RUNTIME_ARGS) --
-
- ifeq (self, $(shell if [ -x "$(BIN)/mlton" ]; then echo self; fi))
- # We're compiling MLton with itself, so don't use any stubs.
diff --git a/lang/mlton/files/patch-runtime-Makefile b/lang/mlton/files/patch-runtime-Makefile
index 4c4ed2be0b86..c0ec8cd04ca4 100644
--- a/lang/mlton/files/patch-runtime-Makefile
+++ b/lang/mlton/files/patch-runtime-Makefile
@@ -1,7 +1,7 @@
---- runtime/Makefile.orig 2007-08-27 07:03:54.000000000 +1000
-+++ runtime/Makefile 2008-04-28 10:19:06.000000000 +1000
-@@ -11,11 +11,24 @@
- TARGET := self
+--- runtime/Makefile.orig 2010-06-11 06:35:14.000000000 -0700
++++ runtime/Makefile 2013-03-06 19:55:56.000000000 -0800
+@@ -23,6 +23,19 @@
+
TARGET_ARCH := $(shell ../bin/host-arch)
TARGET_OS := $(shell ../bin/host-os)
+
@@ -18,67 +18,50 @@
+endif
+
GCC_MAJOR_VERSION := \
-- $(shell gcc -v 2>&1 | grep 'gcc version' | \
-+ $(shell $(GCC) -v 2>&1 | grep 'gcc version' | \
+ $(shell $(CC) -v 2>&1 | grep 'gcc version' | \
sed 's/.*gcc version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/')
- GCC_MINOR_VERSION := \
-- $(shell gcc -v 2>&1 | grep 'gcc version' | \
-+ $(shell $(GCC) -v 2>&1 | grep 'gcc version' | \
- sed 's/.*gcc version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/')
- GCC_VERSION := $(GCC_MAJOR_VERSION).$(GCC_MINOR_VERSION)
-
-@@ -96,10 +109,9 @@
- else
- AR := $(TARGET)-ar rc
- RANLIB := $(TARGET)-ranlib
--FLAGS += -b $(TARGET)
- endif
-
--CC := gcc -std=gnu99
-+CC := $(GCC) -std=gnu99
- CPPFLAGS :=
- CFLAGS := -I. -Iplatform $(FLAGS)
- OPTCFLAGS := $(CFLAGS) $(CPPFLAGS) $(OPTFLAGS)
-@@ -247,7 +259,7 @@
- cd gdtoa && $(CC) -o arithchk.out arithchk.c
+@@ -292,7 +305,7 @@
+ cd gdtoa && $(CC) $(OPTCFLAGS) $(OPTWARNCFLAGS) -w -O1 -o arithchk.out arithchk.c
gdtoa/arith.h: gdtoa/arithchk.out
- cd gdtoa && ./arithchk.out >arith.h
+ cd gdtoa && $(RUN) ./arithchk.out >arith.h
- libmlton.a: $(OBJS)
- $(AR) libmlton.a $(OBJS)
-@@ -265,7 +277,7 @@
- gen/c-types.h gen/c-types.sml gen/ml-types.h: gen/gen-types.c util.h util.o
+ gdtoa/%-pic.o: gdtoa/%.c gdtoa/arith.h
+ $(CC) $(PICCFLAGS) $(PICWARNCFLAGS) -w -DINFNAN_CHECK -c -o $@ $<
+@@ -322,7 +335,7 @@
+ gen/gen-types.stamp: gen/gen-types.c util.h util.o
$(CC) $(OPTCFLAGS) $(WARNCFLAGS) -o gen/gen-types gen/gen-types.c util.o
- rm -f gen/c-types.h gen/c-types.sml gen/ml-types.h
+ rm -f gen/c-types.h gen/c-types.sml gen/ml-types.h gen/gen-types.stamp
- cd gen && ./gen-types
+ cd gen && $(RUN) ./gen-types
- rm -f gen/gen-types$(EXE)
+ rm -f gen/gen-types$(EXE) gen/gen-types
+ touch $@
- c-types.h ml-types.h: gen/c-types.h gen/ml-types.h
-@@ -276,7 +288,7 @@
- gen/basis-ffi.h gen/basis-ffi.sml: gen/gen-basis-ffi.sml gen/basis-ffi.def
+@@ -333,7 +346,7 @@
+ gen/gen-basis-ffi.stamp: gen/gen-basis-ffi.sml gen/basis-ffi.def
mlton -output gen/gen-basis-ffi gen/gen-basis-ffi.sml
- rm -f gen/basis-ffi.h gen/basis-ffi.sml
+ rm -f gen/basis-ffi.h gen/basis-ffi.sml gen/gen-basis-ffi.stamp
- cd gen && ./gen-basis-ffi
+ cd gen && $(RUN) ./gen-basis-ffi
rm -f gen/gen-basis-ffi
+ touch $@
- basis-ffi.h: gen/basis-ffi.h
-@@ -286,13 +298,13 @@
- gen/sizes: gen/gen-sizes.c libmlton.a
- $(CC) $(OPTCFLAGS) $(WARNCFLAGS) -o gen/gen-sizes -I. -L. -lmlton gen/gen-sizes.c util.o
+@@ -342,7 +355,7 @@
+ gen/gen-sizes.stamp: gen/gen-sizes.c libmlton.a $(HFILES)
+ $(CC) $(OPTCFLAGS) $(WARNCFLAGS) -I. -o gen/gen-sizes gen/gen-sizes.c -L. -lmlton
rm -f gen/sizes
- cd gen && ./gen-sizes
+ cd gen && $(RUN) ./gen-sizes
- rm -f gen/gen-sizes$(EXE)
+ rm -f gen/gen-sizes$(EXE) gen/gen-sizes
+ touch $@
- bytecode/opcodes: bytecode/print-opcodes.c bytecode/opcode.h
+@@ -370,7 +383,7 @@
+ bytecode/print-opcodes: bytecode/print-opcodes.c bytecode/opcode.h $(HFILES)
$(CC) $(OPTCFLAGS) $(WARNCFLAGS) -o bytecode/print-opcodes bytecode/print-opcodes.c
rm -f bytecode/opcodes
- cd bytecode && ./print-opcodes > opcodes
+ cd bytecode && $(RUN) ./print-opcodes > opcodes
- rm -f bytecode/print-opcodes$(EXE)
-
+ basis.c: $(BASISCFILES)
+ rm -f basis.c
diff --git a/lang/mlton/files/patch-runtime-cenv.h b/lang/mlton/files/patch-runtime-cenv.h
deleted file mode 100644
index 3d3ebd4d3cd2..000000000000
--- a/lang/mlton/files/patch-runtime-cenv.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- runtime/cenv.h.orig 2008-04-27 10:56:05.000000000 +1000
-+++ runtime/cenv.h 2008-04-27 10:56:20.000000000 +1000
-@@ -116,7 +116,7 @@
- #error unknown platform arch
- #endif
-
--#include "gmp.h"
-+#include "/usr/local/include/gmp.h"
-
- COMPILE_TIME_ASSERT(sizeof_uintptr_t__is__sizeof_voidStar,
- sizeof(uintptr_t) == sizeof(void*));
diff --git a/lang/mlton/files/patch-runtime-mingw.c b/lang/mlton/files/patch-runtime-mingw.c
deleted file mode 100644
index 2d1aaa9be883..000000000000
--- a/lang/mlton/files/patch-runtime-mingw.c
+++ /dev/null
@@ -1,43 +0,0 @@
---- runtime/platform/mingw.c.orig 2008-04-27 11:10:10.000000000 +1000
-+++ runtime/platform/mingw.c 2008-04-27 11:10:33.000000000 +1000
-@@ -54,40 +54,6 @@
- }
-
- /* ------------------------------------------------- */
--/* Date */
--/* ------------------------------------------------- */
--
--#ifndef __GNUC__
--#define EPOCHFILETIME (116444736000000000i64)
--#else
--#define EPOCHFILETIME (116444736000000000LL)
--#endif
--
--/* Based on notes by Wu Yongwei:
-- * http://mywebpage.netscape.com/yongweiwutime.htm
-- */
--int gettimeofday (struct timeval *tv, struct timezone *tz) {
-- FILETIME ft;
-- LARGE_INTEGER li;
-- __int64 t;
-- static bool tzInit = FALSE;
--
-- unless (tzInit) {
-- tzInit = TRUE;
-- _tzset();
-- }
-- GetSystemTimeAsFileTime (&ft);
-- li.LowPart = ft.dwLowDateTime;
-- li.HighPart = ft.dwHighDateTime;
-- t = li.QuadPart;
-- t -= EPOCHFILETIME;
-- t /= 10;
-- tv->tv_sec = (long)(t / 1000000);
-- tv->tv_usec = (long)(t % 1000000);
-- return 0;
--}
--
--/* ------------------------------------------------- */
- /* MLton.Itimer */
- /* ------------------------------------------------- */
-
diff --git a/lang/mlton/files/patch-runtime-mingw.h b/lang/mlton/files/patch-runtime-mingw.h
deleted file mode 100644
index fa5e0f317ccf..000000000000
--- a/lang/mlton/files/patch-runtime-mingw.h
+++ /dev/null
@@ -1,20 +0,0 @@
---- runtime/platform/mingw.h.orig 2008-04-27 10:54:07.000000000 +1000
-+++ runtime/platform/mingw.h 2008-04-27 10:54:19.000000000 +1000
-@@ -85,17 +85,6 @@
- #define SHUT_RDWR SD_BOTH
-
- /* ------------------------------------------------- */
--/* Date */
--/* ------------------------------------------------- */
--
--struct timezone {
-- int tz_dsttime;
-- int tz_minuteswest;
--};
--
--int gettimeofday (struct timeval *tv, struct timezone *tz);
--
--/* ------------------------------------------------- */
- /* MLton.Itimer */
- /* ------------------------------------------------- */
-