Commit f2d1accf authored by Leon Schoorl's avatar Leon Schoorl Committed by Marge Bot

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
parent 22641742
Pipeline #23006 failed with stages
in 328 minutes and 22 seconds
......@@ -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)" >> $$@
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment