summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-08-19 10:14:37 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-08-19 10:14:37 +0000
commitcd759f053d3f54fe62e1b5f3f74ec5c8f4c10893 (patch)
tree67b233362e7cf8ac09fef2916e0c483ef3083ef3 /mk
parent41b9dfa595948df05e3f1370861ec9869ec852bb (diff)
downloadhaskell-cd759f053d3f54fe62e1b5f3f74ec5c8f4c10893.tar.gz
set $(BOOTSTRAPPING_PACKAGE_CONF_HC_OPTS) automatically based on $(HC)
This fixes nofib
Diffstat (limited to 'mk')
-rw-r--r--mk/config.mk.in13
1 files changed, 11 insertions, 2 deletions
diff --git a/mk/config.mk.in b/mk/config.mk.in
index f4e156d66c..b1b54f31ee 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -924,13 +924,22 @@ else # not UseStage1 or BootingFromHc
HC = @WithHc@
MKDEPENDHS = $(GHC)
-BOOTSTRAPPING_PACKAGE_CONF_HC_OPTS = -package-conf $(BOOTSTRAPPING_CONF)
-BOOTSTRAPPING_PACKAGE_CONF_MKDEPENDHS_OPTS = -package-conf $(BOOTSTRAPPING_CONF)
GhcVersion = @GhcVersion@
GhcPatchLevel = @GhcPatchLevel@
GhcMajVersion = @GhcMajVersion@
GhcMinVersion = @GhcMinVersion@
+# We build a few packages using the installed GHC as part of the
+# bootstrapping process. These are installed into a local
+# package.conf file, $(BOOTSTRAPPING_CONF). When we invoke the
+# installed GHC we need to pass it -package-conf $(BOOTSTRAPPING_CONF).
+# So the following variables expand to -package-conf $(BOOTSTRAPPING_CONF)
+# when $(HC) does *not* point to one of the GHC binaries built in
+# the local tree.
+#
+BOOTSTRAPPING_PACKAGE_CONF_HC_OPTS =$(if $(findstring $(GHC_COMPILER_DIR_ABS), $(HC)),,-package-conf $(BOOTSTRAPPING_CONF))
+BOOTSTRAPPING_PACKAGE_CONF_MKDEPENDHS_OPTS =$(if $(findstring $(GHC_COMPILER_DIR_ABS), $(MKDEPENDHS)),,-package-conf $(BOOTSTRAPPING_CONF))
+
# Some useful GHC version predicates:
ghc_ge_605 = @ghc_ge_605@
ghc_ge_607 = @ghc_ge_607@