summaryrefslogtreecommitdiff
path: root/compiler/ghc.mk
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-09-13 14:21:22 +0000
committerIan Lynagh <igloo@earth.li>2009-09-13 14:21:22 +0000
commitd210b148c72c7fa97e87214d38608ef011657271 (patch)
treee4cd9136c3a9ec02ecde100bbcd6ee9f27f8cf83 /compiler/ghc.mk
parent207a5772ef67c3b26ea3fb9b8beb20d9b3c40368 (diff)
downloadhaskell-d210b148c72c7fa97e87214d38608ef011657271.tar.gz
Fixes for compiling the HEAD with iteslf
Diffstat (limited to 'compiler/ghc.mk')
-rw-r--r--compiler/ghc.mk12
1 files changed, 8 insertions, 4 deletions
diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index e8c487f32e..498e8dc8b8 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -364,19 +364,23 @@ ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
# The #include is vital for the via-C route with older compilers, else the C
# compiler doesn't realise that the stcall foreign imports are indeed
# stdcall, and doesn't generate the Foo@8 name for them
-# As it's only important for older compilers we don't need to do anything
-# for stage2+.
+# It's only important for older compilers, and in fact newer compilers
+# will give a warning if the -#include flag is used. We therefore only
+# do it for stage1, and only for < 6.11.
+ifeq "$(ghc_ge_611)" "NO"
compiler_stage1_CONFIGURE_OPTS += --ghc-option='-\#include' \
--ghc-option='"<windows.h>"' \
--ghc-option='-\#include' \
--ghc-option='"<process.h>"'
endif
+endif
# ghc_strlen percolates through so many modules that it is easier to get its
# prototype via a global option instead of a myriad of per-file OPTIONS.
-# Again, this is only important for older compilers, so we don't do it in
-# stage 2+.
+# Again, this is only done for older compilers.
+ifeq "$(ghc_ge_611)" "NO"
compiler_stage1_CONFIGURE_OPTS += --ghc-options='-\#include "cutils.h"'
+endif
compiler_stage3_CONFIGURE_OPTS := $(compiler_stage2_CONFIGURE_OPTS)