[commit: ghc] ghc-7.8: mk/config.mk.in: lower -O2 optimization down to -O1 on UNREG (dfe466a)

git at git.haskell.org git at git.haskell.org
Mon Feb 17 10:26:31 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-7.8
Link       : http://ghc.haskell.org/trac/ghc/changeset/dfe466a256f065987e0e4b7d3693369fe6ad0e3f/ghc

>---------------------------------------------------------------

commit dfe466a256f065987e0e4b7d3693369fe6ad0e3f
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date:   Thu Feb 13 07:29:50 2014 -0600

    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 <slyfox at gentoo.org>
    Signed-off-by: Austin Seipp <austin at well-typed.com>
    (cherry picked from commit 2d5372cfdc2236a77ec49df249f3379b93224e06)


>---------------------------------------------------------------

dfe466a256f065987e0e4b7d3693369fe6ad0e3f
 mk/config.mk.in |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/mk/config.mk.in b/mk/config.mk.in
index b3d6995..6207cce 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
 



More information about the ghc-commits mailing list