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

git at git.haskell.org git at git.haskell.org
Mon Feb 17 07:48:47 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/2d5372cfdc2236a77ec49df249f3379b93224e06/ghc

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

commit 2d5372cfdc2236a77ec49df249f3379b93224e06
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>


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

2d5372cfdc2236a77ec49df249f3379b93224e06
 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