diff --git a/dd38aca95ac25adc9888083669b32ff551151259.patch b/dd38aca95ac25adc9888083669b32ff551151259.patch new file mode 100644 index 0000000..77a7100 --- /dev/null +++ b/dd38aca95ac25adc9888083669b32ff551151259.patch @@ -0,0 +1,26 @@ +From dd38aca95ac25adc9888083669b32ff551151259 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +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 + diff --git a/ghc.spec b/ghc.spec index 4496527..9e540e1 100644 --- a/ghc.spec +++ b/ghc.spec @@ -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