Commit 93f34bbd authored by John Ericson's avatar John Ericson Committed by Marge Bot

Purge TargetPlatform_NAME and cTargetPlatformString

parent 4c86187c
Pipeline #5608 passed with stages
in 313 minutes and 13 seconds
......@@ -63,8 +63,6 @@ compiler/stage%/build/Config.hs : mk/config.mk mk/project.mk | $$(dir $$@)/.
@echo 'cBuildPlatformString = BuildPlatform_NAME' >> $@
@echo 'cHostPlatformString :: String' >> $@
@echo 'cHostPlatformString = HostPlatform_NAME' >> $@
@echo 'cTargetPlatformString :: String' >> $@
@echo 'cTargetPlatformString = TargetPlatform_NAME' >> $@
@echo >> $@
@echo 'cProjectName :: String' >> $@
@echo 'cProjectName = "$(ProjectName)"' >> $@
......@@ -150,7 +148,6 @@ compiler/stage1/$(PLATFORM_H) : mk/config.mk mk/project.mk | $$(dir $$@)/.
@echo >> $@
@echo "#define BuildPlatform_NAME \"$(BUILDPLATFORM)\"" >> $@
@echo "#define HostPlatform_NAME \"$(HOSTPLATFORM)\"" >> $@
@echo "#define TargetPlatform_NAME \"$(TARGETPLATFORM)\"" >> $@
@echo >> $@
@echo "#define $(BuildPlatform_CPP)_BUILD 1" >> $@
@echo "#define $(HostPlatform_CPP)_HOST 1" >> $@
......@@ -192,7 +189,6 @@ compiler/stage2/$(PLATFORM_H) : mk/config.mk mk/project.mk | $$(dir $$@)/.
@echo >> $@
@echo "#define BuildPlatform_NAME \"$(HOSTPLATFORM)\"" >> $@
@echo "#define HostPlatform_NAME \"$(TARGETPLATFORM)\"" >> $@
@echo "#define TargetPlatform_NAME \"$(TARGETPLATFORM)\"" >> $@
@echo >> $@
@echo "#define $(HostPlatform_CPP)_BUILD 1" >> $@
@echo "#define $(TargetPlatform_CPP)_HOST 1" >> $@
......
......@@ -1357,6 +1357,7 @@ data Settings = Settings {
sPlatformConstants :: PlatformConstants,
-- Formerly Config.hs, target specific
sTargetPlatformString :: String, -- TODO Recalculate string from richer info?
sTablesNextToCode :: Bool
}
......@@ -5621,7 +5622,7 @@ compilerInfo dflags
("Stage", cStage),
("Build platform", cBuildPlatformString),
("Host platform", cHostPlatformString),
("Target platform", cTargetPlatformString),
("Target platform", sTargetPlatformString $ settings dflags),
("Have interpreter", cGhcWithInterpreter),
("Object splitting supported", showBool False),
("Have native code generator", cGhcWithNativeCodeGen),
......
......@@ -177,6 +177,7 @@ initSysTools top_dir
Nothing -> pgmError ("Failed to read " ++ show key ++ " value " ++ show xs)
Nothing -> pgmError ("No entry for " ++ show key ++ " in " ++ show settingsFile)
crossCompiling <- getBooleanSetting "cross compiling"
targetPlatformString <- getSetting "target platform string"
targetArch <- readSetting "target arch"
targetOS <- readSetting "target os"
targetWordSize <- readSetting "target word size"
......@@ -305,6 +306,7 @@ initSysTools top_dir
sOpt_lc = [],
sOpt_i = [],
sPlatformConstants = platformConstants,
sTargetPlatformString = targetPlatformString,
sTablesNextToCode = tablesNextToCode
}
......
......@@ -160,13 +160,13 @@ showGhcException exception
sorryMsg :: ShowS -> ShowS
sorryMsg s =
showString "sorry! (unimplemented feature or known bug)\n"
. showString (" (GHC version " ++ cProjectVersion ++ " for " ++ TargetPlatform_NAME ++ "):\n\t")
. showString (" (GHC version " ++ cProjectVersion ++ ":\n\t")
. s . showString "\n"
panicMsg :: ShowS -> ShowS
panicMsg s =
showString "panic! (the 'impossible' happened)\n"
. showString (" (GHC version " ++ cProjectVersion ++ " for " ++ TargetPlatform_NAME ++ "):\n\t")
. showString (" (GHC version " ++ cProjectVersion ++ ":\n\t")
. s . showString "\n\n"
. showString "Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug\n"
......
......@@ -292,6 +292,7 @@ generateSettings = do
, ("libtool command", settingsFileSetting SettingsFileSetting_LibtoolCommand)
, ("unlit command", ("$topdir/bin/" <>) . takeFileName <$> builderPath Unlit)
, ("cross compiling", flag' CrossCompiling)
, ("target platform string", setting TargetPlatform)
, ("target os", lookupValueOrError configFile "haskell-target-os")
, ("target arch", lookupValueOrError configFile "haskell-target-arch")
, ("target word size", lookupValueOrError configFile "target-word-size")
......@@ -357,8 +358,6 @@ generateConfigHs = do
, "cBuildPlatformString = BuildPlatform_NAME"
, "cHostPlatformString :: String"
, "cHostPlatformString = HostPlatform_NAME"
, "cTargetPlatformString :: String"
, "cTargetPlatformString = TargetPlatform_NAME"
, ""
, "cProjectName :: String"
, "cProjectName = " ++ show cProjectName
......@@ -452,7 +451,6 @@ generateGhcBootPlatformH = do
, ""
, "#define BuildPlatform_NAME " ++ show buildPlatform
, "#define HostPlatform_NAME " ++ show hostPlatform
, "#define TargetPlatform_NAME " ++ show targetPlatform
, ""
, "#define " ++ cppify buildPlatform ++ "_BUILD 1"
, "#define " ++ cppify hostPlatform ++ "_HOST 1"
......
......@@ -199,6 +199,7 @@ $(includes_SETTINGS) : includes/Makefile | $$(dir $$@)/.
@echo ',("libtool command", "$(SettingsLibtoolCommand)")' >> $@
@echo ',("unlit command", "$$topdir/bin/$(utils/unlit_dist_PROG)")' >> $@
@echo ',("cross compiling", "$(CrossCompiling)")' >> $@
@echo ',("target platform string", "$(TARGETPLATFORM)")' >> $@
@echo ',("target os", "$(HaskellTargetOs)")' >> $@
@echo ',("target arch", "$(HaskellTargetArch)")' >> $@
@echo ',("target word size", "$(TargetWordSize)")' >> $@
......
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