Skip to content

Commit

Permalink
pass the correct -Dxxx_HOST_ARCH and -Dxxx_HOST_OS to hsc2hs; Fixes #…
Browse files Browse the repository at this point in the history
…7761.

Patch from Stephen Blackheath.
  • Loading branch information
Ian Lynagh committed Apr 21, 2013
1 parent e781739 commit ca33aa8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions mk/config.mk.in
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions rules/distdir-opts.mk
Expand Up @@ -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 \
Expand Down

0 comments on commit ca33aa8

Please sign in to comment.