[commit: ghc] master: Fix bootstrapping with GHC 7.10.1 (5488422)

git at git.haskell.org git at git.haskell.org
Sat Nov 14 20:48:44 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/54884220cd8f68bcb4291cc3689d69258b835f6f/ghc

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

commit 54884220cd8f68bcb4291cc3689d69258b835f6f
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sat Nov 14 21:17:27 2015 +0100

    Fix bootstrapping with GHC 7.10.1
    
    Relying on CallStack being in GLASGOW_HASKELL >= 710 breaks
    bootstrappability with 7.10.1
    
    7.10.2 added the CallStack mechanism, and GHC already relies on this
    while being built. Unfortunately, it is enabled with "GLASGOW_HASKELL
    >= 710", which also applies to GHC 7.10.1, which does not have
    CallStack, and fails building the stage-1 compiler because the symbol
    is not found.
    
    This patch makes the CPP directive more strict, requiring **more than**
    7.10 instead of **at least**.
    
    Reviewers: jstolarek, austin, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1472
    
    GHC Trac Issues: #11085


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

54884220cd8f68bcb4291cc3689d69258b835f6f
 compiler/utils/Outputable.hs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/compiler/utils/Outputable.hs b/compiler/utils/Outputable.hs
index db58469..83febd5 100644
--- a/compiler/utils/Outputable.hs
+++ b/compiler/utils/Outputable.hs
@@ -111,8 +111,10 @@ import Data.Graph (SCC(..))
 
 import GHC.Fingerprint
 import GHC.Show         ( showMultiLineString )
+#if __GLASGOW_HASKELL__ > 710
 import GHC.Stack
 import GHC.Exception
+#endif
 
 {-
 ************************************************************************
@@ -1042,7 +1044,7 @@ pprTrace str doc x
 
 -- | If debug output is on, show some 'SDoc' on the screen along
 -- with a call stack when available.
-#if __GLASGOW_HASKELL__ >= 710
+#if __GLASGOW_HASKELL__ > 710
 pprSTrace :: (?location :: CallStack) => SDoc -> a -> a
 pprSTrace = pprTrace (showCallStack ?location)
 #else



More information about the ghc-commits mailing list