Fix and supress some warnings, and turn on -Werror when validating
[ghc-hetmet.git] / rts / Makefile
index 9af9671..4e1c915 100644 (file)
@@ -156,6 +156,12 @@ else
 DQ = \"
 endif
 
+# If Main.c is built with optimisation then the SEH exception stuff on
+# Windows gets confused.
+# This has to be in HC rather than CC opts, as otherwise there's a
+# -optc-O2 that comes after it.
+Main_HC_OPTS += -optc-O0
+
 RtsMessages_CC_OPTS += -DProjectVersion=$(DQ)$(ProjectVersion)$(DQ)
 RtsUtils_CC_OPTS += -DProjectVersion=$(DQ)$(ProjectVersion)$(DQ)
 RtsUtils_CC_OPTS += -DRtsWay=$(DQ)rts$(_way)$(DQ)
@@ -165,6 +171,16 @@ RtsUtils_CC_OPTS += -DTargetPlatform=$(DQ)$(TARGETPLATFORM)$(DQ)
 RtsUtils_CC_OPTS += -DGhcUnregisterised=$(DQ)$(GhcUnregisterised)$(DQ)
 RtsUtils_CC_OPTS += -DGhcEnableTablesNextToCode=$(DQ)$(GhcEnableTablesNextToCode)$(DQ)
 
+StgCRun_CC_OPTS += -w
+Typeable_CC_OPTS += -w
+RetainerProfile_CC_OPTS += -w
+sm/Compact_CC_OPTS += -w
+# The above warning supression flags are a temporary kludge.
+# While working on this module you are encouraged to remove it and fix
+# any warnings in the module. See
+#     http://hackage.haskell.org/trac/ghc/wiki/WorkingConventions#Warnings
+# for details
+
 ifeq "$(way)" "mp"
 SRC_HC_OPTS += -I$$PVM_ROOT/include
 endif