X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fbuilding%2Fbuilding.sgml;h=fc342d04ee493df5dc212e6eb2fb731e4a7e5602;hb=395917a05328e935f40abd080b169aa25546b083;hp=0975985c27c8a53c82e5e38098b5a92cb40c07be;hpb=384d5bcf83b6e7ee103fca364ca1ab6ef831834a;p=ghc-hetmet.git
diff --git a/docs/building/building.sgml b/docs/building/building.sgml
index 0975985..fc342d0 100644
--- a/docs/building/building.sgml
+++ b/docs/building/building.sgml
@@ -4129,6 +4129,36 @@ that Haskell programs compiled by GHC-cygwin can import the (Haskell) Posix libr
+HOST_OS vs TARGET_OS
+
+
+In the source code you'll find various ifdefs looking like:
+
+ #ifdef mingw32_HOST_OS
+ ...blah blah...
+ #endif
+
+and
+
+ #ifdef mingw32_TARGET_OS
+ ...blah blah...
+ #endif
+
+These macros are set by the configure script (via the file config.h).
+Which is which? The criterion is this. In the ifdefs in GHC's source code:
+
+
+ The "host" system is the one on which GHC itself will be run.
+
+
+ The "target" system is the one for which the program compiled by GHC will be run.
+
+
+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.
+
+
+
Summary
Notice that "GHC-mingw" means "GHC that targets MinGW". It says nothing about