Compare commits
2 Commits
master
...
f29-riscv6
Author | SHA1 | Date |
---|---|---|
David Abdurachmanov | 92f668b74e | |
David Abdurachmanov | 86dcdd1d13 |
|
@ -0,0 +1,26 @@
|
||||||
|
diff --git a/aclocal.m4 b/aclocal.m4
|
||||||
|
index d5078de..cf0a0fe 100644
|
||||||
|
--- a/aclocal.m4
|
||||||
|
+++ b/aclocal.m4
|
||||||
|
@@ -216,7 +216,7 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS],
|
||||||
|
mipsel)
|
||||||
|
test -z "[$]2" || eval "[$]2=ArchMipsel"
|
||||||
|
;;
|
||||||
|
- hppa|hppa1_1|ia64|m68k|rs6000|s390|s390x|sh4|vax)
|
||||||
|
+ hppa|hppa1_1|ia64|m68k|riscv32|riscv64|rs6000|s390|s390x|sh4|vax)
|
||||||
|
test -z "[$]2" || eval "[$]2=ArchUnknown"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
@@ -1895,6 +1895,12 @@ case "$1" in
|
||||||
|
powerpc*)
|
||||||
|
$2="powerpc"
|
||||||
|
;;
|
||||||
|
+ riscv64*)
|
||||||
|
+ $2="riscv64"
|
||||||
|
+ ;;
|
||||||
|
+ riscv|riscv32*)
|
||||||
|
+ $2="riscv32"
|
||||||
|
+ ;;
|
||||||
|
rs6000)
|
||||||
|
$2="rs6000"
|
||||||
|
;;
|
49
ghc.spec
49
ghc.spec
|
@ -1,12 +1,20 @@
|
||||||
# disable prof, docs, perf build
|
# disable prof, docs, perf build
|
||||||
# NB This SHOULD be disabled 'bcond_with' for all koji production builds
|
# NB This SHOULD be disabled 'bcond_with' for all koji production builds
|
||||||
|
%ifnarch riscv64
|
||||||
%bcond_with quickbuild
|
%bcond_with quickbuild
|
||||||
|
%else
|
||||||
|
%bcond_without quickbuild
|
||||||
|
%endif
|
||||||
|
|
||||||
# to handle RCs
|
# to handle RCs
|
||||||
%global ghc_release %{version}
|
%global ghc_release %{version}
|
||||||
|
|
||||||
# make sure ghc libraries' ABI hashes unchanged
|
# make sure ghc libraries' ABI hashes unchanged
|
||||||
|
%ifnarch riscv64
|
||||||
%bcond_without abicheck
|
%bcond_without abicheck
|
||||||
|
%else
|
||||||
|
%bcond_with abicheck
|
||||||
|
%endif
|
||||||
|
|
||||||
# skip testsuite (takes time and not really being used)
|
# skip testsuite (takes time and not really being used)
|
||||||
%bcond_with testsuite
|
%bcond_with testsuite
|
||||||
|
@ -38,7 +46,7 @@ Version: 8.2.2
|
||||||
# - release can only be reset if *all* library versions get bumped simultaneously
|
# - release can only be reset if *all* library versions get bumped simultaneously
|
||||||
# (sometimes after a major release)
|
# (sometimes after a major release)
|
||||||
# - minor release numbers for a branch should be incremented monotonically
|
# - minor release numbers for a branch should be incremented monotonically
|
||||||
Release: 70%{?dist}
|
Release: 70.2.riscv64%{?dist}
|
||||||
Summary: Glasgow Haskell Compiler
|
Summary: Glasgow Haskell Compiler
|
||||||
|
|
||||||
License: BSD and HaskellReport
|
License: BSD and HaskellReport
|
||||||
|
@ -74,23 +82,26 @@ Patch26: ghc-Debian-no-missing-haddock-file-warning.patch
|
||||||
Patch27: ghc-Debian-reproducible-tmp-names.patch
|
Patch27: ghc-Debian-reproducible-tmp-names.patch
|
||||||
Patch28: ghc-Debian-x32-use-native-x86_64-insn.patch
|
Patch28: ghc-Debian-x32-use-native-x86_64-insn.patch
|
||||||
|
|
||||||
|
# RISC-V support (already upstreamed and available in newer versions)
|
||||||
|
Patch40: ghc-8.2.20-riscv.patch
|
||||||
|
|
||||||
# fedora ghc has been bootstrapped on
|
# fedora ghc has been bootstrapped on
|
||||||
# %%{ix86} x86_64 ppc ppc64 armv7hl s390 s390x ppc64le aarch64
|
# %%{ix86} x86_64 ppc ppc64 armv7hl s390 s390x ppc64le aarch64
|
||||||
# and retired arches: alpha sparcv9 armv5tel
|
# and retired arches: alpha sparcv9 armv5tel
|
||||||
# see also deprecated ghc_arches defined in /etc/rpm/macros.ghc-srpm by redhat-rpm-macros
|
# see also deprecated ghc_arches defined in /etc/rpm/macros.ghc-srpm by redhat-rpm-macros
|
||||||
|
|
||||||
BuildRequires: ghc-compiler
|
#BuildRequires: ghc-compiler
|
||||||
# for ABI hash checking
|
# for ABI hash checking
|
||||||
%if %{with abicheck}
|
%if %{with abicheck}
|
||||||
BuildRequires: ghc
|
#BuildRequires: ghc
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: ghc-rpm-macros-extra >= 1.8
|
#BuildRequires: ghc-rpm-macros-extra >= 1.8
|
||||||
BuildRequires: ghc-binary-devel
|
#BuildRequires: ghc-binary-devel
|
||||||
BuildRequires: ghc-bytestring-devel
|
#BuildRequires: ghc-bytestring-devel
|
||||||
BuildRequires: ghc-containers-devel
|
#BuildRequires: ghc-containers-devel
|
||||||
BuildRequires: ghc-directory-devel
|
#BuildRequires: ghc-directory-devel
|
||||||
BuildRequires: ghc-pretty-devel
|
#BuildRequires: ghc-pretty-devel
|
||||||
BuildRequires: ghc-process-devel
|
#BuildRequires: ghc-process-devel
|
||||||
BuildRequires: gmp-devel
|
BuildRequires: gmp-devel
|
||||||
BuildRequires: libffi-devel
|
BuildRequires: libffi-devel
|
||||||
# for terminfo
|
# for terminfo
|
||||||
|
@ -293,6 +304,10 @@ rm -r libffi-tarballs
|
||||||
%patch27 -p1 -b .orig
|
%patch27 -p1 -b .orig
|
||||||
%patch28 -p1 -b .orig
|
%patch28 -p1 -b .orig
|
||||||
|
|
||||||
|
%ifarch riscv64
|
||||||
|
%patch40 -p1 -b .riscv64
|
||||||
|
%endif
|
||||||
|
|
||||||
%global gen_contents_index gen_contents_index.orig
|
%global gen_contents_index gen_contents_index.orig
|
||||||
%if %{with docs}
|
%if %{with docs}
|
||||||
if [ ! -f "libraries/%{gen_contents_index}" ]; then
|
if [ ! -f "libraries/%{gen_contents_index}" ]; then
|
||||||
|
@ -334,8 +349,8 @@ EOF
|
||||||
#EXTRA_HC_OPTS=-debug
|
#EXTRA_HC_OPTS=-debug
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# for patch12
|
# for patch12 and patch40
|
||||||
%ifarch armv7hl
|
%ifarch armv7hl riscv64
|
||||||
autoreconf
|
autoreconf
|
||||||
%else
|
%else
|
||||||
# for patch5
|
# for patch5
|
||||||
|
@ -347,6 +362,9 @@ export CFLAGS="${CFLAGS:-%optflags}"
|
||||||
export LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"
|
export LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"
|
||||||
# for ghc >= 8.2
|
# for ghc >= 8.2
|
||||||
export CC=%{_bindir}/gcc
|
export CC=%{_bindir}/gcc
|
||||||
|
export CC_STAGE0=%{_bindir}/gcc
|
||||||
|
export AR_STAGE0=%{_bindir}/ar
|
||||||
|
export LD_STAGE0=%{_bindir}/ld
|
||||||
# * %%configure induces cross-build due to different target/host/build platform names
|
# * %%configure induces cross-build due to different target/host/build platform names
|
||||||
./configure --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} \
|
./configure --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} \
|
||||||
--bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} \
|
--bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} \
|
||||||
|
@ -354,7 +372,9 @@ export CC=%{_bindir}/gcc
|
||||||
--libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} \
|
--libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} \
|
||||||
--sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \
|
--sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \
|
||||||
--docdir=%{_docdir}/ghc \
|
--docdir=%{_docdir}/ghc \
|
||||||
|
%ifarch %{ghc_llvm_archs}
|
||||||
--with-llc=%{_bindir}/llc-%{llvm_major} --with-opt=%{_bindir}/opt-%{llvm_major} \
|
--with-llc=%{_bindir}/llc-%{llvm_major} --with-opt=%{_bindir}/opt-%{llvm_major} \
|
||||||
|
%endif
|
||||||
%if 0%{?fedora} || 0%{?rhel} > 6
|
%if 0%{?fedora} || 0%{?rhel} > 6
|
||||||
--with-system-libffi \
|
--with-system-libffi \
|
||||||
%endif
|
%endif
|
||||||
|
@ -574,7 +594,7 @@ fi
|
||||||
%{ghclibdir}/bin/ghc-iserv-prof
|
%{ghclibdir}/bin/ghc-iserv-prof
|
||||||
%endif
|
%endif
|
||||||
%{ghclibdir}/bin/runghc
|
%{ghclibdir}/bin/runghc
|
||||||
%ifnarch s390 s390x %{mips}
|
%ifnarch s390 s390x %{mips} riscv64
|
||||||
%{ghclibdir}/bin/ghc-split
|
%{ghclibdir}/bin/ghc-split
|
||||||
%endif
|
%endif
|
||||||
%{ghclibdir}/bin/hp2ps
|
%{ghclibdir}/bin/hp2ps
|
||||||
|
@ -640,6 +660,9 @@ fi
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Oct 24 2018 David Abdurachmanov <david.abdurachmanov@gmail.com> - 8.2.2-70.2.riscv64
|
||||||
|
- 1st attempt to bootstrap unregistered build for RISC-V (riscv64)
|
||||||
|
|
||||||
* Wed Oct 17 2018 Jens Petersen <petersen@redhat.com> - 8.2.2-70
|
* Wed Oct 17 2018 Jens Petersen <petersen@redhat.com> - 8.2.2-70
|
||||||
- backport quickbuild config from 8.4 module and extend to perf_build
|
- backport quickbuild config from 8.4 module and extend to perf_build
|
||||||
- disable -Wall on s390x like in 8.4 module to silence warning flood
|
- disable -Wall on s390x like in 8.4 module to silence warning flood
|
||||||
|
|
Loading…
Reference in New Issue