Commit ca33aa89 authored by ian@well-typed.com's avatar ian@well-typed.com
Browse files

pass the correct -Dxxx_HOST_ARCH and -Dxxx_HOST_OS to hsc2hs; Fixes #7761.

Patch from Stephen Blackheath.
parent e7817396
......@@ -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
......
......@@ -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 \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment