Commit 7c9b541f authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Fix the build when the bootstrapping compiler has a newer Cabal than us

We need to forcibly use the in-tree Cabal, or we get version mismatch errors
parent a54b5fa2
......@@ -120,9 +120,6 @@ ifeq "$(ghc_ge_605)" "NO"
# Euch, hideous hack:
CABAL_VERSION = $(shell grep "^Version:" Cabal/Cabal.cabal | sed -e "s/^Version: //" -e 's/\./,/g')
BOOTSTRAPPING_FLAGS = $(CABAL_GHC_FLAGS) -DCABAL_VERSION=$(CABAL_VERSION) -odir $(HERE_ABS)/bootstrapping -hidir $(HERE_ABS)/bootstrapping -i$(HERE_ABS)/Cabal -i$(HERE_ABS)/filepath -i$(HERE_ABS)/hpc
.PHONY: boot
space=$(nothing) $(nothing)
GHC_PKG_INSTALL_PROG = $(FPTOOLS_TOP_ABS)/utils/ghc-pkg/dist-install/build/ghc-pkg/ghc-pkg
......@@ -11,6 +12,11 @@ INSTALL_PACKAGE = \
STAGE3_PACKAGE_CONF = $(FPTOOLS_TOP_ABS)/stage3.package.conf
# Euch, hideous hack:
CABAL_DOTTED_VERSION = $(shell grep "^Version:" $(LIBRARIES_ABS)/Cabal/Cabal.cabal | sed "s/^Version: //")
# We rely on all the CONFIGURE_ARGS being quoted with '...', and there
# being no 's inside the values.
FLAGGED_CONFIGURE_ARGS = $(subst $(space)',\
......@@ -3,7 +3,11 @@ TOP=../..
include $(TOP)/mk/
include $(TOP)/mk/
# We should stop installPackage being installed itself, but we do need
# to build it with the stage2 compiler as we need to use it when
# installing.
# If the bootstrapping compiler already has a newer version of Cabal
# than the in-tree Cabal, then we need to forcibly use the in-tree one.
# Otherwise we use one Cabal for some things and the other Cabal for
# other things, and Cabal (rightly) complains about the version
# mismatch.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment