From 1f4e4e28185f6bc73e3c56e07c6975c0a19900f5 Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Mon, 20 Nov 2023 19:27:40 +0200 Subject: [PATCH] Add RISCV64 to Cabal This is already merged upstreamed. See: https://github.com/haskell/cabal/pull/9062 Signed-off-by: David Abdurachmanov --- cabal-add-riscv64.patch | 43 +++++++++++++++++++++++++++++++++++++++++ ghc.spec | 9 ++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 cabal-add-riscv64.patch diff --git a/cabal-add-riscv64.patch b/cabal-add-riscv64.patch new file mode 100644 index 0000000..e2237d8 --- /dev/null +++ b/cabal-add-riscv64.patch @@ -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 _ -> [] diff --git a/ghc.spec b/ghc.spec index 5f6f9eb..f8da7f8 100644 --- a/ghc.spec +++ b/ghc.spec @@ -91,7 +91,7 @@ Version: 9.4.5 # - 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: 136.1.riscv64%{?dist} +Release: 136.2.riscv64%{?dist} Summary: Glasgow Haskell Compiler License: BSD-3-Clause AND HaskellReport @@ -144,6 +144,10 @@ Patch27: haddock-remove-googleapis-fonts.patch 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 @@ -1011,6 +1015,9 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index %changelog +* Mon Nov 20 2023 David Abdurachmanov - 9.4.5-136.2.riscv64 +- Add RISCV64 to Cabal + * Tue Nov 14 2023 David Abdurachmanov - 9.4.5-136.0.riscv64 - Add support for riscv64