From: Debian Haskell Group Date: Mon, 25 Jun 2018 09:24:52 +0000 (+0100) Subject: lower-optimization-for-unreg X-Git-Tag: archive/raspbian/8.2.2-4+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1332c26dd8378ddc846f9d6f18a2edf24aae1b53;p=ghc.git lower-optimization-for-unreg Gbp-Pq: Name lower-optimization-for-unreg.patch --- diff --git a/mk/config.mk.in b/mk/config.mk.in index 4e61eea8..b49d5a4d 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -70,16 +70,6 @@ GhcStage1HcOpts= GhcStage2HcOpts=-O2 GhcStage3HcOpts=-O2 -# Disable -O2 optimization. Otherwise amount of generated C code -# makes things very slow to compile (~5 minutes on core-i7 for 'compiler/hsSyn/HsExpr.hs') -# and sometimes not compile at all (powerpc64 overflows something -# on 'compiler/hsSyn/HsExpr.hs'). -ifeq "$(GhcUnregisterised)" "YES" -GhcStage1HcOpts= -GhcStage2HcOpts= -GhcStage3HcOpts= -endif - # Note [Stage number in build variables]. # # There are (unfortunately) two different naming schemes for build variables @@ -326,6 +316,17 @@ GhcThreaded = $(if $(findstring thr,$(GhcRTSWays)),YES,NO) GhcLibHcOpts=-O2 +# Disable -O2 optimization. Otherwise amount of generated C code +# makes things very slow to compile (~5 minutes on core-i7 for 'compiler/hsSyn/HsExpr.hs') +# and sometimes not compile at all (powerpc64 overflows something +# on 'compiler/hsSyn/HsExpr.hs'). +ifeq "$(GhcUnregisterised)" "YES" +GhcStage1HcOpts= +GhcStage2HcOpts= +GhcStage3HcOpts= +GhcLibHcOpts= +endif + # Strip local symbols from libraries? This can make the libraries smaller, # but makes debugging somewhat more difficult. Doesn't work with all ld's. #