diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2022-08-17 00:16:01 +0200 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2022-08-17 00:16:01 +0200 |
commit | f1aa595cbef14c725537ca2531eff58cc23c4c5d (patch) | |
tree | 05305b4160cf7ff25babaf550401855ae9f0dd23 | |
parent | b366438971620e3d771cf5d753a908b279f31a17 (diff) |
community/ghc: switch to llvm14
-rw-r--r-- | community/ghc/APKBUILD | 4 | ||||
-rw-r--r-- | community/ghc/llvm14.patch | 32 |
2 files changed, 35 insertions, 1 deletions
diff --git a/community/ghc/APKBUILD b/community/ghc/APKBUILD index 34f956dc2aa..d7be1aac31d 100644 --- a/community/ghc/APKBUILD +++ b/community/ghc/APKBUILD @@ -7,7 +7,7 @@ pkgrel=0 # Normal non rc candidate _urlprefix="$pkgver" _pkgprefix="$pkgname-$pkgver" -_llvmver=12 +_llvmver=14 pkgdesc="The Glasgow Haskell Compiler" # Next 5 variables only needed for release candidate testing #pkgrcver=8.2.2 @@ -52,6 +52,7 @@ source="https://downloads.haskell.org/~ghc/$_urlprefix/$_pkgprefix-src.tar.xz 0001-testsuite-T12600-avoid-broken-pipe-on-Alpine.patch skip-tests.patch tests-use-iterable-from-collections-abc.patch + llvm14.patch " prepare() { @@ -167,4 +168,5 @@ ac2ad793b4d33ea890e236820af4cd10996b47d0f4249c825b31450145cb8195c2be62f2d7942cc3 b71bb7945c6cae3ea324ff1de9576b883f0e63169fbe50d781acc0f4fb694387c43bf7aa1bd1cca236613ff202dd503c4577dc06368614752affdc54a5c62101 0001-testsuite-T12600-avoid-broken-pipe-on-Alpine.patch 3c46fab45a484a96f2166b4331a00708792b8107b697e4ec0cb3d51bcc6b7305142e380e6f1ed3de9f8359482d0392c7639396366afed2dea440087109367d4f skip-tests.patch c3bc4f872d3903c4446167df1a88ec54cdd712c4b0ea0b0c35487e9b7e5bd7124da0688d1d5fbf26cad932e841f0299ada304e2300c25e01ffe3de10b74e78c1 tests-use-iterable-from-collections-abc.patch +2e11a83844c4a9f895f60af9f014cd1989eeb4efb6a96576d62aa0abe55792eaf4f4963c05599900edb7ad371745923a4022119a802b3f8905d2c8fcb46697af llvm14.patch " diff --git a/community/ghc/llvm14.patch b/community/ghc/llvm14.patch new file mode 100644 index 00000000000..3b0e9476a39 --- /dev/null +++ b/community/ghc/llvm14.patch @@ -0,0 +1,32 @@ +Make GHC pass all tests with LLVM14 by disabling warnings about using an +unsupported LLVM version as these cause outputs expected by the test +suite to not match. + +diff -upr ghc-9.0.2.orig/compiler/GHC/CmmToLlvm.hs ghc-9.0.2/compiler/GHC/CmmToLlvm.hs +--- ghc-9.0.2.orig/compiler/GHC/CmmToLlvm.hs 2022-08-17 20:13:19.037448388 +0200 ++++ ghc-9.0.2/compiler/GHC/CmmToLlvm.hs 2022-08-17 20:13:43.364174290 +0200 +@@ -62,12 +62,6 @@ llvmCodeGen dflags h cmm_stream + debugTraceMsg dflags 2 + (text "Using LLVM version:" <+> text (llvmVersionStr ver)) + let doWarn = wopt Opt_WarnUnsupportedLlvmVersion dflags +- when (not (llvmVersionSupported ver) && doWarn) $ putMsg dflags $ +- "You are using an unsupported version of LLVM!" $$ +- "Currently only" <+> text (llvmVersionStr supportedLlvmVersionLowerBound) <+> +- "to" <+> text (llvmVersionStr supportedLlvmVersionUpperBound) <+> "is supported." <+> +- "System LLVM version: " <> text (llvmVersionStr ver) $$ +- "We will try though..." + let isS390X = platformArch (targetPlatform dflags) == ArchS390X + let major_ver = head . llvmVersionList $ ver + when (isS390X && major_ver < 10 && doWarn) $ putMsg dflags $ +diff -upr ghc-9.0.2.orig/configure.ac ghc-9.0.2/configure.ac +--- ghc-9.0.2.orig/configure.ac 2022-08-17 20:13:18.570780585 +0200 ++++ ghc-9.0.2/configure.ac 2022-08-17 20:13:56.634206602 +0200 +@@ -719,7 +719,7 @@ AC_SUBST(InstallNameToolCmd) + # versions of LLVM simultaneously, but that stopped working around + # 3.5/3.6 release of LLVM. + LlvmMinVersion=9 # inclusive +-LlvmMaxVersion=13 # not inclusive ++LlvmMaxVersion=14 # not inclusive + AC_SUBST([LlvmMinVersion]) + AC_SUBST([LlvmMaxVersion]) + sUPPORTED_LLVM_VERSION_MIN=$(echo \($LlvmMinVersion\) | sed 's/\./,/') |