From 2d5372cfdc2236a77ec49df249f3379b93224e06 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 13 Feb 2014 07:29:50 -0600 Subject: mk/config.mk.in: lower -O2 optimization down to -O1 on UNREG 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'). Issue #8748 Signed-off-by: Sergei Trofimovich Signed-off-by: Austin Seipp --- mk/config.mk.in | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mk') 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 -- cgit v1.2.1