riscv64: Enable support for GHCi (internal interpreter)

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
This commit is contained in:
Richard W.M. Jones 2024-02-12 13:57:25 +00:00
parent 5bda6f7d57
commit c1d77a5759
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,26 @@
From dd38aca95ac25adc9888083669b32ff551151259 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@suse.de>
Date: Mon, 19 Jun 2023 10:38:26 +0200
Subject: [PATCH] Hadrian: enable GHCi support on riscv64
---
hadrian/src/Oracles/Setting.hs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hadrian/src/Oracles/Setting.hs b/hadrian/src/Oracles/Setting.hs
index b9e5d312074..93561a94fe4 100644
--- a/hadrian/src/Oracles/Setting.hs
+++ b/hadrian/src/Oracles/Setting.hs
@@ -302,7 +302,8 @@ ghcWithInterpreter = do
, "darwin", "kfreebsdgnu" ]
goodArch <- anyTargetArch [ "i386", "x86_64", "powerpc"
, "arm", "aarch64", "s390x"
- , "powerpc64", "powerpc64le" ]
+ , "powerpc64", "powerpc64le"
+ , "riscv64" ]
return $ goodOs && goodArch
-- | Variants of the ARM architecture.
--
GitLab

View File

@ -149,6 +149,10 @@ Patch30: https://src.opensuse.org/rpm/ghc/raw/branch/factory/sphinx7.patch
# See: https://github.com/haskell/cabal/pull/9062
Patch40: cabal-add-riscv64.patch
# Enable GHCi support on riscv64
# Upstream in >= 9.9.
Patch41: https://gitlab.haskell.org/ghc/ghc/-/commit/dd38aca95ac25adc9888083669b32ff551151259.patch
# https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms
# fedora ghc has been bootstrapped on
@ -475,6 +479,9 @@ rm libffi-tarballs/libffi-*.tar.gz
%patch -P30 -p1 -b .orig
%endif
#GHCi support
%patch -P41 -p1 -b .orig
%if %{with haddock} && %{without hadrian}
%global gen_contents_index gen_contents_index.orig
if [ ! -f "libraries/%{gen_contents_index}" ]; then