[MLton-commit] r4067
Matthew Fluet
MLton@mlton.org
Mon, 5 Sep 2005 13:35:43 -0700
Control model from Makefile
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/Makefile
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/model.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/Makefile 2005-09-05 11:30:09 UTC (rev 4066)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/Makefile 2005-09-05 20:35:42 UTC (rev 4067)
@@ -21,12 +21,14 @@
else
FLAGS += -malign-loops=2 -malign-jumps=2 -malign-functions=5
endif
-MODELS = A
+DEFAULT_MODEL = A
+ALL_MODELS = A
endif
ifeq ($(TARGET_ARCH), amd64)
FLAGS += -mtune=opteron
-MODELS = A AX B BX C CX G
+DEFAULT_MODEL = BX
+ALL_MODELS = A AX B BX C CX G
endif
ifeq ($(TARGET_ARCH), sparc)
@@ -82,10 +84,10 @@
all: gc.o gc-gdb.o
gc-gdb.o: gc.c gc.h
- $(CC) $(DEBUGFLAGS) -O1 -DASSERT=1 -c -o $@ gc.c
+ $(CC) $(DEBUGFLAGS) -DGC_MODEL_$(DEFAULT_MODEL) -O1 -DASSERT=1 -c -o $@ gc.c
gc.o: gc.c gc.h
- $(CC) $(CFLAGS) -c -o $@ gc.c
+ $(CC) $(CFLAGS) -DGC_MODEL_$(DEFAULT_MODEL) -c -o $@ gc.c
gc.c: $(CFILES)
rm -f gc.c
@@ -108,7 +110,7 @@
.PHONY: models
models: gc.c gc.h
( \
- for m in $(MODELS); do \
+ for m in $(ALL_MODELS); do \
$(CC) $(CFLAGS) -DGC_MODEL_$$m -c -o gc.$$m.o gc.c; \
$(CC) $(CFLAGS) $(DEBUGFLAGS) -O1 -DASSERT=1 -DGC_MODEL_$$m -c -o gc-gdb.$$m.o gc.c; \
done; \
@@ -116,4 +118,4 @@
.PHONY: clean
clean:
- ../bin/clean
+ ../../bin/clean
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/model.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/model.h 2005-09-05 11:30:09 UTC (rev 4066)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/model.h 2005-09-05 20:35:42 UTC (rev 4067)
@@ -135,8 +135,6 @@
manageable set for users.
*/
-#define GC_MODEL_G
-
#if (defined (GC_MODEL_A))
#define GC_MODEL_BITSIZE 32
#define GC_MODEL_SHIFT 0