summaryrefslogtreecommitdiff
path: root/mk/config.mk.in
diff options
context:
space:
mode:
Diffstat (limited to 'mk/config.mk.in')
-rw-r--r--mk/config.mk.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/mk/config.mk.in b/mk/config.mk.in
index b3d6995216..6207cce867 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -422,6 +422,16 @@ BIN_DIST_TAR_BZ2 = $(BIN_DIST_NAME)-$(TARGETPLATFORM).tar.bz2
#
SRC_HC_OPTS += -H32m -O
+# Disable -O2 optimization. Otherwise amount of generated C code
+# makes things very slow to compile (~5 minutes on core-i7 for 'compiler/hsSyn/HsExpr.lhs')
+# and sometimes not compile at all (powerpc64 overflows something
+# on 'compiler/hsSyn/HsExpr.lhs').
+ifeq "$(GhcUnregisterised)" "YES"
+GhcStage1HcOpts=
+GhcStage2HcOpts=
+GhcStage3HcOpts=
+endif
+
# -----------------------------------------------------------------------------
# Names of programs in the GHC tree