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.
\begin{code}
-- A Word64 is large enough to hold a Word for either a 32bit or 64bit platform
newtype StgWord = StgWord Word64
deriving (Eq,
#if __GLASGOW_HASKELL__ < 706
Num,
#endif
Bits)
deriving (Eq, Bits)
fromStgWord :: StgWord -> Integer
fromStgWord (StgWord i) = toInteger i
......
......@@ -63,11 +63,7 @@ import Control.Concurrent.MVar
import System.FilePath
import System.IO
#if __GLASGOW_HASKELL__ > 704
import System.Directory hiding (findFile)
#else
import System.Directory
#endif
import Distribution.Package hiding (depends, mkPackageKey, PackageKey)
......
......@@ -35,9 +35,6 @@ import Exception
import Control.Concurrent
import Data.Dynamic
#if __GLASGOW_HASKELL__ < 705
import Data.Maybe
#endif
import Debug.Trace ( trace )
import System.IO.Unsafe
import System.Exit
......@@ -52,10 +49,7 @@ import GHC.ConsoleHandler
#endif
import GHC.Stack
#if __GLASGOW_HASKELL__ >= 705
import System.Mem.Weak ( Weak, deRefWeak )
#endif
-- | GHC's own exception type
-- error messages all take the form:
......@@ -286,7 +280,6 @@ installSignalHandlers = do
return ()
#endif
#if __GLASGOW_HASKELL__ >= 705
{-# NOINLINE interruptTargetThread #-}
interruptTargetThread :: MVar [Weak ThreadId]
interruptTargetThread = unsafePerformIO (newMVar [])
......@@ -306,19 +299,6 @@ peekInterruptTargetThread =
case r of
Nothing -> loop ts
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 =
......
......@@ -129,10 +129,6 @@ import qualified Data.IntMap as IM
import qualified Data.Set as Set
import Data.Time
#if __GLASGOW_HASKELL__ < 705
import Data.Time.Clock.POSIX
import System.Time
#endif
infixr 9 `thenCmp`
\end{code}
......@@ -954,13 +950,7 @@ doesDirNameExist fpath = case takeDirectory fpath of
-- Backwards compatibility definition of getModificationTime
getModificationUTCTime :: FilePath -> IO UTCTime
#if __GLASGOW_HASKELL__ < 705
getModificationUTCTime f = do
TOD secs _ <- getModificationTime f
return $ posixSecondsToUTCTime (realToFrac secs)
#else
getModificationUTCTime = getModificationTime
#endif
-- --------------------------------------------------------------
-- check existence & modification time at the same time
......
......@@ -136,8 +136,8 @@ if test "$WithGhc" = ""
then
AC_MSG_ERROR([GHC is required.])
fi
FP_COMPARE_VERSIONS([$GhcVersion],[-lt],[7.4],
[AC_MSG_ERROR([GHC version 7.4 or later is required to compile GHC.])])dnl
FP_COMPARE_VERSIONS([$GhcVersion],[-lt],[7.6],
[AC_MSG_ERROR([GHC version 7.6 or later is required to compile GHC.])])
if test `expr $GhcMinVersion % 2` = "1"
then
......@@ -151,9 +151,7 @@ then
fi
fi
FP_COMPARE_VERSIONS([$GhcVersion],[-lt],[7.5],
GHC_PACKAGE_DB_FLAG=package-conf,
GHC_PACKAGE_DB_FLAG=package-db)
GHC_PACKAGE_DB_FLAG=package-db
AC_SUBST(GHC_PACKAGE_DB_FLAG)
# 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