add fix-build-using-unregisterised-v8.6.patch from Debian

This commit is contained in:
Jens Petersen 2020-07-15 03:03:49 +08:00
parent a07f9ed8a0
commit bc4cb4c3a0
2 changed files with 33 additions and 0 deletions

View File

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

View File

@ -77,6 +77,7 @@ Patch12: ghc-armv7-VFPv3D16--NEON.patch
# for unregisterized (s390x)
# 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
@ -327,6 +328,7 @@ rm -r libffi-tarballs
%ifarch %{ghc_unregisterized_arches}
%patch15 -p1 -b .orig
%patch16 -p1 -b .orig
%endif
# bigendian