summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules/distdir-way-opts.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk
index 5c56169dc5..31e915d8c8 100644
--- a/rules/distdir-way-opts.mk
+++ b/rules/distdir-way-opts.mk
@@ -131,7 +131,7 @@ $1_$2_$3_ALL_HSC2HS_OPTS = \
$$(CONF_HSC2HS_OPTS) \
$$(SRC_HSC2HS_OPTS) \
$$(WAY_$3_HSC2HS_OPTS) \
- --cflag=-D__GLASGOW_HASKELL__=$$(ProjectVersionInt) \
+ --cflag=-D__GLASGOW_HASKELL__=$$(if $$(filter 0,$4),$$(GhcCanonVersion),$$(ProjectVersionInt)) \
$$($1_$2_$3_HSC2HS_CC_OPTS) \
$$($1_$2_$3_HSC2HS_LD_OPTS) \
--cflag=-I$1/$2/build/autogen \