Only use STAGE3_PACKAGE_CONF for building GHC itself
authorIan Lynagh <igloo@earth.li>
Sat, 21 Feb 2009 15:15:30 +0000 (15:15 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 21 Feb 2009 15:15:30 +0000 (15:15 +0000)
In particular, when building dph with the stage2 compiler, we want to
register it in the main package.conf.

compiler/Makefile
ghc/Makefile
mk/cabal-flags.mk

index fd6afb1..de9ce9a 100644 (file)
@@ -188,6 +188,7 @@ CONFIGURE_FLAGS_STAGE3 = $(CONFIGURE_FLAGS_STAGE2)
 CONFIGURE_FLAGS_STAGE1 += $(USE_BOOT_CONFIGURE_FLAGS)
 CONFIGURE_FLAGS_STAGE2 += $(USE_STAGE1_CONFIGURE_FLAGS)
 CONFIGURE_FLAGS_STAGE3 += $(USE_STAGE2_CONFIGURE_FLAGS)
+CONFIGURE_FLAGS_STAGE3 += --package-db $(STAGE3_PACKAGE_CONF)
 
 # In a source dist we don't need to worry about Parser.y(.pp) as we have
 # the .hs file pre-generated
index 29ca7a8..ed7d24b 100644 (file)
@@ -83,6 +83,7 @@ CONFIGURE_FLAGS_STAGE3 = $(CONFIGURE_FLAGS_STAGE2PLUS)
 CONFIGURE_FLAGS_STAGE1 += $(USE_BOOT_CONFIGURE_FLAGS)
 CONFIGURE_FLAGS_STAGE2 += $(USE_STAGE1_CONFIGURE_FLAGS)
 CONFIGURE_FLAGS_STAGE3 += $(USE_STAGE2_CONFIGURE_FLAGS)
+CONFIGURE_FLAGS_STAGE3 += --package-db $(STAGE3_PACKAGE_CONF)
 
 CONFIGURE_FLAGS_STAGE1 += $(foreach flag, $(GhcStage1HcOpts), --ghc-option=$(flag))
 CONFIGURE_FLAGS_STAGE2 += $(foreach flag, $(GhcStage2HcOpts), --ghc-option=$(flag))
index a581582..253a1e3 100644 (file)
@@ -89,8 +89,7 @@ USE_STAGE1_CONFIGURE_FLAGS = \
 
 USE_STAGE2_CONFIGURE_FLAGS =            \
     --with-compiler=$(GHC_STAGE2)       \
-    $(USE_STAGE_CONFIGURE_FLAGS)        \
-       --package-db $(STAGE3_PACKAGE_CONF)
+    $(USE_STAGE_CONFIGURE_FLAGS)
 
 BUILD_FLAGS = $(addprefix --ghc-option=,$(SRC_HC_OPTS))