[commit: ghc] master: Define _HOST_OS and _HOST_ARCH when calling hsc2hs (74eebed)

Ian Lynagh igloo at earth.li
Tue May 1 22:58:32 CEST 2012


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/74eebed1d73023ebd7c2abc391492918272531f9

>---------------------------------------------------------------

commit 74eebed1d73023ebd7c2abc391492918272531f9
Author: Ian Lynagh <igloo at earth.li>
Date:   Tue May 1 19:14:05 2012 +0100

    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.

>---------------------------------------------------------------

 rules/distdir-way-opts.mk |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk
index c26bbc7..dcbd9cb 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 \





More information about the Cvs-ghc mailing list