[project @ 2005-09-12 00:10:09 by wolfgang]
[ghc-hetmet.git] / ghc / rts / Makefile
index ac689a9..510bd9e 100644 (file)
@@ -58,11 +58,13 @@ EXCLUDED_SRCS += Main.c
 endif
 
 # This file ends up being empty unless we're building for a powerpc
-# system, and it is reported that Solaris ld chokes on it when building
-# HSrts.o.
+# or darwin system, and it is reported that Solaris ld chokes on it when
+# building HSrts.o.
 ifeq "$(findstring $(TargetArch_CPP), powerpc powerpc64)" ""
+ifeq "$(findstring $(TargetOS_CPP), darwin)" ""
 EXCLUDED_SRCS += AdjustorAsm.S
 endif
+endif
 
 EXCLUDED_SRCS += parallel/SysMan.c
 
@@ -326,7 +328,11 @@ ifeq "$(Windows)" "YES"
 PrimOps_HC_OPTS += -\#include '<windows.h>' -\#include win32/AsyncIO.h
 endif
 
-GC_HC_OPTS += -optc-O3
+# -O3 helps unroll some loops (especially in copy() with a constant argument).
+# -fno-strict-aliasing is a hack because we often mix StgPtr and StgClosure pointers
+# to the same object, and gcc will assume these don't alias.  eg. it happens in
+# copy() with gcc 3.4.3, the upd_evacee() assigments get moved before the object copy.
+GC_HC_OPTS += -optc-O3 -optc-fno-strict-aliasing
 
 # Cmm must be compiled via-C for now, because the NCG can't handle loops
 SRC_HC_OPTS += -fvia-C