summaryrefslogtreecommitdiff
path: root/utils/runghc/ghc.mk
diff options
context:
space:
mode:
Diffstat (limited to 'utils/runghc/ghc.mk')
-rw-r--r--utils/runghc/ghc.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/runghc/ghc.mk b/utils/runghc/ghc.mk
index 31bf089fab..6979d5022b 100644
--- a/utils/runghc/ghc.mk
+++ b/utils/runghc/ghc.mk
@@ -19,6 +19,14 @@ utils/runghc_dist-install_INSTALL_INPLACE = YES
utils/runghc_dist-install_INSTALL_SHELL_WRAPPER_NAME = runghc-$(ProjectVersion)
utils/runghc_dist-install_EXTRA_HC_OPTS = -cpp -DVERSION="\"$(ProjectVersion)\""
+# Be explicit about which version of ghc to call (#9054).
+define utils/runghc_dist-install_INPLACE_SHELL_WRAPPER_EXTRA
+echo 'ghcprog="$(ghc_stage2_INPLACE_SHELL_WRAPPER_NAME)"' >> "$(WRAPPER)"
+endef
+define utils/runghc_dist-install_INSTALL_SHELL_WRAPPER_EXTRA
+echo 'ghcprog="$(ghc_stage$(INSTALL_GHC_STAGE)_INSTALL_SHELL_WRAPPER_NAME)"' >> "$(WRAPPER)"
+endef
+
ifneq "$(BINDIST)" "YES"
# hack: the build system has trouble with Main modules not called Main.hs
utils/runghc/dist-install/build/Main.hs : utils/runghc/runghc.hs | $$(dir $$@)/.