When using the bootstrapping compiler, we now explicitly constrain
the version of boot packages (Cabal, extensible-exceptions, etc) to the
in-tree version, so that the build system is less fragile should the
user have a newer version installed for the bootstrapping compiler.
# so we don't have to include it below.
BOOT_PKGS = Cabal hpc extensible-exceptions binary bin-package-db
+BOOT_PKG_CONSTRAINTS := $(foreach p,$(BOOT_PKGS),--constraint "$p == $(shell grep -i "^Version:" libraries/$p/$p.cabal | sed "s/[^0-9.]//g")")
+
# The actual .a and .so/.dll files: needed for dependencies.
ALL_STAGE1_LIBS = $(foreach lib,$(PACKAGES),$(libraries/$(lib)_dist-install_v_LIB))
ifeq "$(BuildSharedLibs)" "YES"
$1_$2_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="$$(ICONV_LIB_DIRS)"
endif
+ifeq "$3" "0"
+$1_$2_CONFIGURE_OPTS += $$(BOOT_PKG_CONSTRAINTS)
+endif
+
# This rule configures the package, generates the package-data.mk file
# for our build system, and registers the package for use in-place in
# the build tree.