Merge remote-tracking branch 'up/master' into master-riscv64

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
This commit is contained in:
David Abdurachmanov 2020-04-16 20:23:11 +03:00
commit 39c5c655dd
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
2 changed files with 41 additions and 10 deletions

View File

@ -0,0 +1,11 @@
--- ghc-8.6.5/libraries/gen_contents_index~ 2020-02-24 15:02:26.318866694 +0800
+++ ghc-8.6.5/libraries/gen_contents_index 2020-04-09 18:18:40.290722327 +0800
@@ -47,6 +47,8 @@
HADDOCK_ARGS="$HADDOCK_ARGS $HADDOCK_ARG"
done
else
+ if ! ls */*.haddock &>/dev/null; then exit 0; fi
+
HADDOCK=/usr/bin/haddock
# We don't want the GHC API to swamp the index
HADDOCK_FILES=`ls -1 */*.haddock | grep -v '/ghc\.haddock' | sort`

View File

@ -23,6 +23,12 @@
%bcond_without perf_build
%endif
# to enable dwarf info (only on intel archs): overrides perf
# default is off: bcond_with
%ifarch x86_64 i686
%bcond_with dwarf
%endif
# locked together since disabling haddock causes no manuals built
# and disabling haddock still created index.html
# https://ghc.haskell.org/trac/ghc/ticket/15190
@ -43,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: 100.0.riscv64%{?dist}
Release: 103.0.riscv64%{?dist}
Summary: Glasgow Haskell Compiler
License: BSD and HaskellReport
@ -58,6 +64,7 @@ Source7: runghc.man
# absolute haddock path (was for html/libraries -> libraries)
Patch1: ghc-gen_contents_index-haddock-path.patch
Patch2: ghc-Cabal-install-PATH-warning.patch
Patch3: ghc-gen_contents_index-nodocs.patch
# https://phabricator.haskell.org/rGHC4eebc8016f68719e1ccdf460754a97d1f4d6ef05
Patch6: ghc-8.6.3-sphinx-1.8.patch
@ -113,7 +120,7 @@ BuildRequires: ghc-compiler
%if %{with abicheck}
BuildRequires: ghc
%endif
BuildRequires: ghc-rpm-macros-extra >= 2.0
BuildRequires: ghc-rpm-macros-extra >= 2.0.6
BuildRequires: ghc-binary-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-containers-devel
@ -144,6 +151,9 @@ BuildRequires: llvm%{llvm_major}
BuildRequires: llvm >= %{llvm_major}
%endif
%endif
%if %{with dwarf}
BuildRequires: elfutils-devel
%endif
%ifarch armv7hl riscv64
# patch12
BuildRequires: autoconf, automake
@ -316,6 +326,7 @@ packages to be automatically installed too.
%setup -q -n %{name}-%{version} %{?with_testsuite:-b1}
%patch1 -p1 -b .orig
%patch3 -p1 -b .orig
%patch2 -p1 -b .orig
%patch6 -p1 -b .orig
@ -368,8 +379,12 @@ cat > mk/build.mk << EOF
%ifarch %{ghc_llvm_archs}
BuildFlavour = perf-llvm
%else
%if %{with dwarf}
BuildFlavour = dwarf
%else
BuildFlavour = perf
%endif
%endif
%else
%ifarch %{ghc_llvm_archs}
BuildFlavour = quick-llvm
@ -393,11 +408,6 @@ BUILD_SPHINX_HTML = NO
%endif
BUILD_SPHINX_PDF = NO
EOF
## for verbose build output
#GhcStage1HcOpts=-v4
## enable RTS debugging:
## (http://ghc.haskell.org/trac/ghc/wiki/Debugging/RuntimeSystem)
#EXTRA_HC_OPTS=-debug
%build
# for patch12
@ -425,6 +435,7 @@ export CC=%{_bindir}/gcc
%ifarch %{ghc_unregisterized_arches}
--enable-unregisterised \
%endif
%{?with_dwarf:--enable-dwarf-unwind} \
%{nil}
# avoid "ghc: hGetContents: invalid argument (invalid byte sequence)"
@ -572,11 +583,11 @@ make test
%if %{with haddock}
%transfiletriggerin doc-index -- %{ghc_html_libraries_dir}
%{ghc_html_libraries_dir}/gen_contents_index
env -C %{ghc_html_libraries_dir} ./gen_contents_index
%end
%transfiletriggerpostun doc-index -- %{ghc_html_libraries_dir}
%{ghc_html_libraries_dir}/gen_contents_index
env -C %{ghc_html_libraries_dir} ./gen_contents_index
%end
%endif
@ -679,9 +690,18 @@ make test
%changelog
* Sat Sep 21 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> - 8.6.5-100.0.riscv64
* 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)
* Mon Feb 10 2020 Jens Petersen <petersen@redhat.com> - 8.6.5-102
- rebuild against ghc-rpm-macros fixed for subpackage prof deps
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 8.6.5-101
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jul 31 2019 Jens Petersen <petersen@redhat.com> - 8.6.5-100
- update to GHC 8.6.5 (backport ghc:8.6 module stream)
- https://downloads.haskell.org/~ghc/8.6.5/docs/html/users_guide/8.6.1-notes.html