diff --git a/ghc-hadrian-riscv64-rts--qg.patch b/ghc-hadrian-riscv64-rts--qg.patch new file mode 100644 index 0000000000000000000000000000000000000000..57a90881645397d7d9513e1fb47ca0181400bba7 --- /dev/null +++ b/ghc-hadrian-riscv64-rts--qg.patch @@ -0,0 +1,11 @@ +--- ghc-9.4.1/hadrian/hadrian.cabal~ 2022-08-07 12:00:38.000000000 +0800 ++++ ghc-9.4.1/hadrian/hadrian.cabal 2022-08-10 19:54:33.335164261 +0800 +@@ -173,7 +173,7 @@ + -- waiting for external processes + -- * -qg: Don't use parallel GC as the synchronization + -- time tends to eat any benefit. +- "-with-rtsopts=-I0 -qg" ++ "-with-rtsopts=-I0" + -threaded + + if flag(selftest) diff --git a/ghc.spec b/ghc.spec index 3079e5e26db920cb274b9eb669d37c3231e3933f..9d9de66ae0f574eef7e339a0071ae74cae64d17b 100644 --- a/ghc.spec +++ b/ghc.spec @@ -60,7 +60,7 @@ Name: ghc Version: %{full_version} -Release: 1 +Release: 2 Summary: The Glorious Glasgow Haskell Compiler License: BSD-3-Clause URL: https://www.haskell.org/ghc @@ -83,6 +83,9 @@ Patch3: ghc-Cabal-install-PATH-warning.patch Patch4: riscv64-ncg.patch Patch5: hadrian-9.10-deps.patch Patch6: ghc-pie.patch +# riscv64 does not support the argument -qg of hadrian +# https://src.fedoraproject.org/rpms/ghc/blob/2b31b684ce8b65747eb12acbe167b1b3d08515a4/f/ghc-hadrian-s390x-rts--qg.patch +Patch7: ghc-hadrian-riscv64-rts--qg.patch BuildRequires: binutils-devel BuildRequires: gcc-c++ @@ -272,6 +275,10 @@ rm libffi-tarballs/libffi-*.tar.gz %patch -P5 -p1 %patch -P6 -p1 +%ifarch riscv64 +%patch -P7 -p1 +%endif + %build %if %{with ghc_bootstrap} export PATH=/opt/bin:$PATH @@ -554,6 +561,9 @@ $GHC --info %endif %changelog +* Sat Jul 05 2025 Suyun - 9.10.1-2 +- Add riscv64 support + * Tue Dec 12 2024 Lin Runze - 9.10.1-1 - Update ghc to 9.10.1, also bootstrap_source to 9.8.2