Commit 527bcc41 authored by Austin Seipp's avatar Austin Seipp

build: require GHC 7.6 for bootstrapping

Summary:
Per the usual standards, a build of GHC is only compileable
by the last two releases (e.g. 7.8 only by 7.4 and 7.6). To make sure
we don't get suckered into supporting older compilers, let's remove
this support now.
Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>

Test Plan:
Try to bootstrap with GHC 7.4, watch it fail. Bootstrap
with 7.6 or better, and everything works.

Reviewers: hvr

Reviewed By: hvr

Subscribers: simonmar, ezyang, carter

Differential Revision: https://phabricator.haskell.org/D167
parent 2fc22949
...@@ -105,11 +105,7 @@ StgWord is a type representing an StgWord on the target platform. ...@@ -105,11 +105,7 @@ StgWord is a type representing an StgWord on the target platform.
\begin{code} \begin{code}
-- A Word64 is large enough to hold a Word for either a 32bit or 64bit platform -- A Word64 is large enough to hold a Word for either a 32bit or 64bit platform
newtype StgWord = StgWord Word64 newtype StgWord = StgWord Word64
deriving (Eq, deriving (Eq, Bits)
#if __GLASGOW_HASKELL__ < 706
Num,
#endif
Bits)
fromStgWord :: StgWord -> Integer fromStgWord :: StgWord -> Integer
fromStgWord (StgWord i) = toInteger i fromStgWord (StgWord i) = toInteger i
......
...@@ -63,11 +63,7 @@ import Control.Concurrent.MVar ...@@ -63,11 +63,7 @@ import Control.Concurrent.MVar
import System.FilePath import System.FilePath
import System.IO import System.IO
#if __GLASGOW_HASKELL__ > 704
import System.Directory hiding (findFile) import System.Directory hiding (findFile)
#else
import System.Directory
#endif
import Distribution.Package hiding (depends, mkPackageKey, PackageKey) import Distribution.Package hiding (depends, mkPackageKey, PackageKey)
......
...@@ -35,9 +35,6 @@ import Exception ...@@ -35,9 +35,6 @@ import Exception
import Control.Concurrent import Control.Concurrent
import Data.Dynamic import Data.Dynamic
#if __GLASGOW_HASKELL__ < 705
import Data.Maybe
#endif
import Debug.Trace ( trace ) import Debug.Trace ( trace )
import System.IO.Unsafe import System.IO.Unsafe
import System.Exit import System.Exit
...@@ -52,10 +49,7 @@ import GHC.ConsoleHandler ...@@ -52,10 +49,7 @@ import GHC.ConsoleHandler
#endif #endif
import GHC.Stack import GHC.Stack
#if __GLASGOW_HASKELL__ >= 705
import System.Mem.Weak ( Weak, deRefWeak ) import System.Mem.Weak ( Weak, deRefWeak )
#endif
-- | GHC's own exception type -- | GHC's own exception type
-- error messages all take the form: -- error messages all take the form:
...@@ -286,7 +280,6 @@ installSignalHandlers = do ...@@ -286,7 +280,6 @@ installSignalHandlers = do
return () return ()
#endif #endif
#if __GLASGOW_HASKELL__ >= 705
{-# NOINLINE interruptTargetThread #-} {-# NOINLINE interruptTargetThread #-}
interruptTargetThread :: MVar [Weak ThreadId] interruptTargetThread :: MVar [Weak ThreadId]
interruptTargetThread = unsafePerformIO (newMVar []) interruptTargetThread = unsafePerformIO (newMVar [])
...@@ -306,19 +299,6 @@ peekInterruptTargetThread = ...@@ -306,19 +299,6 @@ peekInterruptTargetThread =
case r of case r of
Nothing -> loop ts Nothing -> loop ts
Just t -> return (Just t) Just t -> return (Just t)
#else
{-# NOINLINE interruptTargetThread #-}
interruptTargetThread :: MVar [ThreadId]
interruptTargetThread = unsafePerformIO (newMVar [])
pushInterruptTargetThread :: ThreadId -> IO ()
pushInterruptTargetThread tid = do
modifyMVar_ interruptTargetThread $ return . (tid :)
peekInterruptTargetThread :: IO (Maybe ThreadId)
peekInterruptTargetThread =
withMVar interruptTargetThread $ return . listToMaybe
#endif
popInterruptTargetThread :: IO () popInterruptTargetThread :: IO ()
popInterruptTargetThread = popInterruptTargetThread =
......
...@@ -129,10 +129,6 @@ import qualified Data.IntMap as IM ...@@ -129,10 +129,6 @@ import qualified Data.IntMap as IM
import qualified Data.Set as Set import qualified Data.Set as Set
import Data.Time import Data.Time
#if __GLASGOW_HASKELL__ < 705
import Data.Time.Clock.POSIX
import System.Time
#endif
infixr 9 `thenCmp` infixr 9 `thenCmp`
\end{code} \end{code}
...@@ -954,13 +950,7 @@ doesDirNameExist fpath = case takeDirectory fpath of ...@@ -954,13 +950,7 @@ doesDirNameExist fpath = case takeDirectory fpath of
-- Backwards compatibility definition of getModificationTime -- Backwards compatibility definition of getModificationTime
getModificationUTCTime :: FilePath -> IO UTCTime getModificationUTCTime :: FilePath -> IO UTCTime
#if __GLASGOW_HASKELL__ < 705
getModificationUTCTime f = do
TOD secs _ <- getModificationTime f
return $ posixSecondsToUTCTime (realToFrac secs)
#else
getModificationUTCTime = getModificationTime getModificationUTCTime = getModificationTime
#endif
-- -------------------------------------------------------------- -- --------------------------------------------------------------
-- check existence & modification time at the same time -- check existence & modification time at the same time
......
...@@ -136,8 +136,8 @@ if test "$WithGhc" = "" ...@@ -136,8 +136,8 @@ if test "$WithGhc" = ""
then then
AC_MSG_ERROR([GHC is required.]) AC_MSG_ERROR([GHC is required.])
fi fi
FP_COMPARE_VERSIONS([$GhcVersion],[-lt],[7.4], FP_COMPARE_VERSIONS([$GhcVersion],[-lt],[7.6],
[AC_MSG_ERROR([GHC version 7.4 or later is required to compile GHC.])])dnl [AC_MSG_ERROR([GHC version 7.6 or later is required to compile GHC.])])
if test `expr $GhcMinVersion % 2` = "1" if test `expr $GhcMinVersion % 2` = "1"
then then
...@@ -151,9 +151,7 @@ then ...@@ -151,9 +151,7 @@ then
fi fi
fi fi
FP_COMPARE_VERSIONS([$GhcVersion],[-lt],[7.5], GHC_PACKAGE_DB_FLAG=package-db
GHC_PACKAGE_DB_FLAG=package-conf,
GHC_PACKAGE_DB_FLAG=package-db)
AC_SUBST(GHC_PACKAGE_DB_FLAG) AC_SUBST(GHC_PACKAGE_DB_FLAG)
# GHC 7.7+ needs -fcmm-sink when compiling Parser.hs. See #8182 # GHC 7.7+ needs -fcmm-sink when compiling Parser.hs. See #8182
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment