Accepting request 459907 from devel:languages:haskell:lts:8
update to Haskell LTS version 8.x OBS-URL: https://build.opensuse.org/request/show/459907 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=240
This commit is contained in:
parent
a2632eba34
commit
1ebb229e8e
@ -7,16 +7,16 @@ Subject: [PATCH] PPC/CodeGen: fix lwa instruction generation
|
||||
compiler/nativeGen/PPC/CodeGen.hs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: ghc-8.0.1/compiler/nativeGen/PPC/CodeGen.hs
|
||||
Index: ghc-8.0.2/compiler/nativeGen/PPC/CodeGen.hs
|
||||
===================================================================
|
||||
--- ghc-8.0.1.orig/compiler/nativeGen/PPC/CodeGen.hs
|
||||
+++ ghc-8.0.1/compiler/nativeGen/PPC/CodeGen.hs
|
||||
@@ -471,7 +471,7 @@ getRegister' _ (CmmMachOp (MO_UU_Conv W3
|
||||
--- ghc-8.0.2.orig/compiler/nativeGen/PPC/CodeGen.hs
|
||||
+++ ghc-8.0.2/compiler/nativeGen/PPC/CodeGen.hs
|
||||
@@ -466,7 +466,7 @@ getRegister' _ (CmmMachOp (MO_SS_Conv W1
|
||||
return (Any II64 (\dst -> addr_code `snocOL` LA II16 dst addr))
|
||||
|
||||
getRegister' _ (CmmMachOp (MO_UU_Conv W32 W64) [CmmLoad mem _]) = do
|
||||
- Amode addr addr_code <- getAmode D mem
|
||||
+ Amode addr addr_code <- getAmode DS mem -- lwa is DS-form
|
||||
return (Any II64 (\dst -> addr_code `snocOL` LD II32 dst addr))
|
||||
|
||||
getRegister' _ (CmmMachOp (MO_SS_Conv W32 W64) [CmmLoad mem _]) = do
|
||||
- Amode addr addr_code <- getAmode D mem
|
||||
+ Amode addr addr_code <- getAmode DS mem -- lwa is DS-form
|
||||
return (Any II64 (\dst -> addr_code `snocOL` LA II32 dst addr))
|
||||
|
||||
getRegister' dflags (CmmMachOp mop [x]) -- unary MachOps
|
||||
|
@ -7,11 +7,11 @@ Subject: [PATCH] StgCmmPrim: Add missing write barrier.
|
||||
compiler/codeGen/StgCmmPrim.hs | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
Index: ghc-8.0.1/compiler/codeGen/StgCmmPrim.hs
|
||||
Index: ghc-8.0.2/compiler/codeGen/StgCmmPrim.hs
|
||||
===================================================================
|
||||
--- ghc-8.0.1.orig/compiler/codeGen/StgCmmPrim.hs
|
||||
+++ ghc-8.0.1/compiler/codeGen/StgCmmPrim.hs
|
||||
@@ -1353,6 +1353,7 @@ doWritePtrArrayOp addr idx val
|
||||
--- ghc-8.0.2.orig/compiler/codeGen/StgCmmPrim.hs
|
||||
+++ ghc-8.0.2/compiler/codeGen/StgCmmPrim.hs
|
||||
@@ -1357,6 +1357,7 @@ doWritePtrArrayOp addr idx val
|
||||
emit (setInfo addr (CmmLit (CmmLabel mkMAP_DIRTY_infoLabel)))
|
||||
-- the write barrier. We must write a byte into the mark table:
|
||||
-- bits8[a + header_size + StgMutArrPtrs_size(a) + x >> N]
|
||||
|
18
D2495.patch
18
D2495.patch
@ -1,18 +0,0 @@
|
||||
Index: ghc-8.0.1/compiler/codeGen/StgCmmPrim.hs
|
||||
===================================================================
|
||||
--- ghc-8.0.1.orig/compiler/codeGen/StgCmmPrim.hs
|
||||
+++ ghc-8.0.1/compiler/codeGen/StgCmmPrim.hs
|
||||
@@ -310,8 +310,11 @@ emitPrimOp _ [res] GetCurrentCCSOp [_dum
|
||||
emitPrimOp dflags [res] ReadMutVarOp [mutv]
|
||||
= emitAssign (CmmLocal res) (cmmLoadIndexW dflags mutv (fixedHdrSizeW dflags) (gcWord dflags))
|
||||
|
||||
-emitPrimOp dflags [] WriteMutVarOp [mutv,var]
|
||||
- = do emitStore (cmmOffsetW dflags mutv (fixedHdrSizeW dflags)) var
|
||||
+emitPrimOp dflags res@[] WriteMutVarOp [mutv,var]
|
||||
+ = do -- Without this write barrier, other CPUs may see this pointer before
|
||||
+ -- the writes for the closure it points to have occurred.
|
||||
+ emitPrimCall res MO_WriteBarrier []
|
||||
+ emitStore (cmmOffsetW dflags mutv (fixedHdrSizeW dflags)) var
|
||||
emitCCall
|
||||
[{-no results-}]
|
||||
(CmmLit (CmmLabel mkDirty_MUT_VAR_Label))
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:90fb20cd8712e3c0fbeb2eac8dab6894404c21569746655b9b12ca9684c7d1d2
|
||||
size 10645912
|
@ -1,18 +1,59 @@
|
||||
Index: ghc-8.0.1/rts/posix/OSMem.c
|
||||
===================================================================
|
||||
--- ghc-8.0.1.orig/rts/posix/OSMem.c
|
||||
+++ ghc-8.0.1/rts/posix/OSMem.c
|
||||
@@ -504,13 +504,7 @@ void osDecommitMemory(void *at, W_ size)
|
||||
sysErrorBelch("unable to make released memory unaccessible");
|
||||
#endif
|
||||
From: Ben Gamari <bgamari.foss@gmail.com>
|
||||
Date: Thu, 1 Dec 2016 17:55:23 +0000 (-0500)
|
||||
Subject: rts: Ensure we always give MADV_DONTNEED a chance in osDecommitMemory
|
||||
X-Git-Url: https://git.haskell.org/ghc.git/commitdiff_plain/6576bf83cdf4eac05eb88a24aa934a736c91e3da
|
||||
|
||||
-#ifdef MADV_FREE
|
||||
- // Try MADV_FREE first, FreeBSD has both and MADV_DONTNEED
|
||||
rts: Ensure we always give MADV_DONTNEED a chance in osDecommitMemory
|
||||
|
||||
As described in #12865, newer Linux kernels support both MADV_FREE and
|
||||
MADV_DONTNEED. Previously a runtime would fail to try MADV_DONTNEED if
|
||||
MADV_FREE failed (e.g. since the kernel which the image is running on
|
||||
doesn't support the latter). Now we try MADV_DONTNEED if MADV_FREE
|
||||
failed to ensure that binaries compiled on a kernel supporting MADV_FREE
|
||||
don't fail on decommit.
|
||||
|
||||
Test Plan: Validate
|
||||
|
||||
Reviewers: austin, erikd, simonmar
|
||||
|
||||
Reviewed By: simonmar
|
||||
|
||||
Subscribers: thomie
|
||||
|
||||
Differential Revision: https://phabricator.haskell.org/D2780
|
||||
|
||||
GHC Trac Issues: #12865
|
||||
---
|
||||
|
||||
Index: ghc-8.0.1.20161117/rts/posix/OSMem.c
|
||||
===================================================================
|
||||
--- ghc-8.0.1.20161117.orig/rts/posix/OSMem.c
|
||||
+++ ghc-8.0.1.20161117/rts/posix/OSMem.c
|
||||
@@ -522,11 +522,24 @@ void osDecommitMemory(void *at, W_ size)
|
||||
|
||||
#ifdef MADV_FREE
|
||||
// Try MADV_FREE first, FreeBSD has both and MADV_DONTNEED
|
||||
- // just swaps memory out
|
||||
- r = madvise(at, size, MADV_FREE);
|
||||
+ // 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);
|
||||
-#endif
|
||||
- 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");
|
||||
}
|
||||
|
28
ghc.spec
28
ghc.spec
@ -23,7 +23,7 @@
|
||||
%global unregisterised_archs aarch64 s390 s390x
|
||||
|
||||
Name: ghc
|
||||
Version: 8.0.1
|
||||
Version: 8.0.2
|
||||
Release: 0
|
||||
Url: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.tar.xz
|
||||
Summary: The Glorious Glasgow Haskell Compiler
|
||||
@ -67,15 +67,14 @@ Requires: ghc-ghc-devel = %{version}-%{release}
|
||||
Requires: ghc-libraries = %{version}-%{release}
|
||||
Source: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.tar.xz
|
||||
Source1: ghc-rpmlintrc
|
||||
# PATCH-FIX-UPSTREAM D2495.patch peter.trommler@ohm-hochschule.de -- Add missing memory barrier on mutable variables. See https://ghc.haskell.org/trac/ghc/ticket/12469 for details. Backport of upstream fix for ghc 8.0.2.
|
||||
Patch27: D2495.patch
|
||||
# PATCH-FIX_UPSTREAM 0001-StgCmmPrim-Add-missing-write-barrier.patch peter.trommler@ohm-hochschule.de -- Add missing write barrier on mutable arrays.
|
||||
Patch28: 0001-StgCmmPrim-Add-missing-write-barrier.patch
|
||||
# PATCH-FIX_UPSTREAM ghc-no-madv-free.patch psimons@suse.com -- Fix "unable to decommit memory: Invalid argument" errors. See https://ghc.haskell.org/trac/ghc/ticket/12495 for details.
|
||||
# PATCH-FIX_UPSTREAM ghc-no-madv-free.patch peter.trommler@ohn-hochschule.de -- Fix "unable to decommit memory: Invalid argument" errors. See Haskell Trac #12865 for details.
|
||||
Patch29: ghc-no-madv-free.patch
|
||||
# PATCH-FIX-UPSTREAM 0001-PPC-CodeGen-fix-lwa-instruction-generation.patch peter.trommler@ohm-hochschule.de -- Fix PPC codegen: Fixes ghc-zeromq4-haskell build on 64-bit PowerPCs
|
||||
Patch30: 0001-PPC-CodeGen-fix-lwa-instruction-generation.patch
|
||||
|
||||
# PATCH-FIX-OPENSUSE ghc-8.0.2-Cabal-dynlibdir.patch -- Fix shared library directory location.
|
||||
Patch100: ghc-8.0.2-Cabal-dynlibdir.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -117,29 +116,29 @@ To install all of GHC install package ghc.
|
||||
%global ghc_pkg_c_deps ghc-compiler = %{ghc_version_override}-%{release}
|
||||
|
||||
%if %{defined ghclibdir}
|
||||
%ghc_lib_subpackage Cabal-1.24.0.0
|
||||
%ghc_lib_subpackage Cabal-1.24.2.0
|
||||
%ghc_lib_subpackage array-0.5.1.1
|
||||
%ghc_lib_subpackage -c gmp-devel,libffi-devel,libdw-devel,libelf-devel base-4.9.0.0
|
||||
%ghc_lib_subpackage -c gmp-devel,libffi-devel,libdw-devel,libelf-devel base-4.9.1.0
|
||||
%ghc_lib_subpackage binary-0.8.3.0
|
||||
%ghc_lib_subpackage bytestring-0.10.8.1
|
||||
%ghc_lib_subpackage containers-0.5.7.1
|
||||
%ghc_lib_subpackage deepseq-1.4.2.0
|
||||
%ghc_lib_subpackage directory-1.2.6.2
|
||||
%ghc_lib_subpackage filepath-1.4.1.0
|
||||
%ghc_lib_subpackage directory-1.3.0.0
|
||||
%ghc_lib_subpackage filepath-1.4.1.1
|
||||
%ghc_lib_subpackage -x ghc-%{ghc_version_override}
|
||||
%ghc_lib_subpackage ghc-boot-%{ghc_version_override}
|
||||
%ghc_lib_subpackage ghc-boot-th-%{ghc_version_override}
|
||||
%ghc_lib_subpackage -x ghci-%{ghc_version_override}
|
||||
%ghc_lib_subpackage haskeline-0.7.2.3
|
||||
%ghc_lib_subpackage haskeline-0.7.3.0
|
||||
%ghc_lib_subpackage hoopl-3.10.2.1
|
||||
%ghc_lib_subpackage hpc-0.6.0.3
|
||||
%ghc_lib_subpackage pretty-1.1.3.3
|
||||
%ghc_lib_subpackage process-1.4.2.0
|
||||
%ghc_lib_subpackage template-haskell-2.11.0.0
|
||||
%ghc_lib_subpackage process-1.4.3.0
|
||||
%ghc_lib_subpackage template-haskell-2.11.1.0
|
||||
%ghc_lib_subpackage -c ncurses-devel terminfo-0.4.0.2
|
||||
%ghc_lib_subpackage time-1.6.0.1
|
||||
%ghc_lib_subpackage transformers-0.5.2.0
|
||||
%ghc_lib_subpackage unix-2.7.2.0
|
||||
%ghc_lib_subpackage unix-2.7.2.1
|
||||
%ghc_lib_subpackage xhtml-3000.2.1
|
||||
%endif
|
||||
|
||||
@ -161,10 +160,10 @@ except the ghc library, which is installed by the toplevel ghc metapackage.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch27 -p1
|
||||
%patch28 -p1
|
||||
%patch29 -p1
|
||||
%patch30 -p1
|
||||
%patch100 -p1
|
||||
|
||||
%build
|
||||
# Check if bootstrap is required, i.e. version is different from ghc's version
|
||||
@ -416,7 +415,6 @@ fi
|
||||
%{ghcdocbasedir}/haddock
|
||||
%{ghcdocbasedir}/users_guide
|
||||
%endif
|
||||
%{ghcdocbasedir}/libraries/frames.html
|
||||
%{ghcdocbasedir}/libraries/gen_contents_index
|
||||
%{ghcdocbasedir}/libraries/hslogo-16.png
|
||||
%{ghcdocbasedir}/libraries/ocean.css
|
||||
|
Loading…
x
Reference in New Issue
Block a user