Accepting request 765570 from devel:languages:haskell
fix (forwarded request 765569 from mimi_vx) OBS-URL: https://build.opensuse.org/request/show/765570 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ghc?expand=0&rev=78
This commit is contained in:
commit
5677970c69
@ -1,60 +0,0 @@
|
||||
From ce3897ffd6e7c8b8f36b8e920168bac8c7f836ae Mon Sep 17 00:00:00 2001
|
||||
From: Ilias Tsitsimpis <iliastsi@debian.org>
|
||||
Date: Tue, 18 Sep 2018 17:45:17 +0200
|
||||
Subject: [PATCH] Fix check whether GCC supports __atomic_ builtins
|
||||
|
||||
Summary:
|
||||
C11 atomics are never used because:
|
||||
|
||||
* The program used for checking whether GCC supports
|
||||
__atomic_ builtins fails with the following error:
|
||||
|
||||
```
|
||||
error: size mismatch in argument 2 of `__atomic_load`
|
||||
int test(int *x) { int y; __atomic_load(&x, &y, __ATOMIC_SEQ_CST); return x; }
|
||||
```
|
||||
|
||||
* There is a typo when checking if CONF_GCC_SUPPORTS__ATOMICS equals YES,
|
||||
resulting in PRIM_CFLAGS and PRIM_EXTRA_LIBRARIES never being set.
|
||||
|
||||
Reviewers: bgamari
|
||||
|
||||
Reviewed By: bgamari
|
||||
|
||||
Subscribers: rwbarton, erikd, carter
|
||||
|
||||
Differential Revision: https://phabricator.haskell.org/D5154
|
||||
---
|
||||
libraries/ghc-prim/aclocal.m4 | 2 +-
|
||||
libraries/ghc-prim/configure.ac | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libraries/ghc-prim/aclocal.m4 b/libraries/ghc-prim/aclocal.m4
|
||||
index e5695385f2..81fc44c500 100644
|
||||
--- a/libraries/ghc-prim/aclocal.m4
|
||||
+++ b/libraries/ghc-prim/aclocal.m4
|
||||
@@ -5,7 +5,7 @@ AC_DEFUN([FP_GCC_SUPPORTS__ATOMICS],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_MSG_CHECKING([whether GCC supports __atomic_ builtins])
|
||||
- echo 'int test(int *x) { int y; __atomic_load(&x, &y, __ATOMIC_SEQ_CST); return x; }' > conftest.c
|
||||
+ echo 'int test(int *x) { int y; __atomic_load(x, &y, __ATOMIC_SEQ_CST); return y; }' > conftest.c
|
||||
if $CC -c conftest.c > /dev/null 2>&1; then
|
||||
CONF_GCC_SUPPORTS__ATOMICS=YES
|
||||
AC_MSG_RESULT([yes])
|
||||
diff --git a/libraries/ghc-prim/configure.ac b/libraries/ghc-prim/configure.ac
|
||||
index bacc89ccc8..8249be31a9 100644
|
||||
--- a/libraries/ghc-prim/configure.ac
|
||||
+++ b/libraries/ghc-prim/configure.ac
|
||||
@@ -8,7 +8,7 @@ dnl unregisterised, Sparc, and PPC backends.
|
||||
FP_GCC_SUPPORTS__ATOMICS
|
||||
AC_DEFINE([HAVE_C11_ATOMICS], [$CONF_GCC_SUPPORTS__ATOMICS], [Does GCC support __atomic primitives?])
|
||||
|
||||
-if test "x$CONF_GCC_SUPPORTS__ATOMICS" = YES
|
||||
+if test "$CONF_GCC_SUPPORTS__ATOMICS" = "YES"
|
||||
then PRIM_CFLAGS=-DHAVE_C11_ATOMICS
|
||||
PRIM_EXTRA_LIBRARIES=atomic
|
||||
fi
|
||||
--
|
||||
2.13.7
|
||||
|
23
D5212.patch
23
D5212.patch
@ -1,23 +0,0 @@
|
||||
Index: ghc-8.6.1/libraries/ghc-heap/GHC/Exts/Heap/InfoTable.hsc
|
||||
===================================================================
|
||||
--- ghc-8.6.1.orig/libraries/ghc-heap/GHC/Exts/Heap/InfoTable.hsc
|
||||
+++ ghc-8.6.1/libraries/ghc-heap/GHC/Exts/Heap/InfoTable.hsc
|
||||
@@ -58,7 +58,7 @@ pokeItbl a0 itbl = do
|
||||
#endif
|
||||
(#poke StgInfoTable, layout.payload.ptrs) a0 (ptrs itbl)
|
||||
(#poke StgInfoTable, layout.payload.nptrs) a0 (nptrs itbl)
|
||||
- (#poke StgInfoTable, type) a0 (fromEnum (tipe itbl))
|
||||
+ (#poke StgInfoTable, type) a0 (toHalfWord (fromEnum (tipe itbl)))
|
||||
#if __GLASGOW_HASKELL__ > 804
|
||||
(#poke StgInfoTable, srt) a0 (srtlen itbl)
|
||||
#else
|
||||
@@ -71,6 +71,9 @@ pokeItbl a0 itbl = do
|
||||
Just (Left xs) -> pokeArray code_offset xs
|
||||
Just (Right xs) -> pokeArray code_offset xs
|
||||
#endif
|
||||
+ where
|
||||
+ toHalfWord :: Int -> HalfWord
|
||||
+ toHalfWord i = fromIntegral i
|
||||
|
||||
-- | Size in bytes of a standard InfoTable
|
||||
itblSize :: Int
|
@ -1,58 +0,0 @@
|
||||
Description: Allow unregisterised ghc-8.4 to build newer GHC
|
||||
Commit 4075656e8bb introduced a regression stopping existing unregisteristed
|
||||
compilers from being able to compile newer versions of GHC. The problem is
|
||||
that the bootstrap compiler uses the newer `rts/storage/ClosureTypes.h` file
|
||||
where some defines have been renamed, resulting in the following error:
|
||||
.
|
||||
error: ‘stg_MUT_ARR_PTRS_FROZEN0_info’ undeclared (first use in this function); did you mean ‘stg_MUT_ARR_PTRS_FROZEN_DIRTY_info’?
|
||||
.
|
||||
For more information, see https://gitlab.haskell.org/ghc/ghc/issues/15913.
|
||||
.
|
||||
This patch can be removed, once ghc-8.4 is no longer the bootstrap compiler.
|
||||
Author: Ilias Tsitsimpis <iliastsi@debian.org>
|
||||
Bug: https://gitlab.haskell.org/ghc/ghc/issues/15913
|
||||
Bug-Debian: https://bugs.debian.org/932941
|
||||
|
||||
Index: b/includes/rts/storage/ClosureTypes.h
|
||||
===================================================================
|
||||
--- a/includes/rts/storage/ClosureTypes.h
|
||||
+++ b/includes/rts/storage/ClosureTypes.h
|
||||
@@ -82,5 +82,11 @@
|
||||
#define SMALL_MUT_ARR_PTRS_DIRTY 60
|
||||
#define SMALL_MUT_ARR_PTRS_FROZEN_DIRTY 61
|
||||
#define SMALL_MUT_ARR_PTRS_FROZEN_CLEAN 62
|
||||
+#if __GLASGOW_HASKELL__ < 806
|
||||
+#define SMALL_MUT_ARR_PTRS_FROZEN0 SMALL_MUT_ARR_PTRS_FROZEN_DIRTY
|
||||
+#define SMALL_MUT_ARR_PTRS_FROZEN SMALL_MUT_ARR_PTRS_FROZEN_CLEAN
|
||||
+#define MUT_ARR_PTRS_FROZEN0 MUT_ARR_PTRS_FROZEN_DIRTY
|
||||
+#define MUT_ARR_PTRS_FROZEN MUT_ARR_PTRS_FROZEN_CLEAN
|
||||
+#endif
|
||||
#define COMPACT_NFDATA 63
|
||||
#define N_CLOSURE_TYPES 64
|
||||
Index: b/includes/stg/MiscClosures.h
|
||||
===================================================================
|
||||
--- a/includes/stg/MiscClosures.h
|
||||
+++ b/includes/stg/MiscClosures.h
|
||||
@@ -116,12 +116,22 @@ RTS_ENTRY(stg_ARR_WORDS);
|
||||
RTS_ENTRY(stg_MUT_ARR_WORDS);
|
||||
RTS_ENTRY(stg_MUT_ARR_PTRS_CLEAN);
|
||||
RTS_ENTRY(stg_MUT_ARR_PTRS_DIRTY);
|
||||
+#if __GLASGOW_HASKELL__ < 806
|
||||
+RTS_ENTRY(stg_MUT_ARR_PTRS_FROZEN);
|
||||
+RTS_ENTRY(stg_MUT_ARR_PTRS_FROZEN0);
|
||||
+#else
|
||||
RTS_ENTRY(stg_MUT_ARR_PTRS_FROZEN_CLEAN);
|
||||
RTS_ENTRY(stg_MUT_ARR_PTRS_FROZEN_DIRTY);
|
||||
+#endif
|
||||
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_CLEAN);
|
||||
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_DIRTY);
|
||||
+#if __GLASGOW_HASKELL__ < 806
|
||||
+RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_FROZEN);
|
||||
+RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_FROZEN0);
|
||||
+#else
|
||||
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_FROZEN_CLEAN);
|
||||
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_FROZEN_DIRTY);
|
||||
+#endif
|
||||
RTS_ENTRY(stg_MUT_VAR_CLEAN);
|
||||
RTS_ENTRY(stg_MUT_VAR_DIRTY);
|
||||
RTS_ENTRY(stg_END_TSO_QUEUE);
|
@ -1,8 +1,8 @@
|
||||
Index: ghc-8.8.1/includes/stg/MiscClosures.h
|
||||
Index: ghc-8.8.2/includes/stg/MiscClosures.h
|
||||
===================================================================
|
||||
--- ghc-8.8.1.orig/includes/stg/MiscClosures.h
|
||||
+++ ghc-8.8.1/includes/stg/MiscClosures.h
|
||||
@@ -400,8 +400,12 @@ RTS_FUN_DECL(stg_copySmallMutableArrayzh
|
||||
--- ghc-8.8.2.orig/includes/stg/MiscClosures.h
|
||||
+++ ghc-8.8.2/includes/stg/MiscClosures.h
|
||||
@@ -390,8 +390,12 @@ RTS_FUN_DECL(stg_copySmallMutableArrayzh
|
||||
RTS_FUN_DECL(stg_casSmallArrayzh);
|
||||
|
||||
RTS_FUN_DECL(stg_newMutVarzh);
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:908a83d9b814da74585de9d39687189e6260ec3848131f9d9236cab8a123721a
|
||||
size 28634672
|
Binary file not shown.
3
ghc-8.8.2-src.tar.xz
Normal file
3
ghc-8.8.2-src.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:01cea54d90686b97bcc9960b108beaffccd4336dee930dcf9beaf52b1f370a0b
|
||||
size 19365816
|
BIN
ghc-8.8.2-src.tar.xz.sig
Normal file
BIN
ghc-8.8.2-src.tar.xz.sig
Normal file
Binary file not shown.
28
ghc.changes
28
ghc.changes
@ -1,3 +1,31 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 16 19:08:53 UTC 2020 - Peter Trommler <ptrommler@icloud.com>
|
||||
|
||||
- drop 0001-Fix-check-whether-GCC-supports-__atomic_-builtins.patch
|
||||
* fixed upstream
|
||||
- drop D5212.patch
|
||||
* fixed upstream
|
||||
- drop fix-build-using-unregisterized-v8.4.patch
|
||||
* bootstrap compiler is 8.6.5 now
|
||||
- refresh fix-unregisterised-v8.4-8.6.patch
|
||||
- clean up spec file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 16 17:56:27 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- update to 8.8.2
|
||||
* A bug (Issue #17088) in the compacting garbage collector resulting in segmentation
|
||||
faults under specific circumstances. Note that this may affect user programs even
|
||||
if they did not explicitly request the compacting GC (using the -c RTS flag)
|
||||
since GHC may fallback to compacting collection during times of high memory pressure.
|
||||
* A code generator bug (Issue #17334) resulting in GHC panics has been fixed.
|
||||
* A typechecker bug (Issue #17112) resulting in GHC panicking on some programs
|
||||
has been fixed.
|
||||
* A bug (Issue #16707) in the implementation of software transactional memory
|
||||
potentially resulting in hanging transactions has been fixed.
|
||||
* A bug in the implementation of compact normal forms resulting in segmentation
|
||||
faults in some uses (Issue #17044) has been fixed.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 31 18:17:24 UTC 2019 - Peter Trommler <ptrommler@icloud.com>
|
||||
|
||||
|
29
ghc.spec
29
ghc.spec
@ -29,11 +29,11 @@
|
||||
%global unregisterised_archs s390 s390x riscv64
|
||||
|
||||
Name: ghc
|
||||
Version: 8.8.1
|
||||
Version: 8.8.2
|
||||
Release: 0
|
||||
URL: https://www.haskell.org/ghc/
|
||||
Source: https://downloads.haskell.org/~ghc/8.8.1/ghc-%{version}-src.tar.xz
|
||||
Source1: https://downloads.haskell.org/~ghc/8.8.1/ghc-%{version}-src.tar.xz.sig
|
||||
Source: https://downloads.haskell.org/~ghc/8.8.2/ghc-%{version}-src.tar.xz
|
||||
Source1: https://downloads.haskell.org/~ghc/8.8.2/ghc-%{version}-src.tar.xz.sig
|
||||
Source2: ghc-rpmlintrc
|
||||
Summary: The Glorious Glasgow Haskell Compiler
|
||||
License: BSD-3-Clause
|
||||
@ -81,9 +81,6 @@ BuildRequires: python3-Sphinx
|
||||
BuildRequires: libnuma-devel
|
||||
%endif
|
||||
|
||||
# for patch 1
|
||||
# BuildRequires: python3
|
||||
|
||||
# bogus requires
|
||||
%ifarch x86_64
|
||||
BuildRequires: ghc-bootstrap-helpers
|
||||
@ -96,14 +93,8 @@ PreReq: update-alternatives
|
||||
Requires: ghc-compiler = %{version}-%{release}
|
||||
Requires: ghc-ghc-devel = %{version}-%{release}
|
||||
Requires: ghc-libraries = %{version}-%{release}
|
||||
# PATCH-FIX-UPSTREAM 0001-Fix-check-whether-GCC-supports-__atomic_-builtins.patch ptrommler@icloud.com -- Fix __atomic_builtin detection. Patch taken from upstream commit ce3897ff.
|
||||
Patch1: 0001-Fix-check-whether-GCC-supports-__atomic_-builtins.patch
|
||||
# PATCH-FIX-UPSTREAM D5212.patch ptrommler@icloud.com -- Fix GHCi on big endiansystems. Submitted for upstream review.
|
||||
Patch2: D5212.patch
|
||||
# PATCH-FIX-UPSTREAM Disable-unboxed-arrays.patch ptrommler@icloud.com -- Do not use unboxed arrays on big-endian platforms. See Haskell Trac #15411.
|
||||
Patch3: Disable-unboxed-arrays.patch
|
||||
# PATCH-FIX-UPSTREAM fix-build-using-unregisterized-v8.4.patch
|
||||
Patch5: fix-build-using-unregisterized-v8.4.patch
|
||||
# PATCH-FIX-UPSTREAM fix-unregisterised-v8.4-8.6.patch
|
||||
Patch6: fix-unregisterised-v8.4-8.6.patch
|
||||
# PATCH-FIX-UPSTREAM ghc-pie.patch - set linux as default PIE platform
|
||||
@ -172,14 +163,14 @@ To install all of GHC install package ghc.
|
||||
%endif
|
||||
|
||||
%if %{defined ghclibdir}
|
||||
%ghc_lib_subpackage -d Cabal-3.0.0.0
|
||||
%ghc_lib_subpackage -d Cabal-3.0.1.0
|
||||
%ghc_lib_subpackage -d array-0.5.4.0
|
||||
%ghc_lib_subpackage -d -c gmp-devel,libffi-devel,libdw-devel,libelf-devel%{libnuma_dep} base-4.13.0.0
|
||||
%ghc_lib_subpackage -d binary-0.8.7.0
|
||||
%ghc_lib_subpackage -d bytestring-0.10.9.0
|
||||
%ghc_lib_subpackage -d bytestring-0.10.10.0
|
||||
%ghc_lib_subpackage -d containers-0.6.2.1
|
||||
%ghc_lib_subpackage -d deepseq-1.4.4.0
|
||||
%ghc_lib_subpackage -d directory-1.3.3.2
|
||||
%ghc_lib_subpackage -d directory-1.3.4.0
|
||||
%ghc_lib_subpackage -d filepath-1.4.2.1
|
||||
%ghc_lib_subpackage -d -x ghc-%{ghc_version_override}
|
||||
%ghc_lib_subpackage -d ghc-boot-%{ghc_version_override}
|
||||
@ -193,7 +184,7 @@ To install all of GHC install package ghc.
|
||||
%ghc_lib_subpackage -d mtl-2.2.2
|
||||
%ghc_lib_subpackage -d parsec-3.1.14.0
|
||||
%ghc_lib_subpackage -d pretty-1.1.3.6
|
||||
%ghc_lib_subpackage -d process-1.6.5.1
|
||||
%ghc_lib_subpackage -d process-1.6.7.0
|
||||
%ghc_lib_subpackage -d stm-2.5.0.0
|
||||
%ghc_lib_subpackage -d template-haskell-2.15.0.0
|
||||
%ghc_lib_subpackage -d -c ncurses-devel terminfo-0.4.1.4
|
||||
@ -222,21 +213,15 @@ except the ghc library, which is installed by the toplevel ghc metapackage.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
#%%patch1 -p1
|
||||
#%%patch2 -p1
|
||||
%ifarch ppc64 s390 s390x
|
||||
%patch3 -p1
|
||||
%endif
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch35 -p1
|
||||
%patch100 -p1
|
||||
%patch110 -p1
|
||||
|
||||
%build
|
||||
# patch 1 modifies build system, we need to recreate configure
|
||||
# ./boot
|
||||
|
||||
cat > mk/build.mk <<EOF
|
||||
%ifarch aarch64 %{arm}
|
||||
BuildFlavour = perf-llvm
|
||||
|
Loading…
x
Reference in New Issue
Block a user