X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FMakefile;h=a64cd12fe71912f1bf6aa44c458c0c69b0039058;hb=be745f257384dfedb81f154a961daaa709010ba1;hp=216e5f8a30376d0513bd9c480c40bbfd59f67320;hpb=e0fcf61dca4dfac99cb5417e1bc4cbee18822cf2;p=ghc-hetmet.git diff --git a/compiler/Makefile b/compiler/Makefile index 216e5f8..a64cd12 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -257,8 +257,6 @@ $(CONFIG_HS) : $(FPTOOLS_TOP)/mk/config.mk @echo "cLdIsGNULd = \"$(LdIsGNULd)\"" >> $(CONFIG_HS) @echo "cLD_X :: String" >> $(CONFIG_HS) @echo "cLD_X = \"$(LD_X)\"" >> $(CONFIG_HS) - @echo "cPROJECT_DIR :: String" >> $(CONFIG_HS) - @echo "cPROJECT_DIR = \"$(PROJECT_DIR)\"" >> $(CONFIG_HS) @echo "cGHC_DRIVER_DIR_REL :: String" >> $(CONFIG_HS) @echo "cGHC_DRIVER_DIR_REL = \"$(GHC_DRIVER_DIR_REL)\"" >> $(CONFIG_HS) @echo "cGHC_TOUCHY_PGM :: String" >> $(CONFIG_HS) @@ -485,10 +483,13 @@ endif # the interpreter is supported on this platform. ifeq "$(bootstrapped)" "YES" -SRC_HC_OPTS += -package hpc -package bytestring -PKG_DEPENDS += hpc bytestring +SRC_HC_OPTS += -package bytestring +PKG_DEPENDS += bytestring endif +SRC_HC_OPTS += -package hpc +PKG_DEPENDS += hpc + ifeq "$(GhcWithInterpreter) $(bootstrapped)" "YES YES" # Yes, include the interepreter and Template Haskell extensions @@ -570,9 +571,13 @@ SRC_MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR) # ----------------------------------------------------------------------------- # Haskell compilations -SRC_HC_OPTS += \ - -cpp -fglasgow-exts -fno-generics -Rghc-timing \ - -I. -Iparser +SRC_HC_OPTS += -cpp -fglasgow-exts -Rghc-timing -I. -Iparser -Iutil + +ifeq "$(ghc_ge_609)" "NO" +SRC_HC_OPTS += -fno-generics +else +SRC_HC_OPTS += -XNoGenerics +endif # Omitted: -I$(GHC_INCLUDE_DIR) # We should have -I$(GHC_INCLUDE_DIR) in SRC_HC_OPTS, @@ -596,20 +601,12 @@ SRC_HC_OPTS += -package Win32 PKG_DEPENDS += Win32 endif else -ifeq "$(bootstrapped) $(ghc_ge_601)" "NO NO" -SRC_HC_OPTS += -package posix -else SRC_HC_OPTS += -package unix PKG_DEPENDS += unix endif -endif -# 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 # Ignore lang, to avoid potential clash with the Generics module if # lang happens to be a dependency of some exposed package in the local @@ -617,7 +614,7 @@ endif SRC_HC_OPTS += -ignore-package lang SRC_CC_OPTS += -Iparser -I. -O -SRC_HC_OPTS += -recomp $(GhcHcOpts) $(GhcStage$(stage)HcOpts) +SRC_HC_OPTS += $(GhcHcOpts) $(GhcStage$(stage)HcOpts) SRC_HC_OPTS += -H16M ifeq "$(BootingFromHc)" "YES" @@ -628,7 +625,7 @@ endif # The standard suffix rule for compiling a Haskell file # adds these flags to the command line -# There used to be a -no-recomp flag on PrimOp, but why? +# There used to be a -fforce-recomp flag on PrimOp, but why? # It's an expensive module to recompile! prelude/PrimOp_HC_OPTS = -H80m @@ -639,15 +636,13 @@ parser/Parser_HC_OPTS += -fno-warn-incomplete-patterns # Careful optimisation of the parser: we don't want to throw everything # at it, because that takes too long and doesn't buy much, but we do want # to inline certain key external functions, so we instruct GHC not to -# throw away inlinings as it would normally do in -Onot mode: -parser/Parser_HC_OPTS += -Onot -fno-ignore-interface-pragmas +# throw away inlinings as it would normally do in -O0 mode: +parser/Parser_HC_OPTS += -O0 -fno-ignore-interface-pragmas ifeq "$(HOSTPLATFORM)" "hppa1.1-hp-hpux9" rename/RnMonad_HC_OPTS = -O2 -O2-for-C endif -utils/Digraph_HC_OPTS = -fglasgow-exts - # basicTypes/SrcLoc_HC_OPTS = -funbox-strict-fields # We always optimise some low-level modules, otherwise performance of @@ -689,6 +684,10 @@ parser/Lexer_HC_OPTS += -funbox-strict-fields # prototype via a global option instead of a myriad of per-file OPTIONS SRC_HC_OPTS += '-\#include "cutils.h"' +ifeq "$(ghc_ge_605)" "NO" +utils/LazyUniqFM_HC_OPTS += -fallow-undecidable-instances +endif + # ---------------------------------------------------------------------------- # Generate supporting stuff for prelude/PrimOp.lhs # from prelude/primops.txt @@ -760,15 +759,6 @@ primop-usage.hs-incl: prelude/primops.txt #----------------------------------------------------------------------------- # Linking -# Include libghccompat in stage1 only. In stage2 onwards, all these -# libraries will be available from the main libraries. - -ifeq "$(stage)" "1" -include $(GHC_COMPAT_DIR)/compat.mk -endif - -SRC_LD_OPTS += -no-link-chk - ifeq "$(GhcUnregisterised)" "NO" ifeq "$(HOSTPLATFORM)" "ia64-unknown-linux" # needed for generating proper relocation in large binaries: trac #856 @@ -864,7 +854,6 @@ endif # typecheck/TcUnify_HC_OPTS += -auto-all # coreSyn/CorePrep_HC_OPTS += -auto-all -# parser/Parser_HC_OPTS += -fasm #----------------------------------------------------------------------------- # Building the GHC package @@ -1046,7 +1035,7 @@ endif # careful to recompile stuff you need if you reconfigure or change HsVersions.h. # Aargh, these don't work properly anyway, because GHC's recompilation checker -# just reports "compilation NOT required". Do we have to add -no-recomp for each +# just reports "compilation NOT required". Do we have to add -fforce-recomp for each # of these .hs files? I haven't done anything about this yet. $(odir)/codeGen/Bitmap.$(way_)o : ../includes/MachDeps.h @@ -1095,12 +1084,8 @@ 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; s@^.*/compat.*$$@@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;' <.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. ifeq "$(MakefileDeps)" "YES" $(CONFIG_HS) : Makefile