[commit: ghc] master: pass the correct -Dxxx_HOST_ARCH and -Dxxx_HOST_OS to hsc2hs; Fixes #7761. (ca33aa8)
Ian Lynagh
igloo at earth.li
Sun Apr 21 21:59:34 CEST 2013
Repository : http://darcs.haskell.org/ghc.git/
On branch : master
https://github.com/ghc/ghc/commit/ca33aa89d924e432838fda4efa5116c355d29ff9
>---------------------------------------------------------------
commit ca33aa89d924e432838fda4efa5116c355d29ff9
Author: Ian Lynagh <ian at well-typed.com>
Date: Sun Apr 21 18:19:14 2013 +0100
pass the correct -Dxxx_HOST_ARCH and -Dxxx_HOST_OS to hsc2hs; Fixes #7761.
Patch from Stephen Blackheath.
>---------------------------------------------------------------
mk/config.mk.in | 3 +++
rules/distdir-opts.mk | 2 --
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/mk/config.mk.in b/mk/config.mk.in
index ca7f521..55f5756 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -558,6 +558,9 @@ ifeq "$(CrossCompiling)" "YES"
SRC_HSC2HS_OPTS_STAGE1 += --cross-compile
SRC_HSC2HS_OPTS_STAGE2 += --cross-compile
endif
+SRC_HSC2HS_OPTS_STAGE0 += --cflag=-D$(HostArch_CPP)_HOST_ARCH=1 --cflag=-D$(HostOS_CPP)_HOST_OS=1
+SRC_HSC2HS_OPTS_STAGE1 += --cflag=-D$(TargetArch_CPP)_HOST_ARCH=1 --cflag=-D$(TargetOS_CPP)_HOST_OS=1
+SRC_HSC2HS_OPTS_STAGE2 += --cflag=-D$(TargetArch_CPP)_HOST_ARCH=1 --cflag=-D$(TargetOS_CPP)_HOST_OS=1
ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
WINDRES = $(INPLACE_MINGW)/bin/windres
diff --git a/rules/distdir-opts.mk b/rules/distdir-opts.mk
index 0009f85..b43eb1b 100644
--- a/rules/distdir-opts.mk
+++ b/rules/distdir-opts.mk
@@ -89,8 +89,6 @@ $1_$2_ALL_HSC2HS_OPTS = \
$$(SRC_HSC2HS_OPTS) \
$$(SRC_HSC2HS_OPTS_STAGE$3) \
--cflag=-D__GLASGOW_HASKELL__=$$(if $$(filter 0,$3),$$(GhcCanonVersion),$$(ProjectVersionInt)) \
- --cflag=-D$$(HostArch_CPP)_HOST_ARCH=1 \
- --cflag=-D$$(HostOS_CPP)_HOST_OS=1 \
$$($1_$2_HSC2HS_CC_OPTS) \
$$($1_$2_HSC2HS_LD_OPTS) \
--cflag=-I$1/$2/build/autogen \
More information about the ghc-commits
mailing list