From: Debian Haskell Group Date: Thu, 30 Sep 2021 18:21:04 +0000 (+0100) Subject: Allow unregisterised ghc-8.6 to build newer GHC X-Git-Tag: archive/raspbian/8.8.4-3+rpi1~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4419ee57ffdc846a9b07332abc31a662e10030ac;p=ghc.git 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 Bug: https://gitlab.haskell.org/ghc/ghc/issues/17111 Gbp-Pq: Name fix-build-using-unregisterised-v8.6 --- diff --git a/includes/stg/MiscClosures.h b/includes/stg/MiscClosures.h index 8c4cb9fc..b4bdffe4 100644 --- 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);