Attempt to build with LLVM 13

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2023-04-15 07:22:49 +03:00
parent 00accca8a3
commit 14c6c6dbfe
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
2 changed files with 30 additions and 6 deletions

View File

@ -0,0 +1,15 @@
diff --git a/configure.ac b/configure.ac
index b519146..43fbb71 100644
--- a/configure.ac
+++ b/configure.ac
@@ -690,8 +690,8 @@ AC_SUBST(InstallNameToolCmd)
# 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.
-LlvmMinVersion=9 # inclusive
-LlvmMaxVersion=13 # not inclusive
+LlvmMinVersion=10 # inclusive
+LlvmMaxVersion=17 # not inclusive
AC_SUBST([LlvmMinVersion])
AC_SUBST([LlvmMaxVersion])
sUPPORTED_LLVM_VERSION_MIN=$(echo \($LlvmMinVersion\) | sed 's/\./,/')

View File

@ -75,13 +75,13 @@
%bcond testsuite 0
# 9.2 needs llvm 9-12
%global llvm_major 12
%global llvm_major 13
%if %{with hadrian}
%global ghc_llvm_archs armv7hl s390x
%global ghc_unregisterized_arches s390 %{mips} riscv64
%global ghc_llvm_archs armv7hl s390x riscv64
%global ghc_unregisterized_arches s390 %{mips}
%else
%global ghc_llvm_archs armv7hl
%global ghc_unregisterized_arches s390 s390x %{mips} riscv64
%global ghc_llvm_archs armv7hl riscv64
%global ghc_unregisterized_arches s390 s390x %{mips}
%endif
%global obsoletes_ghcXY() \
@ -97,7 +97,7 @@ Version: 9.2.6
# - release can only be reset if *all* library versions get bumped simultaneously
# (sometimes after a major release)
# - minor release numbers for a branch should be incremented monotonically
Release: 130.2.riscv64%{?dist}
Release: 130.3.riscv64%{?dist}
Summary: Glasgow Haskell Compiler
License: BSD and HaskellReport
@ -155,6 +155,8 @@ Patch24: buildpath-abi-stability.patch
Patch26: no-missing-haddock-file-warning.patch
Patch27: haddock-remove-googleapis-fonts.patch
Patch30: allow-newer-llvm-versions.patch
# fedora ghc has been bootstrapped on
# %%{ix86} x86_64 ppc ppc64 armv7hl s390 s390x ppc64le aarch64
# and retired arches: alpha sparcv9 armv5tel
@ -473,6 +475,9 @@ rm libffi-tarballs/libffi-*.tar.gz
%patch26 -p1 -b .orig
%patch27 -p1 -b .orig
# newer LLVM versions
%patch30 -p1 -b .orig
%if %{with haddock} && %{without hadrian}
%global gen_contents_index gen_contents_index.orig
if [ ! -f "libraries/%{gen_contents_index}" ]; then
@ -1009,6 +1014,10 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index
%changelog
* Sun Apr 15 2023 David Abdurachmanov <davidlt@rivosinc.com> - 9.2.6-130.3.riscv64
- Enable LLVM for riscv64
- Change LLVM from 12 to 13
* Sun Apr 09 2023 David Abdurachmanov <davidlt@rivosinc.com> - 9.2.6-130.2.riscv64
- Enable haddock on riscv64
- Disable LLVM on riscv64