X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FMakefile;h=7e9dc089415e4aca23703ce87e0d286eba290c79;hb=2fc88e736892981b8b2b46661ac11f14dc351bc8;hp=2bc31b38828b4fa200be1528c5f4513c57e09870;hpb=0dfcd5776f3ef89ceaafef6c4730ddac759e3716;p=ghc-hetmet.git diff --git a/rts/Makefile b/rts/Makefile index 2bc31b3..7e9dc08 100644 --- a/rts/Makefile +++ b/rts/Makefile @@ -35,6 +35,15 @@ GhcRtsHcOpts= GhcRtsCcOpts=-g -O0 endif +ifeq "$(BeConservative)" "YES" +GhcRtsCcOpts += -DBE_CONSERVATIVE +endif + +# ----------------------------------------------------------------------------- + +# There's nothing for Haddock here... +override HADDOCK_DOCS = NO + # ----------------------------------------------------------------------------- # Tells the build system not to add various Haskellish options to $(SRC_HC_OPTS) @@ -124,7 +133,7 @@ SRC_CC_OPTS += $(WARNING_OPTS) SRC_CC_OPTS += $(STANDARD_OPTS) SRC_CC_OPTS += $(GhcRtsCcOpts) -SRC_HC_OPTS += $(GhcRtsHcOpts) -package-name rts +SRC_HC_OPTS += $(GhcRtsHcOpts) $(STANDARD_OPTS) -package-name rts ifneq "$(GhcWithSMP)" "YES" SRC_CC_OPTS += -DNOSMP @@ -148,14 +157,45 @@ LIB_LD_OPTS += $(foreach libdir,$(shell $(GHC_PKG_INPLACE) field rts library-dir endif endif -RtsMessages_CC_OPTS += -DProjectVersion=\"$(ProjectVersion)\" -RtsUtils_CC_OPTS += -DProjectVersion=\"$(ProjectVersion)\" -RtsUtils_CC_OPTS += -DRtsWay=\"rts$(_way)\" -RtsUtils_CC_OPTS += -DHostPlatform=\"$(HOSTPLATFORM)\" -RtsUtils_CC_OPTS += -DBuildPlatform=\"$(BUILDPLATFORM)\" -RtsUtils_CC_OPTS += -DTargetPlatform=\"$(TARGETPLATFORM)\" -RtsUtils_CC_OPTS += -DGhcUnregisterised=\"$(GhcUnregisterised)\" -RtsUtils_CC_OPTS += -DGhcEnableTablesNextToCode=\"$(GhcEnableTablesNextToCode)\" +ifeq "$(Windows)" "YES" +# On Windows GHC does its own commandline parsing, so we need extra +# doublequote protection. Sigh. +DQ = \\\" +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) +RtsUtils_CC_OPTS += -DHostPlatform=$(DQ)$(HOSTPLATFORM)$(DQ) +RtsUtils_CC_OPTS += -DBuildPlatform=$(DQ)$(BUILDPLATFORM)$(DQ) +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 +# On Windows: +win32/ConsoleHandler_CC_OPTS += -w +win32/ThrIOManager_CC_OPTS += -w +win32/Ticker_CC_OPTS += -w +Threads_CC_OPTS += -w +Capability_CC_OPTS += -w +Schedule_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