X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FMakefile;h=fcb24afcf56aedf2c264f3b1969ef1bf5e4d0ef0;hb=2601cb53445dd5e5f216496b92214f6f55b6d01b;hp=bed555cb90def87ae1d0b2901a93a3d51f8ec4f1;hpb=1727a8c0ba62091ca42a45244de4dcb6278a02a1;p=ghc-hetmet.git diff --git a/ghc/compiler/Makefile b/ghc/compiler/Makefile index bed555c..fcb24af 100644 --- a/ghc/compiler/Makefile +++ b/ghc/compiler/Makefile @@ -390,7 +390,7 @@ else ifneq "$(findstring $(stage), 2 3)" "" bootstrapped = YES else -bootstrapped = $(shell if (test $(GhcCanonVersion) -ge $(ProjectVersionInt) -a $(GhcPatchLevel) -ge $(ProjectPatchLevel)); then echo YES; else echo NO; fi) +bootstrapped = $(shell if (test $(GhcCanonVersion) -eq $(ProjectVersionInt) -a $(GhcPatchLevel) -eq $(ProjectPatchLevel)); then echo YES; else echo NO; fi) endif endif @@ -407,6 +407,9 @@ ifeq "$(GhcWithInterpreter) $(bootstrapped)" "YES YES" SRC_HC_OPTS += -DGHCI -package template-haskell PKG_DEPENDS += template-haskell +# Use threaded RTS with GHCi, so threads don't get blocked at the prompt. +# SRC_HC_OPTS += -threaded + ALL_DIRS += ghci # If we are going to use dynamic libraries instead of .o files for ghci, @@ -491,7 +494,9 @@ PKG_DEPENDS += unix endif endif -ifneq "$(findstring YES, $(bootstrapped) $(ghc_ge_603))" "" +# We use the Cabal package in stages 2/3 only; in stage 1 we're using +# the libcompat library which provides the Cabal modules. +ifneq "$(stage)" "1" SRC_HC_OPTS += -package Cabal PKG_DEPENDS += Cabal endif @@ -552,11 +557,14 @@ ifeq "$(bootstrapped)" "YES" utils/Binary_HC_OPTS = -funbox-strict-fields endif -# BinIface and Binary take ages to both compile and run if you don's use -O +# We always optimise some low-level modules, otherwise performance of +# a non-optimised compiler is severely affected. main/BinIface_HC_OPTS += -O utils/Binary_HC_OPTS += -O utils/FastMutInt_HC_OPTS += -O - +utils/Encoding_HC_OPTS += -O +utils/StringBuffer_HC_OPTS += -O +utils/FastString_HC_OPTS += -O # ---- Profiling ---- #simplCore/Simplify_HC_OPTS = -auto-all @@ -731,6 +739,7 @@ endif # typecheck/TcUnify_HC_OPTS += -auto-all coreSyn/CorePrep_HC_OPTS += -auto-all +# parser/Parser_HC_OPTS += -fasm #----------------------------------------------------------------------------- # Building the GHC package @@ -807,7 +816,11 @@ ifneq "$(BootingFromHc)" "YES" $(MKDEPENDHS) -M -optdep-f -optdep.depend-BASE $(foreach way,$(WAYS),-optdep-s -optdep$(way)) $(foreach obj,$(MKDEPENDHS_OBJ_SUFFICES),-osuf $(obj)) $(MKDEPENDHS_OPTS) $(filter-out -split-objs, $(MKDEPENDHS_HC_OPTS)) $(HS_SRCS) endif $(MKDEPENDC) -f .depend-BASE $(MKDEPENDC_OPTS) $(foreach way,$(WAYS),-s $(way)) -- $(CC_OPTS) -- $(C_SRCS) - $(PERL) -pe 'binmode(stdin); binmode(stdout); s@^(\S*\.o)@stage$(stage)/$$1@g; s@(\S*\.hi)@stage$(stage)/$$1@g' <.depend-BASE >.depend-$(stage) + $(PERL) -pe 'binmode(stdin); binmode(stdout); s@^(\S*\.o)@stage$(stage)/$$1@g; s@(\S*\.hi)@stage$(stage)/$$1@g; s@^.*/lib/compat.*$$@@g;' <.depend-BASE >.depend-$(stage) # The binmode stuff tells perl not to add stupid ^M's to the output +# +# The /lib/compat replacement is to workaround a bug in the +# -optdep--exclude-module flag in GHC 6.4. It is not required for any +# other version of GHC, but doesn't do any harm. -include .depend-$(stage)