summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorLeon Schoorl <leon@qbaylogic.com>2020-07-12 00:43:37 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-08-02 16:44:47 -0400
commitf2d1accf67cb6e1dab6b2c78fef4b64526c31a4a (patch)
tree490c77118d76e1d13ac939fd77310c4c38bf45a7 /includes
parent226417424b2b578fd3c5424588367cb24e7720eb (diff)
downloadhaskell-f2d1accf67cb6e1dab6b2c78fef4b64526c31a4a.tar.gz
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
Diffstat (limited to 'includes')
-rw-r--r--includes/ghc.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/ghc.mk b/includes/ghc.mk
index f89d0ca482..6b7fb6f1ba 100644
--- a/includes/ghc.mk
+++ b/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)" >> $$@