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

epel9
Jens Petersen 4 years ago
parent bb36bff0b3
commit 14e83352e8

1
.gitignore vendored

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

@ -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);

@ -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])

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

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

Loading…
Cancel
Save