summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
Diffstat (limited to 'ghc')
-rw-r--r--ghc/ghc.mk7
-rw-r--r--ghc/hschooks.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/ghc/ghc.mk b/ghc/ghc.mk
index 38b3016b30..2af90bed28 100644
--- a/ghc/ghc.mk
+++ b/ghc/ghc.mk
@@ -26,8 +26,11 @@ ghc_stage1_MORE_HC_OPTS = $(GhcStage1HcOpts)
ghc_stage2_MORE_HC_OPTS = $(GhcStage2HcOpts)
ghc_stage3_MORE_HC_OPTS = $(GhcStage3HcOpts)
-ghc_stage2_CC_OPTS = -Iincludes
-ghc_stage3_CC_OPTS = -Iincludes
+# We need __GLASGOW_HASKELL__ in hschooks.c, so we have to build C
+# sources with GHC:
+ghc_stage1_UseGhcForCC = YES
+ghc_stage2_UseGhcForCC = YES
+ghc_stage3_UseGhcForCC = YES
ghc_stage1_C_FILES_NODEPS = ghc/hschooks.c
diff --git a/ghc/hschooks.c b/ghc/hschooks.c
index 18679281e0..037d4e18be 100644
--- a/ghc/hschooks.c
+++ b/ghc/hschooks.c
@@ -23,7 +23,11 @@ defaultsHook (void)
// See #3408: the default idle GC time of 0.3s is too short on
// Windows where we receive console events once per second or so.
+#if __GLASGOW_HASKELL__ >= 703
+ RtsFlags.GcFlags.idleGCDelayTime = SecondsToTime(5);
+#else
RtsFlags.GcFlags.idleGCDelayTime = 5*1000;
+#endif
}
void