Commit dd161ad5 authored by Clint Adams's avatar Clint Adams

ghc: 8.2.1-rc2

parent ad48d5ca
ghc (8.2.0~20170507-1) experimental; urgency=medium
* 8.2.1-rc2.
-- Clint Adams <clint@debian.org> Wed, 12 Jul 2017 17:51:16 -0400
ghc (8.0.2-5) unstable; urgency=medium
* Patch from James Clarke to fix powerpc breakage caused by
......
Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424
Index: ghc/compiler/iface/MkIface.hs
===================================================================
--- ghc.orig/compiler/iface/MkIface.hs 2016-04-19 09:26:40.075170754 +0200
+++ ghc/compiler/iface/MkIface.hs 2016-04-19 09:26:40.071170684 +0200
@@ -556,7 +556,7 @@
--- a/compiler/iface/MkIface.hs
+++ b/compiler/iface/MkIface.hs
@@ -682,7 +682,7 @@
iface_hash <- computeFingerprint putNameLiterally
(mod_hash,
ann_fn (mkVarOcc "module"), -- See mkIfaceAnnCache
......@@ -13,7 +11,7 @@ Index: ghc/compiler/iface/MkIface.hs
sorted_deps,
mi_hpc iface0)
@@ -589,6 +589,9 @@
@@ -715,6 +715,9 @@
(non_orph_fis, orph_fis) = mkOrphMap ifFamInstOrph (mi_fam_insts iface0)
fix_fn = mi_fix_fn iface0
ann_fn = mkIfaceAnnCache (mi_anns iface0)
......@@ -21,5 +19,5 @@ Index: ghc/compiler/iface/MkIface.hs
+ usages = [ case u of UsageFile _ fp -> UsageFile "" fp; _ -> u | u <- mi_usages iface0 ]
+
getOrphanHashes :: HscEnv -> [Module] -> IO [Fingerprint]
getOrphanHashes hsc_env mods = do
-- | Retrieve the orphan hashes 'mi_orphan_hash' for a list of modules
-- (in particular, the orphan modules which are transitively imported by the
--- a/compiler/cmm/PprC.hs
+++ b/compiler/cmm/PprC.hs
@@ -1114,6 +1114,8 @@ cLoad expr rep
bewareLoadStoreAlignment ArchMipsel = True
bewareLoadStoreAlignment (ArchARM {}) = True
bewareLoadStoreAlignment ArchARM64 = True
+ bewareLoadStoreAlignment ArchSPARC = True
+ bewareLoadStoreAlignment ArchSPARC64 = True
-- Pessimistically assume that they will also cause problems
-- on unknown arches
bewareLoadStoreAlignment ArchUnknown = True
......@@ -3,10 +3,8 @@ Description: Do not use $SHELL
leak into the wrapper scripts.
Author: Joachim Breitner <nomeata@debian.org>
Index: ghc/driver/ghci/ghc.mk
===================================================================
--- ghc.orig/driver/ghci/ghc.mk 2016-07-07 12:40:40.690866042 +0200
+++ ghc/driver/ghci/ghc.mk 2016-07-07 12:40:40.686863966 +0200
--- a/driver/ghci/ghc.mk
+++ b/driver/ghci/ghc.mk
@@ -21,7 +21,7 @@
$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
$(call removeFiles, "$(WRAPPER)")
......@@ -25,10 +23,8 @@ Index: ghc/driver/ghci/ghc.mk
echo 'exec "$$(dirname "$$0")"/ghc --interactive "$$@"' >> $(GHCII_SCRIPT)
$(EXECUTABLE_FILE) $(GHCII_SCRIPT)
cp $(GHCII_SCRIPT) $(GHCII_SCRIPT_VERSIONED)
Index: ghc/rules/shell-wrapper.mk
===================================================================
--- ghc.orig/rules/shell-wrapper.mk 2016-07-07 12:40:40.690866042 +0200
+++ ghc/rules/shell-wrapper.mk 2016-07-07 12:40:40.686863966 +0200
--- a/rules/shell-wrapper.mk
+++ b/rules/shell-wrapper.mk
@@ -41,7 +41,7 @@
endif
$$($1_$2_INPLACE_WRAPPER): $$($1_$2_INPLACE)
......@@ -56,10 +52,8 @@ Index: ghc/rules/shell-wrapper.mk
ifeq "$$(DYNAMIC_GHC_PROGRAMS)" "YES"
echo '$$(call prependLibraryPath,$$($1_$2_DEP_LIB_REL_DIRS_SEARCHPATH))' >> $$@
endif
Index: ghc/utils/mkdirhier/ghc.mk
===================================================================
--- ghc.orig/utils/mkdirhier/ghc.mk 2016-07-07 12:40:40.690866042 +0200
+++ ghc/utils/mkdirhier/ghc.mk 2016-07-07 12:40:40.686863966 +0200
--- a/utils/mkdirhier/ghc.mk
+++ b/utils/mkdirhier/ghc.mk
@@ -14,7 +14,7 @@
mkdir -p $(INPLACE_BIN)
mkdir -p $(INPLACE_LIB)
......
Provided by “Pino” via Samuel Thibault. Not yet pushed upstream.
Index: ghc/aclocal.m4
===================================================================
--- ghc.orig/aclocal.m4 2016-01-14 16:20:19.683572714 +0100
+++ ghc/aclocal.m4 2016-01-14 16:21:18.024754631 +0100
@@ -277,7 +277,7 @@
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -275,7 +275,7 @@
nto-qnx)
test -z "[$]2" || eval "[$]2=OSQNXNTO"
;;
- dragonfly|osf1|hpux|linuxaout|freebsd2|gnu|nextstep2|nextstep3|sunos4|ultrix|irix)
+ dragonfly|osf1|hpux|linuxaout|freebsd2|nextstep2|nextstep3|sunos4|ultrix|irix)
- dragonfly|hpux|linuxaout|freebsd2|gnu|nextstep2|nextstep3|sunos4|ultrix)
+ dragonfly|hpux|linuxaout|freebsd2|nextstep2|nextstep3|sunos4|ultrix)
test -z "[$]2" || eval "[$]2=OSUnknown"
;;
aix)
@@ -286,6 +286,9 @@
@@ -284,6 +284,9 @@
linux-android)
test -z "[$]2" || eval "[$]2=OSAndroid"
;;
......@@ -23,10 +21,8 @@ Index: ghc/aclocal.m4
*)
echo "Unknown OS '[$]1'"
exit 1
Index: ghc/compiler/utils/Platform.hs
===================================================================
--- ghc.orig/compiler/utils/Platform.hs 2016-01-14 16:20:19.683572714 +0100
+++ ghc/compiler/utils/Platform.hs 2016-01-14 16:20:40.067985654 +0100
--- a/compiler/utils/Platform.hs
+++ b/compiler/utils/Platform.hs
@@ -88,6 +88,7 @@
| OSQNXNTO
| OSAndroid
......@@ -35,7 +31,7 @@ Index: ghc/compiler/utils/Platform.hs
deriving (Read, Show, Eq)
-- | ARM Instruction Set Architecture, Extensions and ABI
@@ -141,6 +142,7 @@
@@ -139,6 +140,7 @@
osElfTarget OSQNXNTO = False
osElfTarget OSAndroid = True
osElfTarget OSAIX = False
......
Description: rts: Ensure we always give MADV_DONTNEED a chance in osDecommitMemory
Author: Ben Gamari <bgamari.foss@gmail.com>
Origin: upstream, https://phabricator.haskell.org/D2780
Bug: https://ghc.haskell.org/trac/ghc/ticket/12865
Bug-Debian: https://bugs.debian.org/847677
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: ghc-8.0.2/rts/posix/OSMem.c
===================================================================
--- ghc-8.0.2.orig/rts/posix/OSMem.c
+++ ghc-8.0.2/rts/posix/OSMem.c
@@ -522,11 +522,24 @@
#ifdef MADV_FREE
// Try MADV_FREE first, FreeBSD has both and MADV_DONTNEED
- // just swaps memory out
+ // just swaps memory out. Linux >= 4.5 has both DONTNEED and FREE; either
+ // will work as they both allow the system to free anonymous pages.
+ // It is important that we try both methods as the kernel which we were
+ // built on may differ from the kernel we are now running on.
r = madvise(at, size, MADV_FREE);
-#else
- r = madvise(at, size, MADV_DONTNEED);
+ if(r < 0) {
+ if (errno == EINVAL) {
+ // Perhaps the system doesn't support MADV_FREE; fall-through and
+ // try MADV_DONTNEED.
+ } else {
+ sysErrorBelch("unable to decommit memory");
+ }
+ } else {
+ return;
+ }
#endif
+
+ r = madvise(at, size, MADV_DONTNEED);
if(r < 0)
sysErrorBelch("unable to decommit memory");
}
......@@ -4,10 +4,8 @@ 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,
and assume that is going to be unique.
Index: ghc-8.0.2/compiler/main/SysTools.hs
===================================================================
--- ghc-8.0.2.orig/compiler/main/SysTools.hs
+++ ghc-8.0.2/compiler/main/SysTools.hs
--- a/compiler/main/SysTools.hs
+++ b/compiler/main/SysTools.hs
@@ -65,6 +65,7 @@
import Util
import DynFlags
......@@ -16,7 +14,7 @@ Index: ghc-8.0.2/compiler/main/SysTools.hs
import LlvmCodeGen.Base (llvmVersionStr, supportedLlvmVersion)
@@ -1145,8 +1146,8 @@
@@ -1118,8 +1119,8 @@
mapping <- readIORef dir_ref
case Map.lookup tmp_dir mapping of
Nothing -> do
......@@ -27,7 +25,7 @@ Index: ghc-8.0.2/compiler/main/SysTools.hs
mask_ $ mkTempDir prefix
Just dir -> return dir
where
@@ -1562,6 +1563,13 @@
@@ -1546,6 +1547,13 @@
getProcessID = System.Posix.Internals.c_getpid >>= return . fromIntegral
#endif
......
......@@ -5,6 +5,4 @@ hurd.diff
buildpath-abi-stability.patch
reproducible-tmp-names
do-not-use-SHELL
compiler-cmm-PprC-sparc-alignment.patch
x32-use-native-x86_64-insn.patch
osdecommitmemory-compat.patch
......@@ -12,11 +12,9 @@ Description: Use native x86_64 instructions on x32
See: https://ghc.haskell.org/trac/ghc/ticket/11571
.
Index: ghc-8.0.2/rts/RtsSymbols.c
===================================================================
--- ghc-8.0.2.orig/rts/RtsSymbols.c
+++ ghc-8.0.2/rts/RtsSymbols.c
@@ -857,7 +857,7 @@
--- a/rts/RtsSymbols.c
+++ b/rts/RtsSymbols.c
@@ -917,7 +917,7 @@
// 64-bit support functions in libgcc.a
......
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