Accepting request 801074 from devel:languages:haskell

major version update

OBS-URL: https://build.opensuse.org/request/show/801074
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ghc?expand=0&rev=84
This commit is contained in:
Dominique Leuenberger 2020-05-11 11:37:20 +00:00 committed by Git OBS Bridge
commit b90be1b390
12 changed files with 157 additions and 64 deletions

View File

@ -9,13 +9,13 @@
</hardware>
<overwrite>
<conditions>
<arch>s390x</arch>
<arch>aarch64</arch>
<arch>s390x</arch>
</conditions>
<hardware>
<memory>
<physicalmemory>
<size unit="G">10</size>
</memory>
</physicalmemory>
</hardware>
</overwrite>
<overwrite>
@ -23,9 +23,9 @@
<arch>riscv64</arch>
</conditions>
<hardware>
<memory>
<size unit="G">17</size>
</memory>
<physicalmemory>
<size unit="G">20</size>
</physicalmemory>
</hardware>
</overwrite>
</constraints>

View File

@ -1,8 +1,8 @@
Index: ghc-8.8.1/compiler/iface/MkIface.hs
Index: ghc-8.10.0.20191210/compiler/iface/MkIface.hs
===================================================================
--- ghc-8.8.1.orig/compiler/iface/MkIface.hs
+++ ghc-8.8.1/compiler/iface/MkIface.hs
@@ -713,7 +713,7 @@ addFingerprints hsc_env mb_old_fingerpri
--- ghc-8.10.0.20191210.orig/compiler/iface/MkIface.hs
+++ ghc-8.10.0.20191210/compiler/iface/MkIface.hs
@@ -679,7 +679,7 @@ addFingerprints hsc_env iface0
iface_hash <- computeFingerprint putNameLiterally
(mod_hash,
ann_fn (mkVarOcc "module"), -- See mkIfaceAnnCache
@ -11,9 +11,9 @@ Index: ghc-8.8.1/compiler/iface/MkIface.hs
sorted_deps,
mi_hpc iface0)
@@ -748,6 +748,9 @@ addFingerprints hsc_env mb_old_fingerpri
@@ -714,6 +714,9 @@ addFingerprints hsc_env iface0
(non_orph_rules, orph_rules) = mkOrphMap ifRuleOrph (mi_rules iface0)
(non_orph_fis, orph_fis) = mkOrphMap ifFamInstOrph (mi_fam_insts iface0)
fix_fn = mi_fix_fn iface0
ann_fn = mkIfaceAnnCache (mi_anns iface0)
+ -- Do not allow filenames to affect the interface
+ usages = [ case u of UsageFile _ fp -> UsageFile "" fp; _ -> u | u <- mi_usages iface0 ]

View File

@ -0,0 +1,58 @@
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);

View File

@ -1,8 +1,8 @@
Index: ghc-8.8.2/includes/stg/MiscClosures.h
Index: ghc-8.10.0.20200123/includes/stg/MiscClosures.h
===================================================================
--- 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
--- ghc-8.10.0.20200123.orig/includes/stg/MiscClosures.h
+++ ghc-8.10.0.20200123/includes/stg/MiscClosures.h
@@ -401,8 +401,12 @@ RTS_FUN_DECL(stg_copySmallMutableArrayzh
RTS_FUN_DECL(stg_casSmallArrayzh);
RTS_FUN_DECL(stg_newMutVarzh);

View File

@ -1,8 +1,8 @@
Index: ghc-8.8.1/libraries/Cabal/Cabal/Distribution/Simple/InstallDirs.hs
Index: ghc-8.10.0.20200123/libraries/Cabal/Cabal/Distribution/Simple/InstallDirs.hs
===================================================================
--- ghc-8.8.1.orig/libraries/Cabal/Cabal/Distribution/Simple/InstallDirs.hs
+++ ghc-8.8.1/libraries/Cabal/Cabal/Distribution/Simple/InstallDirs.hs
@@ -205,7 +205,7 @@ defaultInstallDirs' False comp userInsta
--- ghc-8.10.0.20200123.orig/libraries/Cabal/Cabal/Distribution/Simple/InstallDirs.hs
+++ ghc-8.10.0.20200123/libraries/Cabal/Cabal/Distribution/Simple/InstallDirs.hs
@@ -207,7 +207,7 @@ defaultInstallDirs' False comp userInsta
_other -> "$abi" </> "$libname",
dynlibdir = "$libdir" </> case comp of
UHC -> "$pkgid"

3
ghc-8.10.1-src.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4e3b07f83a266b3198310f19f71e371ebce97c769b14f0d688f4cbf2a2a1edf5
size 19781652

BIN
ghc-8.10.1-src.tar.xz.sig Normal file

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e0dcc0aaf3e234c5978f29e6df62947e97720ab404ec0158343df211c5480f89
size 19343672

Binary file not shown.

View File

@ -1,8 +1,8 @@
Index: ghc-8.8.1/compiler/main/DynFlags.hs
Index: ghc-8.10.0.20200123/compiler/main/DynFlags.hs
===================================================================
--- ghc-8.8.1.orig/compiler/main/DynFlags.hs
+++ ghc-8.8.1/compiler/main/DynFlags.hs
@@ -4511,6 +4511,7 @@ default_PIC :: Platform -> [GeneralFlag]
--- ghc-8.10.0.20200123.orig/compiler/main/DynFlags.hs
+++ ghc-8.10.0.20200123/compiler/main/DynFlags.hs
@@ -4624,6 +4624,7 @@ default_PIC :: Platform -> [GeneralFlag]
default_PIC platform =
case (platformOS platform, platformArch platform) of
(OSDarwin, ArchX86_64) -> [Opt_PIC]

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Thu May 7 07:44:47 UTC 2020 - Peter Simons <psimons@suse.com>
- Update ghc to version 8.10.1. Important changes are:
* The UnliftedNewtypes extension, allowing newtypes to be wrap
types of kind other than Type.
* The StandaloneKindSignatures extension, allowing explicit
signatures on type constructors.
* A new, low-latency garbage collector for the oldest generation.
Please refer to the compiler documentation for all details:
https://downloads.haskell.org/~ghc/8.10.1/docs/html/users_guide/8.10.1-notes.html
-------------------------------------------------------------------
Thu Feb 27 08:47:53 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
@ -21,7 +37,7 @@ Wed Feb 5 11:16:13 UTC 2020 - Andreas Schwab <schwab@suse.de>
Thu Jan 23 09:41:53 UTC 2020 - Peter Trommler <ptrommler@icloud.com>
- use ghc-bootstrap-helpers on all archs
- lower build env requirements on riscv64
- lower build env requirements on riscv64
* make sure we can build on smaller systems
* adjust parallelism so we don't hog big workers for almost a week
* many thanks to Stefan Bruens for pointing out the issue and
@ -64,27 +80,27 @@ Thu Jan 16 17:56:27 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
Tue Dec 31 18:17:24 UTC 2019 - Peter Trommler <ptrommler@icloud.com>
- add fix-unregisterised-v8.4-8.6.patch
* fix build on s390x and riscv64
* fix build on s390x and riscv64
-------------------------------------------------------------------
Mon Dec 30 12:08:41 UTC 2019 - Peter Trommler <ptrommler@icloud.com>
- refresh buildpath-abi-stability.patch
- refresh ghc-8.0.2-Cabal-dynlibdir.patch
- refresh ghc-pie.patch
- refresh ghc-pie.patch
- enable riscv64
-------------------------------------------------------------------
Sun Dec 29 13:10:39 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
- use prebuilt alex and happy on Tumbleweed to avoid buildcycle
- use prebuilt alex and happy on Tumbleweed to avoid buildcycle
- Don't require llvm in ghc-compiler for other architectures than arm
-------------------------------------------------------------------
Sat Dec 28 22:38:34 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
- update to 8.8.1 -new stable release
- refresh Disable-unboxed-arrays.patch
- refresh Disable-unboxed-arrays.patch
- drop allow-riscv-and-riscv64-CPU.patch - merged in upstream
-------------------------------------------------------------------
@ -92,7 +108,7 @@ Mon Sep 23 10:07:24 UTC 2019 - Peter Trommler <ptrommler@icloud.com>
- add fix-build-using-unregisterized-v8.4.patch
* fixes unregisterised builds when bootstrap compiler is GHC 8.4
* fixes build on s390x
* fixes build on s390x
-------------------------------------------------------------------
Mon Sep 23 09:28:37 UTC 2019 - Andreas Schwab <schwab@suse.de>
@ -116,7 +132,7 @@ Wed Mar 13 14:35:13 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
-------------------------------------------------------------------
Tue Mar 12 09:20:14 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
- bump llvm req to llvm6
- bump llvm req to llvm6
-------------------------------------------------------------------
Wed Mar 6 08:49:44 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package ghc
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -27,13 +27,14 @@
%endif
%global unregisterised_archs s390 s390x riscv64
%define full_version 8.10.1
Name: ghc
Version: 8.8.3
Version: 8.10.1
Release: 0
URL: https://www.haskell.org/ghc/
Source: https://downloads.haskell.org/~ghc/8.8.3/ghc-%{version}-src.tar.xz
Source1: https://downloads.haskell.org/~ghc/8.8.3/ghc-%{version}-src.tar.xz.sig
Source: https://downloads.haskell.org/~ghc/%{full_version}/ghc-%{version}-src.tar.xz
Source1: https://downloads.haskell.org/~ghc/%{full_version}/ghc-%{version}-src.tar.xz.sig
Source2: ghc-rpmlintrc
Summary: The Glorious Glasgow Haskell Compiler
License: BSD-3-Clause
@ -43,8 +44,7 @@ ExclusiveArch: aarch64 %{arm} %{ix86} x86_64 ppc64 ppc64le riscv64 s390x
#!BuildIgnore: gcc-PIE
BuildRequires: binutils-devel
BuildRequires: gcc
BuildRequires: ghc-bootstrap >= 8.4
BuildRequires: ghc-bootstrap-helpers
BuildRequires: ghc-bootstrap >= 8.6
BuildRequires: ghc-rpm-macros-extra
BuildRequires: glibc-devel
BuildRequires: gmp-devel
@ -69,11 +69,11 @@ BuildRequires: binutils-gold
%endif
%ifarch aarch64 %{arm} %{ix86} x86_64
%if 0%{?suse_version} >= 1550
BuildRequires: llvm7
Requires: llvm7
BuildRequires: llvm9-devel
BuildRequires: clang9
%else
BuildRequires: llvm
Requires: llvm
BuildRequires: llvm-devel
BuildRequires: clang
%endif
%endif
%if %{undefined without_manual}
@ -84,14 +84,26 @@ BuildRequires: python3-Sphinx
BuildRequires: libnuma-devel
%endif
# for patch 1
# BuildRequires: python3
# bogus requires
%ifarch x86_64
BuildRequires: ghc-bootstrap-helpers
%else
BuildRequires: alex
BuildRequires: happy
%endif
PreReq: update-alternatives
Requires: ghc-compiler = %{version}-%{release}
Requires: ghc-ghc-devel = %{version}-%{release}
Requires: ghc-libraries = %{version}-%{release}
# 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-unregisterised-v8.4-8.6.patch ptrommler@icloud.com -- Fix/workaround an issue with unregisterised builds bootstrapped with GHC 8.4 and 8.6. Similar to upstream ticket #15913.
# 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
Patch35: ghc-pie.patch
@ -129,16 +141,20 @@ Requires: binutils-gold
%endif
%ifarch aarch64 %{arm}
%if 0%{?suse_version} >= 1550
Requires: llvm7
Requires: clang9
Requires: llvm9
%else
Requires: llvm
Requires: clang
%endif
%endif
%ifarch x86_64 %{ix86}
%if 0%{?suse_version} >= 1550
Suggests: llvm7
Suggests: clang9
Suggests: llvm9
%else
Suggests: llvm
Suggests: clang
%endif
%endif
@ -159,14 +175,15 @@ To install all of GHC install package ghc.
%endif
%if %{defined ghclibdir}
%ghc_lib_subpackage -d Cabal-3.0.1.0
%ghc_lib_subpackage -d Cabal-3.2.0.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 -c gmp-devel,libffi-devel,libdw-devel,libelf-devel%{libnuma_dep} base-4.14.0.0
%ghc_lib_subpackage -d binary-0.8.8.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.6.0
%ghc_lib_subpackage -d exceptions-0.10.4
%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}
@ -174,19 +191,20 @@ To install all of GHC install package ghc.
%ghc_lib_subpackage -d ghc-compact-0.1.0.0
%ghc_lib_subpackage -d ghc-heap-%{ghc_version_override}
%ghc_lib_subpackage -d -x ghci-%{ghc_version_override}
%ghc_lib_subpackage -d haskeline-0.7.5.0
%ghc_lib_subpackage -d hpc-0.6.0.3
%ghc_lib_subpackage -d haskeline-0.8.0.0
%ghc_lib_subpackage -d hpc-0.6.1.0
%ghc_lib_subpackage -d libiserv-%{ghc_version_override}
%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.8.0
%ghc_lib_subpackage -d process-1.6.8.2
%ghc_lib_subpackage -d stm-2.5.0.0
%ghc_lib_subpackage -d template-haskell-2.15.0.0
%ghc_lib_subpackage -d template-haskell-2.16.0.0
%ghc_lib_subpackage -d -c ncurses-devel terminfo-0.4.1.4
%ghc_lib_subpackage -d text-1.2.4.0
%ghc_lib_subpackage -d text-1.2.3.2
%ghc_lib_subpackage -d time-1.9.3
%ghc_lib_subpackage -d transformers-0.5.6.2
# 2.8.0.0
%ghc_lib_subpackage -d unix-2.7.2.2
%ghc_lib_subpackage -d xhtml-3000.2.2.1
%endif
@ -209,15 +227,21 @@ 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
@ -302,8 +326,8 @@ echo "%dir %{ghclibdir}" >> ghc-base.files
%ghc_gen_filelists ghc %{ghc_version_override}
%ghc_gen_filelists ghci %{ghc_version_override}
%ghc_gen_filelists ghc-prim 0.5.3
%ghc_gen_filelists integer-gmp 1.0.2.0
%ghc_gen_filelists ghc-prim 0.6.1
%ghc_gen_filelists integer-gmp 1.0.3.0
%define merge_filelist()\
cat ghc-%1.files >> ghc-%2.files\
@ -390,7 +414,6 @@ fi
%files compiler
%license LICENSE
%doc ANNOUNCE
%{_bindir}/ghc
%{_bindir}/ghc-%{version}
%{_bindir}/ghc-pkg
@ -418,9 +441,6 @@ fi
%{ghclibdir}/bin/hp2ps
%{ghclibdir}/bin/hpc
%{ghclibdir}/bin/hsc2hs
%ifnarch %{unregisterised_archs}
%{ghclibdir}/bin/ghc-split
%endif
%{ghclibdir}/ghc-usage.txt
%{ghclibdir}/ghci-usage.txt
%dir %{ghclibdir}/package.conf.d
@ -449,8 +469,7 @@ fi
%{ghcdocbasedir}/users_guide
%endif
%{ghcdocbasedir}/libraries/gen_contents_index
%{ghcdocbasedir}/libraries/linuwial.css
%{ghcdocbasedir}/libraries/quick-jump.css
%{ghcdocbasedir}/libraries/*.css
%{ghcdocbasedir}/libraries/prologue.txt
%{ghcdocbasedir}/libraries/synopsis.png
%{ghcdocbasedir}/index.html