[MLton-commit] r4907

Matthew Fluet fluet at mlton.org
Wed Dec 6 13:26:33 PST 2006


Merge trunk revisions 4900:4906 into x86_64 branch
----------------------------------------------------------------------

U   mlton/branches/on-20050822-x86_64-branch/bin/mlton-script
U   mlton/branches/on-20050822-x86_64-branch/bin/regression
U   mlton/branches/on-20050822-x86_64-branch/runtime/Makefile
U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/windows.c

----------------------------------------------------------------------

Modified: mlton/branches/on-20050822-x86_64-branch/bin/mlton-script
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/mlton-script	2006-12-06 09:04:18 UTC (rev 4906)
+++ mlton/branches/on-20050822-x86_64-branch/bin/mlton-script	2006-12-06 21:26:26 UTC (rev 4907)
@@ -69,11 +69,12 @@
 
 # The darwin linker complains (loudly) about non-existent library
 # search paths.
-if [ -d '/opt/local/lib' ]; then 	 
-        darwinLinkOpts='-L/opt/local/lib'
+darwinLinkOpts=''
+if [ -d '/opt/local/lib' ]; then
+        darwinLinkOpts="$darwinLinkOpts -L/opt/local/lib"
 fi
-if [ -d '/sw/lib' ]; then 	 
-        darwinLinkOpts='$darwinLinkOpts -L/sw/lib'
+if [ -d '/sw/lib' ]; then
+        darwinLinkOpts="$darwinLinkOpts -L/sw/lib"
 fi
 
 doit "$lib" \
@@ -101,7 +102,7 @@
                 -malign-jumps=2
                 -malign-loops=2'                                 \
         -target-link-opts amd64 '-m32'                           \
-        -target-link-opts darwin '$darwinLinkOpts'               \
+        -target-link-opts darwin "$darwinLinkOpts"               \
         -target-link-opts freebsd '-L/usr/local/lib/'            \
         -target-link-opts mingw                                  \
                 '-lws2_32 -lkernel32 -lpsapi -lnetapi32'         \

Modified: mlton/branches/on-20050822-x86_64-branch/bin/regression
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/regression	2006-12-06 09:04:18 UTC (rev 4906)
+++ mlton/branches/on-20050822-x86_64-branch/bin/regression	2006-12-06 21:26:26 UTC (rev 4907)
@@ -215,7 +215,7 @@
                         fi
 			if $forMinGW; then
                                 compare="$f.sed.ok"
-                                /c/cygwin/bin/sed 's/$/\r/' <"$f.ok" >"$compare"
+                                sed $'s/$/\r/' <"$f.ok" >"$compare"
 			fi
                         if ! diff "$compare" "$tmp"; then
                                 echo "difference with ${flags[*]} ${extraFlags[*]}"

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/Makefile	2006-12-06 09:04:18 UTC (rev 4906)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/Makefile	2006-12-06 21:26:26 UTC (rev 4907)
@@ -20,6 +20,7 @@
 GCC_VERSION := $(GCC_MAJOR_VERSION).$(GCC_MINOR_VERSION)
 
 FLAGS := 
+EXE :=
 OPTFLAGS := -O2 -fomit-frame-pointer
 GCOPTFLAGS := 
 DEBUGFLAGS := 
@@ -66,6 +67,10 @@
 DEBUGFLAGS += -gstabs+
 endif
 
+ifeq ($(TARGET_OS), cygwin)
+EXE := .exe
+endif
+
 ifeq ($(TARGET_OS), darwin)
 FLAGS += -I/sw/include -I/opt/local/include
 endif
@@ -74,6 +79,10 @@
 FLAGS += -I/usr/local/include
 endif
 
+ifeq ($(TARGET_OS), mingw)
+EXE := .exe
+endif
+
 ifeq ($(TARGET_OS), netbsd)
 FLAGS += -I/usr/pkg/include
 endif
@@ -145,14 +154,15 @@
 WARNCFLAGS += -Wlong-long
 # WARNCFLAGS += -Wunreachable-code
 WARNCFLAGS += $(WARNFLAGS)
-OPTWARNCFLAGS := $(WARNCFLAGS) -Wdisabled-optimization $(OPTWARNFLAGS)
-DEBUGWARNCFLAGS := $(WARNCFLAGS) $(DEBUGWARNFLAGS)
 
 # GCC doesn't recognize the %I64 format specifier which means %ll on windows
 ifeq ($(TARGET_OS), mingw)
 WARNCFLAGS += -Wno-format -Wno-missing-format-attribute
 endif
 
+OPTWARNCFLAGS := $(WARNCFLAGS) -Wdisabled-optimization $(OPTWARNFLAGS)
+DEBUGWARNCFLAGS := $(WARNCFLAGS) $(DEBUGWARNFLAGS)
+
 UTILHFILES :=							\
 	util.h							\
 	$(shell find util -type f | grep '\.h$$')
@@ -265,7 +275,7 @@
 	$(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
 	cd gen && ./gen-types
-	rm -f gen/gen-types
+	rm -f gen/gen-types$(EXE)
 
 c-types.h ml-types.h: gen/c-types.h gen/ml-types.h
 	rm -f c-types.h ml-types.h
@@ -286,7 +296,7 @@
 	$(CC) $(OPTCFLAGS) $(WARNCFLAGS) -o bytecode/print-opcodes bytecode/print-opcodes.c
 	rm -f bytecode/opcodes
 	cd bytecode && ./print-opcodes > opcodes
-	rm -f bytecode/print-opcodes
+	rm -f bytecode/print-opcodes$(EXE)
 
 
 util-gdb.o: util.c $(UTILCFILES) cenv.h $(UTILHFILES)
@@ -345,6 +355,7 @@
 	echo GCC_MINOR_VERSION = $(GCC_MINOR_VERSION)
 	echo GCC_VERSION = $(GCC_VERSION)
 	echo FLAGS = $(FLAGS)
+	echo EXE = $(EXE)
 	echo OPTFLAGS = $(OPTFLAGS)
 	echo GCOPTFLAGS = $(GCOPTFLAGS)
 	echo DEBUGFLAGS = $(DEBUGFLAGS)

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/windows.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/windows.c	2006-12-06 09:04:18 UTC (rev 4906)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/windows.c	2006-12-06 21:26:26 UTC (rev 4907)
@@ -1,4 +1,4 @@
-iHANDLE fileDesHandle (int fd);
+HANDLE fileDesHandle (int fd);
 
 #define BUFSIZE 65536
 




More information about the MLton-commit mailing list