summaryrefslogtreecommitdiff
path: root/hadrian/src/Rules/Generate.hs
diff options
context:
space:
mode:
Diffstat (limited to 'hadrian/src/Rules/Generate.hs')
-rw-r--r--hadrian/src/Rules/Generate.hs24
1 files changed, 4 insertions, 20 deletions
diff --git a/hadrian/src/Rules/Generate.hs b/hadrian/src/Rules/Generate.hs
index 7a584130f5..b14bccc09c 100644
--- a/hadrian/src/Rules/Generate.hs
+++ b/hadrian/src/Rules/Generate.hs
@@ -258,18 +258,13 @@ generateGhcPlatformH = do
, "#define BUILD_VENDOR " ++ show hostVendor
, "#define HOST_VENDOR " ++ show targetVendor
, ""
- , "/* These TARGET macros are for backwards compatibility... DO NOT USE! */"
- , "#define TargetPlatform_TYPE " ++ cppify targetPlatform
- , "#define " ++ cppify targetPlatform ++ "_TARGET 1"
- , "#define " ++ targetArch ++ "_TARGET_ARCH 1"
- , "#define TARGET_ARCH " ++ show targetArch
- , "#define " ++ targetOs ++ "_TARGET_OS 1"
- , "#define TARGET_OS " ++ show targetOs
- , "#define " ++ targetVendor ++ "_TARGET_VENDOR 1" ]
+ ]
++
[ "#define UnregisterisedCompiler 1" | ghcUnreg ]
++
- [ "\n#endif /* __GHCPLATFORM_H__ */" ]
+ [ ""
+ , "#endif /* __GHCPLATFORM_H__ */"
+ ]
generateSettings :: Expr String
generateSettings = do
@@ -413,10 +408,6 @@ generateGhcBootPlatformH = do
hostArch <- chooseSetting HostArch TargetArch
hostOs <- chooseSetting HostOs TargetOs
hostVendor <- chooseSetting HostVendor TargetVendor
- targetPlatform <- getSetting TargetPlatform
- targetArch <- getSetting TargetArch
- targetOs <- getSetting TargetOs
- targetVendor <- getSetting TargetVendor
return $ unlines
[ "#if !defined(__PLATFORM_H__)"
, "#define __PLATFORM_H__"
@@ -426,28 +417,21 @@ generateGhcBootPlatformH = do
, ""
, "#define " ++ cppify buildPlatform ++ "_BUILD 1"
, "#define " ++ cppify hostPlatform ++ "_HOST 1"
- , "#define " ++ cppify targetPlatform ++ "_TARGET 1"
, ""
, "#define " ++ buildArch ++ "_BUILD_ARCH 1"
, "#define " ++ hostArch ++ "_HOST_ARCH 1"
- , "#define " ++ targetArch ++ "_TARGET_ARCH 1"
, "#define BUILD_ARCH " ++ show buildArch
, "#define HOST_ARCH " ++ show hostArch
- , "#define TARGET_ARCH " ++ show targetArch
, ""
, "#define " ++ buildOs ++ "_BUILD_OS 1"
, "#define " ++ hostOs ++ "_HOST_OS 1"
- , "#define " ++ targetOs ++ "_TARGET_OS 1"
, "#define BUILD_OS " ++ show buildOs
, "#define HOST_OS " ++ show hostOs
- , "#define TARGET_OS " ++ show targetOs
, ""
, "#define " ++ buildVendor ++ "_BUILD_VENDOR 1"
, "#define " ++ hostVendor ++ "_HOST_VENDOR 1"
- , "#define " ++ targetVendor ++ "_TARGET_VENDOR 1"
, "#define BUILD_VENDOR " ++ show buildVendor
, "#define HOST_VENDOR " ++ show hostVendor
- , "#define TARGET_VENDOR " ++ show targetVendor
, ""
, "#endif /* __PLATFORM_H__ */" ]