summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Schoorl <leon@qbaylogic.com>2020-07-12 00:43:37 +0200
committerBen Gamari <ben@smart-cactus.org>2020-08-01 14:52:15 -0400
commit81152ced0563b563970024bb48b71c635134c963 (patch)
tree7f909f8db66e2036bf0341afe0437e8b055d06cf
parent9f71f69714255165d0fdc2790a588487ff9439dc (diff)
downloadhaskell-wip/T18070.tar.gz
Fix GHC_STAGE definition generated by makewip/T18070
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
-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)" >> $$@