[MLton-commit] r6647

Matthew Fluet fluet at mlton.org
Fri Jun 6 09:42:20 PDT 2008


Only use plpa on linux
----------------------------------------------------------------------

U   mlton/branches/shared-heap-multicore/bin/mlton-script
U   mlton/branches/shared-heap-multicore/runtime/Makefile
U   mlton/branches/shared-heap-multicore/runtime/gc/garbage-collection.c

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

Modified: mlton/branches/shared-heap-multicore/bin/mlton-script
===================================================================
--- mlton/branches/shared-heap-multicore/bin/mlton-script	2008-06-06 16:10:43 UTC (rev 6646)
+++ mlton/branches/shared-heap-multicore/bin/mlton-script	2008-06-06 16:42:09 UTC (rev 6647)
@@ -82,7 +82,7 @@
         -cc-opt-quote "-I$lib/include"                           \
         -cc-opt '-O1'                                            \
         -cc-opt '-fno-strict-aliasing -fomit-frame-pointer -w'   \
-        -link-opt '-lgdtoa -lm -lgmp -lpthread -lplpa_included -lrt' \
+        -link-opt '-lgdtoa -lm -lgmp -lpthread -lrt'             \
         -mlb-path-map "$lib/mlb-path-map"                        \
         -target-as-opt amd64 '-m64'                              \
         -target-cc-opt amd64 '-m64'                              \
@@ -104,6 +104,7 @@
         -target-link-opt amd64 '-m64'                            \
         -target-link-opt darwin "$darwinLinkOpts"                \
         -target-link-opt freebsd '-L/usr/local/lib/'             \
+        -target-link-opt linux '-lplpa_included'                 \
         -target-link-opt mingw                                   \
                 '-lws2_32 -lkernel32 -lpsapi -lnetapi32'         \
         -target-link-opt netbsd                                  \

Modified: mlton/branches/shared-heap-multicore/runtime/Makefile
===================================================================
--- mlton/branches/shared-heap-multicore/runtime/Makefile	2008-06-06 16:10:43 UTC (rev 6646)
+++ mlton/branches/shared-heap-multicore/runtime/Makefile	2008-06-06 16:42:09 UTC (rev 6647)
@@ -28,6 +28,7 @@
 WARNFLAGS :=
 OPTWARNFLAGS :=
 DEBUGWARNFLAGS :=
+EXTRA_LIBS :=
 
 ifeq ($(TARGET_ARCH), amd64)
 FLAGS += -m64
@@ -82,6 +83,11 @@
 FLAGS += -I/usr/pkg/include
 endif
 
+ifeq ($(TARGET_OS), linux)
+FLAGS += -Iplpa
+EXTRA_LIBS += libplpa_included.a 
+endif
+
 ifeq ($(TARGET_OS), openbsd)
 FLAGS += -I/usr/local/include
 endif
@@ -101,7 +107,7 @@
 
 CC := gcc -std=gnu99
 CPPFLAGS := 
-CFLAGS := -I. -Iplatform -Iplpa $(FLAGS)
+CFLAGS := -I. -Iplatform $(FLAGS)
 OPTCFLAGS := $(CFLAGS) $(OPTFLAGS)
 DEBUGCFLAGS := $(CFLAGS) -DASSERT=1 $(DEBUGFLAGS)
 GCOPTCFLAGS = $(GCOPTFLAGS)
@@ -221,7 +227,7 @@
 	$(foreach f, $(basename $(BASISCFILES)), $(f)-gdb.o)
 endif
 
-ALL := libgdtoa.a libplpa_included.a libmlton.a libmlton-gdb.a
+ALL := libgdtoa.a libmlton.a libmlton-gdb.a $(EXTRA_LIBS)
 ALL += gen/c-types.sml gen/basis-ffi.sml
 ifeq ($(OMIT_BYTECODE), yes)
 else

Modified: mlton/branches/shared-heap-multicore/runtime/gc/garbage-collection.c
===================================================================
--- mlton/branches/shared-heap-multicore/runtime/gc/garbage-collection.c	2008-06-06 16:10:43 UTC (rev 6646)
+++ mlton/branches/shared-heap-multicore/runtime/gc/garbage-collection.c	2008-06-06 16:42:09 UTC (rev 6647)
@@ -181,7 +181,7 @@
   }
 
   if (DEBUG)
-    fprintf (stderr, "[GC: Filling gap between "FMTPTR" and "FMTPTR" (size = "FMTARRLEN").]\n", 
+    fprintf (stderr, "[GC: Filling gap between "FMTPTR" and "FMTPTR" (size = %zu).]\n", 
              (uintptr_t)start, (uintptr_t)end, diff);
 
   if (start) {
@@ -212,7 +212,7 @@
     else {
       assert(0 == diff);
       /* XXX */
-      fprintf (stderr, "FOUND A GAP OF "FMTARRLEN" BYTES!\n", diff);
+      fprintf (stderr, "FOUND A GAP OF %zu BYTES!\n", diff);
       exit (1);
     }
 




More information about the MLton-commit mailing list