[commit: ghc] master: Use the correct __GLASGOW_HASKELL__ value when invoking hsc2hs on (31f15ef)
Simon Marlow
marlowsd at gmail.com
Mon Aug 8 14:48:50 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/31f15ef0f037ca5484e55f72b3226e4e2bfb5c29
>---------------------------------------------------------------
commit 31f15ef0f037ca5484e55f72b3226e4e2bfb5c29
Author: Simon Marlow <marlowsd at gmail.com>
Date: Fri Aug 5 09:06:41 2011 +0100
Use the correct __GLASGOW_HASKELL__ value when invoking hsc2hs on
source code to be compiled with the stage 0 compiler. (bug noticed by
David Terei - thanks!)
>---------------------------------------------------------------
rules/distdir-way-opts.mk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk
index 5c56169..31e915d 100644
--- a/rules/distdir-way-opts.mk
+++ b/rules/distdir-way-opts.mk
@@ -131,7 +131,7 @@ $1_$2_$3_ALL_HSC2HS_OPTS = \
$$(CONF_HSC2HS_OPTS) \
$$(SRC_HSC2HS_OPTS) \
$$(WAY_$3_HSC2HS_OPTS) \
- --cflag=-D__GLASGOW_HASKELL__=$$(ProjectVersionInt) \
+ --cflag=-D__GLASGOW_HASKELL__=$$(if $$(filter 0,$4),$$(GhcCanonVersion),$$(ProjectVersionInt)) \
$$($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