[MLton-commit] r7109

Matthew Fluet fluet at mlton.org
Wed Jun 10 20:22:53 PDT 2009


Use Ville's trick for conditioning on gcc version >= specified version.
----------------------------------------------------------------------

U   mlton/trunk/runtime/Makefile

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

Modified: mlton/trunk/runtime/Makefile
===================================================================
--- mlton/trunk/runtime/Makefile	2009-06-11 03:22:50 UTC (rev 7108)
+++ mlton/trunk/runtime/Makefile	2009-06-11 03:22:52 UTC (rev 7109)
@@ -89,22 +89,19 @@
 
 ifeq ($(TARGET_ARCH), x86)
 FLAGS += -m32
-ifeq ($(findstring $(GCC_MAJOR_VERSION), 3 4),$(GCC_MAJOR_VERSION))
+ifeq (3, $(firstword $(sort $(GCC_MAJOR_VERSION) 3)))
 OPTFLAGS += -falign-loops=2 -falign-jumps=2 -falign-functions=5
 else
 OPTFLAGS += -malign-loops=2 -malign-jumps=2 -malign-functions=5
 endif
-ifeq ($(findstring $(GCC_VERSION), 3.3 3.4 4.0),$(GCC_VERSION))
+ifeq (3.3, $(firstword $(sort $(GCC_MAJOR_VERSION) 3.3)))
 GCOPTFLAGS += --param max-inline-insns-single=1000
-ifeq ($(findstring $(GCC_VERSION), 3.4 4.0),$(GCC_VERSION))
+ifeq (3.4, $(firstword $(sort $(GCC_MAJOR_VERSION) 3.4)))
 GCOPTFLAGS += --param inline-unit-growth=200
 GCOPTFLAGS += --param large-function-growth=2200
 OPTWARNFLAGS += -Winline
 endif
 endif
-ifeq ($(findstring $(GCC_VERSION), 4.1),$(GCC_VERSION))
-OPTWARNFLAGS += -Winline
-endif
 DEBUGFLAGS += -gstabs+
 endif
 




More information about the MLton-commit mailing list