revert to ghc-8.10.4 (since ghc-8.10.5 fails to rebuild on s390x)

This commit is contained in:
Jens Petersen 2021-07-15 20:16:05 +08:00
parent f2172368be
commit 499775baf0
5 changed files with 36 additions and 58 deletions

1
.gitignore vendored
View File

@ -33,3 +33,4 @@ testsuite-6.12.3.tar.bz2
/ghc-8.8.4-src.tar.xz
/ghc-8.10.5-src.tar.xz.sig
/ghc-8.10.5-src.tar.xz
/ghc-8.10.4-src.tar.xz.sig

View File

@ -1,31 +0,0 @@
Description: Allow unregisterised ghc-8.6 to build newer GHC
Commit af9b744bbf1 introduced a regression stopping existing unregisterised
compilers from being able to compile newer versions of GHC. The problem is
that the bootstrap compiler uses the newer `includes/stg/MiscClosures.h` file
where some defines have been renamed, resulting in the following error:
.
error: stg_atomicModifyMutVarzh undeclared (first use in this function); did you mean stg_atomicModifyMutVar2zh?
.
For more information, see https://gitlab.haskell.org/ghc/ghc/issues/17111.
.
This patch can be removed, once ghc-8.6 is no longer the bootstrap compiler.
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Bug: https://gitlab.haskell.org/ghc/ghc/issues/17111
Index: b/includes/stg/MiscClosures.h
===================================================================
--- a/includes/stg/MiscClosures.h
+++ b/includes/stg/MiscClosures.h
@@ -390,8 +390,12 @@ RTS_FUN_DECL(stg_copySmallMutableArrayzh
RTS_FUN_DECL(stg_casSmallArrayzh);
RTS_FUN_DECL(stg_newMutVarzh);
+#if __GLASGOW_HASKELL__ < 808
+RTS_FUN_DECL(stg_atomicModifyMutVarzh);
+#else
RTS_FUN_DECL(stg_atomicModifyMutVar2zh);
RTS_FUN_DECL(stg_atomicModifyMutVarzuzh);
+#endif
RTS_FUN_DECL(stg_casMutVarzh);
RTS_FUN_DECL(stg_isEmptyMVarzh);

11
ghc-8.10-llvm10.patch Normal file
View File

@ -0,0 +1,11 @@
--- ghc-8.10.2/configure.ac~ 2020-08-04 05:51:52.000000000 +0800
+++ ghc-8.10.2/configure.ac 2020-08-11 18:57:45.074836178 +0800
@@ -673,7 +673,7 @@
# tools we are looking for. In the past, GHC supported a number of
# versions of LLVM simultaneously, but that stopped working around
# 3.5/3.6 release of LLVM.
-LlvmVersion=9
+LlvmVersion=10
AC_SUBST([LlvmVersion])
sUPPORTED_LLVM_VERSION=$(echo \($LlvmVersion\) | sed 's/\./,/')
AC_DEFINE_UNQUOTED([sUPPORTED_LLVM_VERSION], ${sUPPORTED_LLVM_VERSION}, [The supported LLVM version number])

View File

@ -8,7 +8,7 @@
# to handle RCs
%global ghc_release %{version}
%global base_ver 4.14.2.0
%global base_ver 4.14.1.0
# build profiling libraries
# build haddock
@ -37,14 +37,14 @@
# no longer build testsuite (takes time and not really being used)
%bcond_with testsuite
# 8.10.5 can use llvm 9-12
%global llvm_major 11
%global ghc_llvm_archs armv7hl aarch64 s390x
# 8.10 recommends llvm-9 but 10 or even 11 should work
%global llvm_major 10
%global ghc_llvm_archs armv7hl aarch64
%global ghc_unregisterized_arches s390 %{mips} riscv64
%global ghc_unregisterized_arches s390 %{mips} riscv64 s390x
Name: ghc
Version: 8.10.5
Version: 8.10.4
# Since library subpackages are versioned:
# - release can only be reset if *all* library versions get bumped simultaneously
# (sometimes after a major release)
@ -68,21 +68,17 @@ Patch2: ghc-Cabal-install-PATH-warning.patch
Patch3: ghc-gen_contents_index-nodocs.patch
# https://phabricator.haskell.org/rGHC4eebc8016f68719e1ccdf460754a97d1f4d6ef05
Patch6: ghc-8.6.3-sphinx-1.8.patch
# https://gitlab.haskell.org/ghc/ghc/-/issues/19763
# https://gitlab.haskell.org/ghc/ghc/-/merge_requests/5915
Patch7: https://gitlab.haskell.org/ghc/ghc/-/commit/296f25fa5f0fce033b529547e0658076e26f4cda.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1977317
Patch8: ghc-userguide-sphinx4.patch
# Arch dependent patches
# arm
Patch12: ghc-armv7-VFPv3D16--NEON.patch
Patch13: ghc-8.10-llvm10.patch
# for unregisterized
# https://ghc.haskell.org/trac/ghc/ticket/15689
Patch15: ghc-warnings.mk-CC-Wall.patch
Patch16: fix-build-using-unregisterised-v8.6.patch
# bigendian (s390x and ppc64)
# https://gitlab.haskell.org/ghc/ghc/issues/15411
@ -117,6 +113,7 @@ BuildRequires: ghc-process-devel
BuildRequires: ghc-transformers-devel
BuildRequires: alex
BuildRequires: gmp-devel
BuildRequires: hscolour
BuildRequires: libffi-devel
BuildRequires: make
# for terminfo
@ -134,8 +131,8 @@ BuildRequires: llvm%{llvm_major}
%if %{with dwarf}
BuildRequires: elfutils-devel
%endif
%ifarch armv7hl
# patch12
%ifarch armv7hl %{ghc_llvm_archs}
# patch12, patch13
BuildRequires: autoconf, automake
%endif
%if %{without quickbuild}
@ -246,7 +243,7 @@ This package provides the User Guide and Haddock manual.
%ghc_lib_subpackage -d -l %BSDHaskellReport -c gmp-devel%{?_isa},libffi-devel%{?_isa} base-%{base_ver}
%ghc_lib_subpackage -d -l BSD binary-0.8.8.0
%ghc_lib_subpackage -d -l BSD bytestring-0.10.12.0
%ghc_lib_subpackage -d -l %BSDHaskellReport containers-0.6.4.1
%ghc_lib_subpackage -d -l %BSDHaskellReport containers-0.6.2.1
%ghc_lib_subpackage -d -l %BSDHaskellReport deepseq-1.4.4.0
%ghc_lib_subpackage -d -l %BSDHaskellReport directory-1.3.6.0
%ghc_lib_subpackage -d -l %BSDHaskellReport exceptions-0.10.4
@ -267,7 +264,7 @@ This package provides the User Guide and Haddock manual.
%ghc_lib_subpackage -d -l BSD parsec-3.1.14.0
%ghc_lib_subpackage -d -l BSD pretty-1.1.3.6
%ghc_lib_subpackage -d -l %BSDHaskellReport process-1.6.9.0
%ghc_lib_subpackage -d -l BSD stm-2.5.0.1
%ghc_lib_subpackage -d -l BSD stm-2.5.0.0
%ghc_lib_subpackage -d -l BSD template-haskell-2.16.0.0
%ghc_lib_subpackage -d -l BSD -c ncurses-devel%{?_isa} terminfo-0.4.1.4
%ghc_lib_subpackage -d -l BSD text-1.2.4.1
@ -317,7 +314,6 @@ packages to be automatically installed too.
%patch2 -p1 -b .orig
%patch6 -p1 -b .orig
%patch7 -p1 -b .orig
%patch8 -p1 -b .orig
rm -r libffi-tarballs
@ -326,10 +322,13 @@ rm -r libffi-tarballs
%patch12 -p1 -b .orig
%endif
%ifarch %{ghc_llvm_archs}
%patch13 -p1 -b .orig13
%endif
# remove s390x after switching to llvm
%ifarch %{ghc_unregisterized_arches} s390x
%patch15 -p1 -b .orig
%patch16 -p1 -b .orig
%endif
# bigendian
@ -386,8 +385,8 @@ BUILD_SPHINX_PDF = NO
EOF
%build
# for patch12
%ifarch armv7hl
# for patch12 and patch13
%ifarch armv7hl %{ghc_llvm_archs}
autoreconf
%endif
@ -660,12 +659,10 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index
%changelog
* Mon Jul 12 2021 Jens Petersen <petersen@redhat.com> - 8.10.5-113
- enable llvm for s390x
* Sun Jul 11 2021 Jens Petersen <petersen@redhat.com> - 8.10.5-112
- rebase to 8.10.5 from ghc:8.10 module stream
- https://downloads.haskell.org/~ghc/8.10.5/docs/html/users_guide/8.10.1-notes.html
* Thu Jul 15 2021 Jens Petersen <petersen@redhat.com> - 8.10.4-113
- rebase to 8.10.4 from ghc:8.10 module stream
- https://downloads.haskell.org/ghc/8.10.4/docs/html/users_guide/8.10.1-notes.html
- use llvm10 for ARM
* Wed Jun 30 2021 Jens Petersen <petersen@redhat.com> - 8.8.4-111
- fix build with sphinx4 (#1977317)

View File

@ -1,2 +1,2 @@
SHA512 (ghc-8.10.5-src.tar.xz.sig) = c9d1abf8f4065c1935be877b4978638130307afbfef988ac16d7c972e502b71056a5e5acc1b54b903d8f939a0f2e3ec4ad953cdc7a9ce21024f398ce84cfb2da
SHA512 (ghc-8.10.5-src.tar.xz) = b5f39be0accd5c1cecf1cc326ba3142f561d2ac93e9abf366fe46307d7c0712aac244836e659e1a4d9d0fb98299ea96edc8e8a06f3a81b528b14914b94057ffe
SHA512 (ghc-8.10.4-src.tar.xz) = 9bb078cb72535a352243b83b671c871392564efd09e478549f27ae58fc6f46e337a0782f5500d26d5704ad96eace22e77bb36031a1fe9b7e175f265b0b9c028b
SHA512 (ghc-8.10.4-src.tar.xz.sig) = af7dea2adfe120fb35aba203381062c0d6bb0fd76e675ed016019014954a82a58e1a8509b523ffc826ab4ca717a4e00d30280ac9bc1b2e120af6aecbb314897b