Compare commits

...

8 Commits

Author SHA1 Message Date
David Abdurachmanov 04a4bb905f
Remove obsolete patch
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2020-04-16 20:23:53 +03:00
David Abdurachmanov 39c5c655dd
Merge remote-tracking branch 'up/master' into master-riscv64
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2020-04-16 20:23:11 +03:00
David Abdurachmanov bf78152454
Fix BR for riscv64
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-09-21 22:53:57 +03:00
David Abdurachmanov b1666b2d5b
Rebase RISCV patch
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-09-21 19:50:18 +03:00
David Abdurachmanov 222ebef05a
Merge remote-tracking branch 'up/f31' into master-riscv64
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-09-21 17:03:03 +03:00
David Abdurachmanov bafa3837d8
Merge remote-tracking branch 'up/master' into master-riscv64
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-07-23 11:08:25 +03:00
David Abdurachmanov 33d0faf86d
Fix internal compiler panic for unregistered arches
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2019-02-24 18:48:36 +01:00
David Abdurachmanov eceb72c24e
Add support for RISC-V (riscv64)
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2019-02-19 15:18:09 +01:00
2 changed files with 40 additions and 4 deletions

26
ghc-8.2.20-riscv.patch Normal file
View File

@ -0,0 +1,26 @@
diff --git a/aclocal.m4 b/aclocal.m4
index 6eda094..728d8db 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -217,7 +217,7 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS],
mipsel)
test -z "[$]2" || eval "[$]2=ArchMipsel"
;;
- hppa|hppa1_1|ia64|m68k|nios2|rs6000|s390|s390x|sh4|vax)
+ hppa|hppa1_1|ia64|m68k|nios2|riscv32|riscv64|rs6000|s390|s390x|sh4|vax)
test -z "[$]2" || eval "[$]2=ArchUnknown"
;;
*)
@@ -1906,6 +1906,12 @@ case "$1" in
powerpc*)
$2="powerpc"
;;
+ riscv64*)
+ $2="riscv64"
+ ;;
+ riscv|riscv32*)
+ $2="riscv32"
+ ;;
rs6000)
$2="rs6000"
;;

View File

@ -41,7 +41,7 @@
%global llvm_major 6.0
%global ghc_llvm_archs armv7hl aarch64
%global ghc_unregisterized_arches s390 s390x %{mips}
%global ghc_unregisterized_arches s390 s390x %{mips} riscv64
Name: ghc
Version: 8.6.5
@ -49,7 +49,7 @@ Version: 8.6.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: 103%{?dist}
Release: 103.0.riscv64%{?dist}
Summary: Glasgow Haskell Compiler
License: BSD and HaskellReport
@ -107,6 +107,9 @@ Patch32: https://salsa.debian.org/haskell-team/DHG_packages/raw/master/p/ghc/deb
# https://salsa.debian.org/haskell-team/DHG_packages/blob/master/p/ghc/debian/patches/fix-build-using-unregisterized-v8.4
Patch34: fix-build-using-unregisterized-v8.4.patch
# RISC-V
Patch40: ghc-8.2.20-riscv.patch
# fedora ghc has been bootstrapped on
# %%{ix86} x86_64 ppc ppc64 armv7hl s390 s390x ppc64le aarch64
# and retired arches: alpha sparcv9 armv5tel
@ -151,7 +154,7 @@ BuildRequires: llvm >= %{llvm_major}
%if %{with dwarf}
BuildRequires: elfutils-devel
%endif
%ifarch armv7hl
%ifarch armv7hl riscv64
# patch12
BuildRequires: autoconf, automake
%endif
@ -358,6 +361,10 @@ cd libraries/process
%patch30 -p1 -b .orig
%patch32 -p1 -b .orig
%ifarch riscv64
%patch40 -p1 -b .orig
%endif
%global gen_contents_index gen_contents_index.orig
%if %{with haddock}
if [ ! -f "libraries/%{gen_contents_index}" ]; then
@ -404,7 +411,7 @@ EOF
%build
# for patch12
%ifarch armv7hl
%ifarch armv7hl riscv64
autoreconf
%endif
@ -683,6 +690,9 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index
%changelog
* Thu Apr 16 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> - 8.6.5-103.0.riscv64
- Enable RISC-V (riscv64)
* Thu Apr 9 2020 Jens Petersen <petersen@redhat.com> - 8.6.5-103
- fix running of gen_contents_index when no haddocks (#1813548)