#5 Add RISCV64 to Cabal
Merged 2 months ago by petersen. Opened 2 months ago by rjones.
rpms/ rjones/ghc riscv64-cabal  into  rawhide

Add RISCV64 to Cabal
David Abdurachmanov • 2 months ago  
@@ -0,0 +1,43 @@ 

+ diff --git a/libraries/Cabal/Cabal-syntax/src/Distribution/System.hs b/libraries/Cabal/Cabal-syntax/src/Distribution/System.hs

+ index 68bda63..6521464 100644

+ --- a/libraries/Cabal/Cabal-syntax/src/Distribution/System.hs

+ +++ b/libraries/Cabal/Cabal-syntax/src/Distribution/System.hs

+ @@ -159,7 +159,7 @@ buildOS = classifyOS Permissive System.Info.os

+  

+  -- | These are the known Arches: I386, X86_64, PPC, PPC64, Sparc,

+  -- Arm, AArch64, Mips, SH, IA64, S390, S390X, Alpha, Hppa, Rs6000,

+ --- M68k, Vax, JavaScript and Wasm32.

+ +-- M68k, Vax, RISCV64, JavaScript and Wasm32.

+  --

+  -- The following aliases can also be used:

+  --    * PPC alias: powerpc

+ @@ -173,7 +173,7 @@ data Arch = I386  | X86_64  | PPC  | PPC64 | Sparc

+            | Arm   | AArch64 | Mips | SH

+            | IA64  | S390    | S390X

+            | Alpha | Hppa    | Rs6000

+ -          | M68k  | Vax

+ +          | M68k  | Vax | RISCV64

+            | JavaScript

+            | Wasm32

+            | OtherArch String

+ @@ -188,7 +188,7 @@ knownArches = [I386, X86_64, PPC, PPC64, Sparc

+                ,Arm, AArch64, Mips, SH

+                ,IA64, S390, S390X

+                ,Alpha, Hppa, Rs6000

+ -              ,M68k, Vax

+ +              ,M68k, Vax, RISCV64

+                ,JavaScript

+                ,Wasm32]

+  

+ diff --git a/libraries/Cabal/Cabal/src/Distribution/Simple/PreProcess.hs b/libraries/Cabal/Cabal/src/Distribution/Simple/PreProcess.hs

+ index fbe5710..a53b33d 100644

+ --- a/libraries/Cabal/Cabal/src/Distribution/Simple/PreProcess.hs

+ +++ b/libraries/Cabal/Cabal/src/Distribution/Simple/PreProcess.hs

+ @@ -729,6 +729,7 @@ platformDefines lbi =

+        Rs6000      -> ["rs6000"]

+        M68k        -> ["m68k"]

+        Vax         -> ["vax"]

+ +      RISCV64     -> ["riscv64"]

+        JavaScript  -> ["javascript"]

+        Wasm32      -> ["wasm32"]

+        OtherArch _ -> []

file modified
+4
@@ -145,6 +145,10 @@ 

  

  Patch30: https://src.opensuse.org/rpm/ghc/raw/branch/factory/sphinx7.patch

  

+ # RISCV64 added to Cabal

+ # See: https://github.com/haskell/cabal/pull/9062

+ Patch40: cabal-add-riscv64.patch

+ 

  # https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms

  

  # fedora ghc has been bootstrapped on

This is already merged upstreamed. See:
https://github.com/haskell/cabal/pull/9062

Signed-off-by: David Abdurachmanov davidlt@rivosinc.com

Pull-Request has been merged by petersen

2 months ago

@davidlt I notice this doesn't apply the patch (doesn't have a %patch -P40 ... in the %prep section). Is that right?

You are right. Somehow I missed that on our dist-git. I checked Fedora/RISCV Koji logs and the patch wasn't applied. Could you make a PR fixing this?

Yes I'll create a new PR shortly

Metadata