Commit 42d75e36 authored by Joachim Breitner's avatar Joachim Breitner

New upstream release (7.10.3-rc1)

parent fdcabf6a
ghc (7.10.2.20151030-1) experimental; urgency=medium
* New upstream release (7.10.3-rc1)
-- Joachim Breitner <nomeata@debian.org> Mon, 02 Nov 2015 17:44:43 +0100
ghc (7.10.2-2) experimental; urgency=medium ghc (7.10.2-2) experimental; urgency=medium
* Backport patch to fix GHC bug #10549, to unbreak shakes test suite * Backport patch to fix GHC bug #10549, to unbreak shakes test suite
......
Index: ghc-7.10/compiler/main/DynFlags.hs
===================================================================
--- ghc-7.10.orig/compiler/main/DynFlags.hs 2015-07-21 15:52:57.000000000 +0200
+++ ghc-7.10/compiler/main/DynFlags.hs 2015-08-16 14:57:09.000000000 +0200
@@ -52,7 +52,7 @@
dynFlagDependencies,
tablesNextToCode, mkTablesNextToCode,
SigOf(..), getSigOf,
- checkOptLevel,
+ makeDynFlagsConsistent,
Way(..), mkBuildTag, wayRTSOnly, addWay', updateWays,
wayGeneralFlags, wayUnsetGeneralFlags,
@@ -4110,10 +4110,13 @@
8 -> toInteger (maxBound :: Word64)
w -> panic ("tARGET_MAX_WORD: Unknown platformWordSize: " ++ show w)
+-- | Resolve any internal inconsistencies in a set of 'DynFlags'.
+-- Returns the consistent 'DynFlags' as well as a list of warnings
+-- to report to the user.
+makeDynFlagsConsistent :: DynFlags -> (DynFlags, [Located String])
-- Whenever makeDynFlagsConsistent does anything, it starts over, to
-- ensure that a later change doesn't invalidate an earlier check.
-- Be careful not to introduce potential loops!
-makeDynFlagsConsistent :: DynFlags -> (DynFlags, [Located String])
makeDynFlagsConsistent dflags
-- Disable -dynamic-too on Windows (#8228, #7134, #5987)
| os == OSMinGW32 && gopt Opt_BuildDynamicToo dflags
@@ -4152,6 +4155,8 @@
not (gopt Opt_PIC dflags)
= loop (gopt_set dflags Opt_PIC)
"Enabling -fPIC as it is always on for this platform"
+ | Left err <- checkOptLevel (optLevel dflags) dflags
+ = loop (updOptLevel 0 dflags) err
| otherwise = (dflags, [])
where loc = mkGeneralSrcSpan (fsLit "when making flags consistent")
loop updated_dflags warning
@@ -4161,6 +4166,33 @@
arch = platformArch platform
os = platformOS platform
+{-
+Note [DynFlags consistency]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+There are a number of number of DynFlags configurations which either
+do not make sense or lead to unimplemented or buggy codepaths in the
+compiler. makeDynFlagsConsistent is responsible for verifying the validity
+of a set of DynFlags, fixing any issues, and reporting them back to the
+caller.
+
+GHCi and -O
+---------------
+
+When using optimization, the compiler can introduce several things
+(such as unboxed tuples) into the intermediate code, which GHCi later
+chokes on since the bytecode interpreter can't handle this (and while
+this is arguably a bug these aren't handled, there are no plans to fix
+it.)
+
+While the driver pipeline always checks for this particular erroneous
+combination when parsing flags, we also need to check when we update
+the flags; this is because API clients may parse flags but update the
+DynFlags afterwords, before finally running code inside a session (see
+T10052 and #10052).
+
+-}
+
--------------------------------------------------------------------------
-- Do not use unsafeGlobalDynFlags!
--
Index: ghc-7.10/compiler/main/GHC.hs
===================================================================
--- ghc-7.10.orig/compiler/main/GHC.hs 2015-07-21 15:52:50.000000000 +0200
+++ ghc-7.10/compiler/main/GHC.hs 2015-08-16 14:57:09.000000000 +0200
@@ -608,32 +608,15 @@
-> m (DynFlags, [Located String], [Located String])
parseDynamicFlags = parseDynamicFlagsCmdLine
-{- Note [GHCi and -O]
-~~~~~~~~~~~~~~~~~~~~~
-When using optimization, the compiler can introduce several things
-(such as unboxed tuples) into the intermediate code, which GHCi later
-chokes on since the bytecode interpreter can't handle this (and while
-this is arguably a bug these aren't handled, there are no plans to fix
-it.)
-
-While the driver pipeline always checks for this particular erroneous
-combination when parsing flags, we also need to check when we update
-the flags; this is because API clients may parse flags but update the
-DynFlags afterwords, before finally running code inside a session (see
-T10052 and #10052).
--}
-
-- | Checks the set of new DynFlags for possibly erroneous option
-- combinations when invoking 'setSessionDynFlags' and friends, and if
-- found, returns a fixed copy (if possible).
checkNewDynFlags :: MonadIO m => DynFlags -> m DynFlags
-checkNewDynFlags dflags
- -- See Note [GHCi and -O]
- | Left e <- checkOptLevel (optLevel dflags) dflags
- = do liftIO $ warningMsg dflags (text e)
- return (dflags { optLevel = 0 })
- | otherwise
- = return dflags
+checkNewDynFlags dflags = do
+ -- See Note [DynFlags consistency]
+ let (dflags', warnings) = makeDynFlagsConsistent dflags
+ liftIO $ handleFlagWarnings dflags warnings
+ return dflags'
-- %************************************************************************
-- %* *
...@@ -4,11 +4,11 @@ up in the resulting binary (in the debug section), but not the directory. ...@@ -4,11 +4,11 @@ up in the resulting binary (in the debug section), but not the directory.
Instead of using the process id, create a hash from the command line arguments, Instead of using the process id, create a hash from the command line arguments,
and assume that is going to be unique. and assume that is going to be unique.
Index: ghc-7.10/compiler/main/SysTools.hs Index: ghc/compiler/main/SysTools.hs
=================================================================== ===================================================================
--- ghc-7.10.orig/compiler/main/SysTools.hs 2015-07-21 15:52:50.000000000 +0200 --- ghc.orig/compiler/main/SysTools.hs 2015-11-02 17:23:05.410365013 +0100
+++ ghc-7.10/compiler/main/SysTools.hs 2015-08-16 14:57:09.000000000 +0200 +++ ghc/compiler/main/SysTools.hs 2015-11-02 17:23:05.410365013 +0100
@@ -61,6 +61,7 @@ @@ -66,6 +66,7 @@
import Util import Util
import DynFlags import DynFlags
import Exception import Exception
...@@ -16,7 +16,7 @@ Index: ghc-7.10/compiler/main/SysTools.hs ...@@ -16,7 +16,7 @@ Index: ghc-7.10/compiler/main/SysTools.hs
import Data.IORef import Data.IORef
import Control.Monad import Control.Monad
@@ -1119,8 +1120,8 @@ @@ -1152,8 +1153,8 @@
mapping <- readIORef dir_ref mapping <- readIORef dir_ref
case Map.lookup tmp_dir mapping of case Map.lookup tmp_dir mapping of
Nothing -> do Nothing -> do
...@@ -27,7 +27,7 @@ Index: ghc-7.10/compiler/main/SysTools.hs ...@@ -27,7 +27,7 @@ Index: ghc-7.10/compiler/main/SysTools.hs
mask_ $ mkTempDir prefix mask_ $ mkTempDir prefix
Just dir -> return dir Just dir -> return dir
where where
@@ -1446,6 +1447,13 @@ @@ -1531,6 +1532,13 @@
getProcessID = System.Posix.Internals.c_getpid >>= return . fromIntegral getProcessID = System.Posix.Internals.c_getpid >>= return . fromIntegral
#endif #endif
......
...@@ -4,4 +4,3 @@ no-missing-haddock-file-warning ...@@ -4,4 +4,3 @@ no-missing-haddock-file-warning
hurd.diff hurd.diff
buildpath-abi-stability.patch buildpath-abi-stability.patch
reproducible-tmp-names reproducible-tmp-names
Ensure-DynFlags-are-consistent
File mode changed from 100644 to 100755
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