From ec803f041bdf1907acf782dd6a3da7742fe84433 Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 24 Feb 2003 12:44:38 +0000 Subject: [PATCH 1/1] [project @ 2003-02-24 12:44:38 by simonpj] *** My last commit had a bogus commit message ** *** This is the right one. I've appended the ** *** list of files changed as well. ------------------------------------- Fix up HOST/TARGET_OS ifdefs ------------------------------------- Sigbjorn and Simon helped me to understand when it's appropriate to say 'ifdef mingw32_HOST_OS' and when 'ifdef mingw32_TARGET_OS'. I've documented this in the building guide. I've fixed up the ifdefs I erroneously changed last week, in this commit. I'm not certain about all of them. For examples, in DriverPhases there's an ifdef that deals with filename suffices. Should this be the filename suffices for the system on which GHC runs (HOST), or the system on which the compiled code will run (TARGET)? Currently it's the latter. Similarly, there's some path mangling ('/' vs '\') in DriverState: should this be for the system on which GHC runs (HOST) or the system on which the compiled code will run (TARGET)? Currently the former. I think some of the darwin_TARGET_OS should be darwin_HOST_OS's. Finally, for the GHCi stuff we require that HOST_OS = TARGET_OS. Rather than make an arbitrary choice in (e.g.) Linker.lhs, it's be better to say '#ifdef mingw32_OS', and arrange that this macro is set only in stage-2. I have not done this. I think these are 'right'. But I'm not sure the filename mangling is consistent throughout. [Changes in the original commit, which had a bogus message.] Revision Changes Path 1.46 +30 -0 fptools/docs/building/building.sgml 1.148 +4 -4 fptools/ghc/compiler/ghci/InteractiveUI.hs 1.114 +2 -2 fptools/ghc/compiler/main/DriverFlags.hs 1.23 +3 -1 fptools/ghc/compiler/main/DriverPhases.hs 1.85 +11 -11 fptools/ghc/compiler/main/SysTools.lhs 1.20 +3 -3 fptools/ghc/compiler/utils/Panic.lhs --- docs/building/building.sgml | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/building/building.sgml b/docs/building/building.sgml index fc342d0..3df0893 100644 --- a/docs/building/building.sgml +++ b/docs/building/building.sgml @@ -4156,6 +4156,7 @@ Which is which? The criterion is this. In the ifdefs in GHC's source code: For a stage-2 compiler, in which GHCi is available, the "host" and "target" systems must be the same. So then it doesn't really matter whether you use the HOST_OS or TARGET_OS cpp macros. + -- 1.7.10.4