#7 riscv64: Enable support for GHCi (internal interpreter)
Merged 2 months ago by petersen. Opened 2 months ago by rjones.
rpms/ rjones/ghc riscv64-ghci  into  rawhide

@@ -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

+ 

file modified
+7
@@ -149,6 +149,10 @@ 

  # 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 @@ 

  %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

Signed-off-by: Richard W.M. Jones rjones@redhat.com

Thanks - seems a conflict, because of the earlier PRs perhaps?

Yes it possibly conflicts with the cabal patch. I will take a look and rebase this one.

Note this patch is only upstream in ghc >= 9.9

rebased onto c1d77a5

2 months ago

It only affects the hadrian build tool, so it should be fine.

Pull-Request has been merged by petersen

2 months ago