summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-09-19 10:31:06 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-10-09 16:21:14 -0400
commit0c0a15a8541a9119536ee17849d8390cb21ab764 (patch)
tree5ad55179918684d38c4fcff8a502d3d8c5b460e1 /compiler
parentf691f0c21dcc576e02313123e8b091e241d23b51 (diff)
downloadhaskell-0c0a15a8541a9119536ee17849d8390cb21ab764.tar.gz
Rename STAGE macro to GHC_STAGE
To avoid polluting the macro namespace
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ghc.mk10
-rw-r--r--compiler/main/DynFlags.hs4
-rw-r--r--compiler/utils/FastString.hs6
3 files changed, 10 insertions, 10 deletions
diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index 7c301552cf..8703e247c8 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -93,7 +93,7 @@ compiler/stage$1/build/Config.hs : mk/config.mk mk/project.mk | $$$$(dir $$$$@)/
@echo 'cBooterVersion = "$(GhcVersion)"' >> $$@
@echo >> $$@
@echo 'cStage :: String' >> $$@
- @echo 'cStage = show (STAGE :: Int)' >> $$@
+ @echo 'cStage = show (GHC_STAGE :: Int)' >> $$@
@echo done.
endef
@@ -270,10 +270,10 @@ endif
compiler_stage3_CONFIGURE_OPTS := $(compiler_stage2_CONFIGURE_OPTS)
-compiler_stage1_CONFIGURE_OPTS += --ghc-option=-DSTAGE=1
-compiler_stage2_CONFIGURE_OPTS += --ghc-option=-DSTAGE=2
-compiler_stage3_CONFIGURE_OPTS += --ghc-option=-DSTAGE=3
-compiler_stage2_HADDOCK_OPTS += --optghc=-DSTAGE=2
+compiler_stage1_CONFIGURE_OPTS += --ghc-option=-DGHC_STAGE=1
+compiler_stage2_CONFIGURE_OPTS += --ghc-option=-DGHC_STAGE=2
+compiler_stage3_CONFIGURE_OPTS += --ghc-option=-DGHC_STAGE=3
+compiler_stage2_HADDOCK_OPTS += --optghc=-DGHC_STAGE=2
compiler/stage1/package-data.mk : compiler/ghc.mk
compiler/stage2/package-data.mk : compiler/ghc.mk
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 6176e2b155..0079ec3d80 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -320,7 +320,7 @@ import qualified EnumSet
import GHC.Foreign (withCString, peekCString)
import qualified GHC.LanguageExtensions as LangExt
-#if STAGE >= 2
+#if GHC_STAGE >= 2
-- used by SHARED_GLOBAL_VAR
import Foreign (Ptr)
#endif
@@ -5741,7 +5741,7 @@ defaultGlobalDynFlags =
settings = panic "v_unsafeGlobalDynFlags: settings not initialised"
llvmConfig = panic "v_unsafeGlobalDynFlags: llvmConfig not initialised"
-#if STAGE < 2
+#if GHC_STAGE < 2
GLOBAL_VAR(v_unsafeGlobalDynFlags, defaultGlobalDynFlags, DynFlags)
#else
SHARED_GLOBAL_VAR( v_unsafeGlobalDynFlags
diff --git a/compiler/utils/FastString.hs b/compiler/utils/FastString.hs
index 8f3d454a1f..62a81aa10d 100644
--- a/compiler/utils/FastString.hs
+++ b/compiler/utils/FastString.hs
@@ -124,7 +124,7 @@ import GHC.IO
import Foreign
-#if STAGE >= 2
+#if GHC_STAGE >= 2
import GHC.Conc.Sync (sharedCAF)
#endif
@@ -333,12 +333,12 @@ stringTable = unsafePerformIO $ do
-- use the support wired into the RTS to share this CAF among all images of
-- libHSghc
-#if STAGE < 2
+#if GHC_STAGE < 2
return tab
#else
sharedCAF tab getOrSetLibHSghcFastStringTable
--- from the RTS; thus we cannot use this mechanism when STAGE<2; the previous
+-- from the RTS; thus we cannot use this mechanism when GHC_STAGE<2; the previous
-- RTS might not have this symbol
foreign import ccall unsafe "getOrSetLibHSghcFastStringTable"
getOrSetLibHSghcFastStringTable :: Ptr a -> IO (Ptr a)