[Git][ghc/ghc][master] Fix GHC_STAGE definition generated by make

Marge Bot gitlab at gitlab.haskell.org
Sun Aug 2 20:44:54 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
f2d1accf by Leon Schoorl at 2020-08-02T16:44:47-04:00
Fix GHC_STAGE definition generated by make

Fixes #18070

GHC_STAGE is the stage of the compiler we're building, it should be 1,2(,3?).
But make was generating 0 and 1.

Hadrian does this correctly using a similar `+ 1`:
https://gitlab.haskell.org/ghc/ghc/-/blob/eb8115a8c4cbc842b66798480fefc7ab64d31931/hadrian/src/Rules/Generate.hs#L245

- - - - -


1 changed file:

- includes/ghc.mk


Changes:

=====================================
includes/ghc.mk
=====================================
@@ -163,7 +163,7 @@ $$(includes_$1_H_PLATFORM) : includes/ghc.mk includes/Makefile | $$$$(dir $$$$@)
 	@echo "#if !defined(__GHCPLATFORM_H__)"                      > $$@
 	@echo "#define __GHCPLATFORM_H__"                           >> $$@
 	@echo                                                       >> $$@
-	@echo "#define GHC_STAGE $1"                                >> $$@
+	@echo "#define GHC_STAGE ($1 + 1)"                          >> $$@
 	@echo                                                       >> $$@
 	@echo "#define BuildPlatform_TYPE  $(BuildPlatform_$1_CPP)" >> $$@
 	@echo "#define HostPlatform_TYPE   $(HostPlatform_$1_CPP)"  >> $$@



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f2d1accf67cb6e1dab6b2c78fef4b64526c31a4a

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f2d1accf67cb6e1dab6b2c78fef4b64526c31a4a
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200802/47c0464d/attachment.html>


More information about the ghc-commits mailing list