X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2FMakefile;h=894f2dfb3b48927a4a53d255e620edf03e7811d7;hb=7c6c7a46655b93f6c85d3efb4bea5cb511d9353b;hp=8c4e2c9608678b160f727ffde39c49216ac6f41f;hpb=8d53c9ac7ea19388bc2b400b99d33a231d944765;p=ghc-hetmet.git diff --git a/ghc/Makefile b/ghc/Makefile index 8c4e2c9..894f2df 100644 --- a/ghc/Makefile +++ b/ghc/Makefile @@ -13,6 +13,9 @@ else INSTALL_FLAGS = --enable-shell-wrappers endif +# Don't strip the inplace versions, we might need to debug them +INPLACE_INSTALL_FLAGS += --disable-executable-stripping + boot:: boot.stage.$(stage) all:: build.stage.$(stage) @@ -61,6 +64,10 @@ ifeq "$(GhcThreaded)" "YES" CONFIGURE_FLAGS_STAGE2 += --ghc-option=-threaded endif +ifeq "$(BuildSharedLibs)" "YES" +CONFIGURE_FLAGS_STAGE2 += --ghc-option=-dynamic +endif + CONFIGURE_FLAGS_STAGE3 = $(CONFIGURE_FLAGS_STAGE2) CONFIGURE_FLAGS_STAGE1 += $(USE_BOOT_CONFIGURE_FLAGS) @@ -75,6 +82,12 @@ BUILD_FLAGS=$(patsubst %, --ghc-option=%, $(EXTRA_HC_OPTS)) # It works because installPackage doesn't actually use ghc-pkg, as there's # no library to register +ifeq "$(stage)" "1" +# GHC 6.9+ can handle cross-package recompilation checking, but +# we don't rely on the bootstrapping compiler being able to do this. +TOUCH_MAIN = $(RM) dist-stage1/build/ghc/ghc-tmp/Main.o +endif + boot.stage.%: $(CABAL) configure --distpref dist-stage$* \ $(INSTALL_DIRS_CONFIGURE_FLAGS) \ @@ -85,6 +98,7 @@ boot.stage.%: --datasubdir=. build.stage.%: + $(TOUCH_MAIN) $(CABAL) build --distpref dist-stage$* $(BUILD_FLAGS) $(INSTALL_PACKAGE) install '$(GHC_PKG_PROG)' 'XXX/package.conf' "" \ $(FPTOOLS_TOP_ABS)/ghc/stage$*-inplace \ @@ -98,6 +112,7 @@ build.stage.%: '$$prefix/html' \ '$$prefix/haddock' \ --distpref dist-stage$* \ + $(INPLACE_INSTALL_FLAGS) \ $(INSTALL_FLAGS) # XXX For now we always install the stage 2 compiler