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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/ad752fd3453569af129d8ff270f7707bf6535f11

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

commit ad752fd3453569af129d8ff270f7707bf6535f11
Author: Ian Lynagh <[email protected]>
Date:   Sat Mar 17 14:55:16 2012 +0000

    Fix building with devel snapshots

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

 compiler/ghc.mk |    3 ++-
 ghc/ghc.mk      |    9 +++++++++
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index 014094c..b4b3c0e 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -405,8 +405,9 @@ endif
 endif
 
 ifeq "$(compiler_stage1_VERSION_MUNGED)" "YES"
+compiler_stage1_MUNGED_VERSION = $(subst 
.$(ProjectPatchLevel),,$(ProjectVersion))
 define compiler_PACKAGE_MAGIC
-compiler_stage1_VERSION = $(subst .$(ProjectPatchLevel),,$(ProjectVersion))
+compiler_stage1_VERSION = $(compiler_stage1_MUNGED_VERSION)
 endef
 
 # Don't register the non-munged package
diff --git a/ghc/ghc.mk b/ghc/ghc.mk
index ede5687..a13f03b 100644
--- a/ghc/ghc.mk
+++ b/ghc/ghc.mk
@@ -22,6 +22,15 @@ ghc_stage2_CONFIGURE_OPTS += --flags=ghci
 ghc_stage3_CONFIGURE_OPTS += --flags=ghci
 endif
 
+ifeq "$(compiler_stage1_VERSION_MUNGED)" "YES"
+# If we munge the stage1 version, and we're using a devel snapshot for
+# stage0, then stage1 may actually have an earlier version than stage0
+# (e.g. boot with ghc-7.5.20120316, building ghc-7.5). We therefore
+# need to tell Cabal to use version 7.5 of the ghc package when building
+# in ghc/stage1
+ghc_stage1_CONFIGURE_OPTS += --constraint "ghc == 
$(compiler_stage1_MUNGED_VERSION)"
+endif
+
 ghc_stage1_MORE_HC_OPTS = $(GhcStage1HcOpts)
 ghc_stage2_MORE_HC_OPTS = $(GhcStage2HcOpts)
 ghc_stage3_MORE_HC_OPTS = $(GhcStage3HcOpts)



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to