In particular, when building dph with the stage2 compiler, we want to
register it in the main package.conf.
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
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))
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))