summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-05-01 19:14:05 +0100
committerIan Lynagh <igloo@earth.li>2012-05-01 19:14:05 +0100
commit74eebed1d73023ebd7c2abc391492918272531f9 (patch)
tree022daca4ad477563600a1e8b5310590f97cf2190 /rules
parentbf21999aad97b96b0318013d16c846730a27f41b (diff)
downloadhaskell-74eebed1d73023ebd7c2abc391492918272531f9.tar.gz
Define _HOST_OS and _HOST_ARCH when calling hsc2hs
In particular, old-time assumes that mingw32_HOST_OS is set when we are on Windows, and was going wrong on Win64 because it wasn't defined.
Diffstat (limited to 'rules')
-rw-r--r--rules/distdir-way-opts.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk
index c26bbc7ece..dcbd9cb8a6 100644
--- a/rules/distdir-way-opts.mk
+++ b/rules/distdir-way-opts.mk
@@ -189,6 +189,8 @@ $1_$2_$3_ALL_HSC2HS_OPTS = \
$$(SRC_HSC2HS_OPTS) \
$$(WAY_$3_HSC2HS_OPTS) \
--cflag=-D__GLASGOW_HASKELL__=$$(if $$(filter 0,$4),$$(GhcCanonVersion),$$(ProjectVersionInt)) \
+ --cflag=-D$$(HostArch_CPP)_HOST_ARCH=1 \
+ --cflag=-D$$(HostOS_CPP)_HOST_OS=1 \
$$($1_$2_$3_HSC2HS_CC_OPTS) \
$$($1_$2_$3_HSC2HS_LD_OPTS) \
--cflag=-I$1/$2/build/autogen \