[MLton-commit] r4834

Matthew Fluet fluet at mlton.org
Sat Nov 18 19:02:09 PST 2006


Adam Goode's patch for passing distribution policy flags to compilation of runtime
----------------------------------------------------------------------

U   mlton/trunk/bytecode/Makefile
U   mlton/trunk/runtime/Makefile

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

Modified: mlton/trunk/bytecode/Makefile
===================================================================
--- mlton/trunk/bytecode/Makefile	2006-11-17 22:45:01 UTC (rev 4833)
+++ mlton/trunk/bytecode/Makefile	2006-11-19 03:02:09 UTC (rev 4834)
@@ -20,8 +20,9 @@
 DEBUGFLAGS += -g2
 
 ifeq ($(TARGET_ARCH), amd64)
-CFLAGS += -mtune=opteron -m32 
-endif 
+CFLAGS += -m32
+OPTFLAGS += -mtune=opteron
+endif
 
 ifeq ($(TARGET_OS), darwin)
 CFLAGS += -I/sw/include
@@ -32,13 +33,14 @@
 endif
 
 interpret.o: interpret.c interpret.h opcode.h
-	$(CC) $(CFLAGS) -c -O2 interpret.c
+	$(CC) $(CFLAGS) -c -O2 $(OPTFLAGS) interpret.c
 
 interpret-gdb.o: interpret.c interpret.h
 	$(CC) $(DEBUGFLAGS) -c -o $@ -DASSERT=1 interpret.c
 
 print-opcodes: print-opcodes.c opcode.h
-	$(CC) $(CFLAGS) -o print-opcodes -I../runtime -L../runtime	\
+	$(CC) $(CFLAGS) $(OPTFLAGS) -o print-opcodes \
+		-I../runtime -L../runtime	\
 		print-opcodes.c -lmlton
 
 .PHONY: clean

Modified: mlton/trunk/runtime/Makefile
===================================================================
--- mlton/trunk/runtime/Makefile	2006-11-17 22:45:01 UTC (rev 4833)
+++ mlton/trunk/runtime/Makefile	2006-11-19 03:02:09 UTC (rev 4834)
@@ -13,18 +13,20 @@
 TARGET_OS = $(shell ../bin/host-os)
 GCC_VERSION = $(shell gcc -v 2>&1 | grep 'gcc version' | sed 's/.*gcc version \(.\).*/\1/')
 
-FLAGS = -fomit-frame-pointer
+FLAGS =
+OPTFLAGS = -fomit-frame-pointer
 
 ifeq ($(TARGET_ARCH), x86)
 ifneq ($(findstring $(GCC_VERSION), 3 4),)
-FLAGS += -falign-loops=2 -falign-jumps=2 -falign-functions=5
+OPTFLAGS += -falign-loops=2 -falign-jumps=2 -falign-functions=5
 else
-FLAGS += -malign-loops=2 -malign-jumps=2 -malign-functions=5
+OPTFLAGS += -malign-loops=2 -malign-jumps=2 -malign-functions=5
 endif
 endif
 
 ifeq ($(TARGET_ARCH), amd64)
-FLAGS += -mtune=opteron -m32
+FLAGS += -m32
+OPTFLAGS += -mtune=opteron
 endif
 
 ifeq ($(TARGET_ARCH), sparc)
@@ -53,7 +55,7 @@
 endif
 
 CC = gcc -std=gnu99
-CFLAGS = -O2 -Wall -I. -Iplatform -D_FILE_OFFSET_BITS=64 $(FLAGS)
+CFLAGS = -O2 -Wall -I. -Iplatform -D_FILE_OFFSET_BITS=64 $(FLAGS) $(OPTFLAGS)
 DEBUGFLAGS = $(CFLAGS)
 ifneq ($(TARGET_ARCH), ia64)
 ifneq ($(TARGET_ARCH), powerpc)




More information about the MLton-commit mailing list