Compare commits

...

7 Commits

Author SHA1 Message Date
David Abdurachmanov f85d5f36bc
Clean up spec (enable LTO)
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-06-23 15:37:28 +03:00
David Abdurachmanov 4f91074d19
Merge remote-tracking branch 'up/f38' into f38-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-06-23 15:36:11 +03:00
Jens Petersen ff8deba8f3 backport of 9.4 m32_allocator_init changes by Sylvain Henry (#2209162) 2023-05-25 13:12:29 +08:00
Jens Petersen 97598e8801 drop redundant ExcludeArch for armv7hl and update archs comment 2023-05-25 13:07:36 +08:00
Jens Petersen 407afb0113 SPDX migration 2023-05-25 12:58:26 +08:00
Jens Petersen b5cf727954 upstream commit to fix manual external links for sphinx-6
https://gitlab.haskell.org/ghc/ghc/-/issues/23286
2023-05-10 16:41:33 +08:00
Jens Petersen 17c6346a25 use %patch -P to quieten rpmbuild 2023-05-10 16:36:55 +08:00
3 changed files with 2486 additions and 75 deletions

View File

@ -0,0 +1,44 @@
From 00dc51060881df81258ba3b3bdf447294618a4de Mon Sep 17 00:00:00 2001
From: Matthew Pickering <matthewtpickering@gmail.com>
Date: Tue, 3 Jan 2023 15:56:37 +0000
Subject: [PATCH] sphinx: Use modern syntax for extlinks
This fixes the following build error:
```
Command line: /opt/homebrew/opt/sphinx-doc/bin/sphinx-build -b man -d /private/tmp/extra-dir-55768274273/.doctrees-man -n -w /private/tmp/extra-dir-55768274273/.log docs/users_guide /private/tmp/extra-dir-55768274273
===> Command failed with error code: 2
Exception occurred:
File "/opt/homebrew/Cellar/sphinx-doc/6.0.0/libexec/lib/python3.11/site-packages/sphinx/ext/extlinks.py", line 101, in role
title = caption % part
~~~~~~~~^~~~~~
TypeError: not all arguments converted during string formatting
```
I tested on Sphinx-5.1.1 and Sphinx-6.0.0
Thanks for sterni for providing instructions about how to test using
sphinx-6.0.0.
Fixes #22690
---
docs/users_guide/ghc_config.py.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/users_guide/ghc_config.py.in b/docs/users_guide/ghc_config.py.in
index dcc7fbaef62..c9888a13adc 100644
--- a/docs/users_guide/ghc_config.py.in
+++ b/docs/users_guide/ghc_config.py.in
@@ -1,6 +1,6 @@
extlinks = {
- 'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/issues/%s', '#'),
- 'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/wikis/%s', '#'),
+ 'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/issues/%s', '%s'),
+ 'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/wikis/%s', '#%s'),
}
libs_base_uri = '../libraries'
--
GitLab

2380
10453.patch Normal file

File diff suppressed because it is too large Load Diff

137
ghc.spec
View File

@ -11,10 +11,6 @@
# build hadrian for production builds:
%bcond build_hadrian 1
%ifarch riscv64
%global _lto_cflags %{nil}
%endif
# disabled to allow parallel install of ghc9.2-9.2.7 and ghc-9.2.6
%if 0
%global ghc_major 9.2
@ -97,10 +93,10 @@ Version: 9.2.6
# - 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: 130.6.riscv64%{?dist}
Release: 131.0.riscv64%{?dist}
Summary: Glasgow Haskell Compiler
License: BSD and HaskellReport
License: BSD-3-clause and HaskellReport
URL: https://haskell.org/ghc/
Source0: https://downloads.haskell.org/ghc/%{ghc_release}/ghc-%{version}-src.tar.xz
%if %{with testsuite}
@ -111,13 +107,18 @@ Source5: ghc-pkg.man
Source6: haddock.man
Source7: runghc.man
# https://bugzilla.redhat.com/show_bug.cgi?id=2142238
ExcludeArch: armv7hl
# cannot until i686 is disabled for koji noarch builds at least (pandoc etc)
#ExcludeArch: %%{ix86}
# https://gitlab.haskell.org/ghc/ghc/-/issues/19421 (m32_allocator_init)
Patch0: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10453.patch
# 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://gitlab.haskell.org/ghc/ghc/-/issues/23286 (sphinx modern extlinks)
Patch9: https://gitlab.haskell.org/ghc/ghc/-/commit/00dc51060881df81258ba3b3bdf447294618a4de.patch
# https://phabricator.haskell.org/rGHC4eebc8016f68719e1ccdf460754a97d1f4d6ef05
# https://gitlab.haskell.org/ghc/ghc/-/issues/19684
# DerivedConstants.h not produced atomically
@ -158,8 +159,8 @@ Patch27: haddock-remove-googleapis-fonts.patch
Patch30: allow-newer-llvm-versions.patch
# fedora ghc has been bootstrapped on
# %%{ix86} x86_64 ppc ppc64 armv7hl s390 s390x ppc64le aarch64
# and retired arches: alpha sparcv9 armv5tel
# %%{ix86} x86_64 s390x ppc64le aarch64
# and retired arches: alpha sparcv9 armv5tel ppc ppc64 s390 armv7hl
# see also deprecated ghc_arches defined in ghc-srpm-macros
# /usr/lib/rpm/macros.d/macros.ghc-srpm
@ -273,7 +274,7 @@ for the functional language Haskell. Highlights:
%package compiler
Summary: GHC compiler and utilities
License: BSD
License: BSD-3-clause
Requires: gcc%{?_isa}
Requires: %{name}-base-devel%{?_isa} = %{base_ver}-%{release}
%if %{with haddock}
@ -305,7 +306,7 @@ install the main ghc package.
%if %{with haddock} || (%{with hadrian} && %{with manual})
%package doc
Summary: Haskell library documentation meta package
License: BSD
License: BSD-3-clause
%obsoletes_ghcXY doc
%description doc
@ -315,7 +316,7 @@ Installing this package causes %{name}-*-doc packages corresponding to
%package doc-index
Summary: GHC library documentation indexing
License: BSD
License: BSD-3-clause
Obsoletes: ghc-doc-cron < %{version}-%{release}
Requires: %{name}-compiler = %{version}-%{release}
# due to disabled haddock archs
@ -342,7 +343,7 @@ Haskell libraries documentation.
%if %{with manual}
%package manual
Summary: GHC manual
License: BSD
License: BSD-3-clause
BuildArch: noarch
Requires: %{name}-filesystem = %{version}-%{release}
%obsoletes_ghcXY manual
@ -365,46 +366,46 @@ Version: 0.1.0.0
This provides the hadrian tool which can be used to build ghc.
%endif
%global BSDHaskellReport %{quote:BSD and HaskellReport}
%global BSDHaskellReport %{quote:BSD-3-clause and HaskellReport}
# use "./libraries-versions.sh" to check versions
%if %{defined ghclibdir}
%ghc_lib_subpackage -d -l BSD Cabal-3.6.3.0
%ghc_lib_subpackage -d -l BSD-3-clause Cabal-3.6.3.0
%ghc_lib_subpackage -d -l %BSDHaskellReport array-0.5.4.0
%ghc_lib_subpackage -d -l %BSDHaskellReport -c gmp-devel%{?_isa},libffi-devel%{?_isa} base-%{base_ver}
%ghc_lib_subpackage -d -l BSD binary-0.8.9.0
%ghc_lib_subpackage -d -l BSD bytestring-0.11.4.0
%ghc_lib_subpackage -d -l BSD-3-clause binary-0.8.9.0
%ghc_lib_subpackage -d -l BSD-3-clause bytestring-0.11.4.0
%ghc_lib_subpackage -d -l %BSDHaskellReport containers-0.6.5.1
%ghc_lib_subpackage -d -l %BSDHaskellReport deepseq-1.4.6.1
%ghc_lib_subpackage -d -l %BSDHaskellReport directory-1.3.6.2
%ghc_lib_subpackage -d -l %BSDHaskellReport exceptions-0.10.4
%ghc_lib_subpackage -d -l BSD filepath-1.4.2.2
%ghc_lib_subpackage -d -l BSD-3-clause filepath-1.4.2.2
# in ghc not ghc-libraries:
%ghc_lib_subpackage -d -x ghc-%{ghc_version_override}
%ghc_lib_subpackage -d -x -l BSD ghc-bignum-%{ghc_bignum_ver}
%ghc_lib_subpackage -d -x -l BSD ghc-boot-%{ghc_version_override}
%ghc_lib_subpackage -d -l BSD ghc-boot-th-%{ghc_version_override}
%ghc_lib_subpackage -d -x -l BSD ghc-compact-%{ghc_compact_ver}
%ghc_lib_subpackage -d -x -l BSD ghc-heap-%{ghc_version_override}
%ghc_lib_subpackage -d -x -l BSD-3-clause ghc-bignum-%{ghc_bignum_ver}
%ghc_lib_subpackage -d -x -l BSD-3-clause ghc-boot-%{ghc_version_override}
%ghc_lib_subpackage -d -l BSD-3-clause ghc-boot-th-%{ghc_version_override}
%ghc_lib_subpackage -d -x -l BSD-3-clause ghc-compact-%{ghc_compact_ver}
%ghc_lib_subpackage -d -x -l BSD-3-clause ghc-heap-%{ghc_version_override}
# see below for ghc-prim
%ghc_lib_subpackage -d -x -l BSD ghci-%{ghc_version_override}
%ghc_lib_subpackage -d -l BSD haskeline-0.8.2
%ghc_lib_subpackage -d -x -l BSD hpc-%{hpc_ver}
%ghc_lib_subpackage -d -x -l BSD-3-clause ghci-%{ghc_version_override}
%ghc_lib_subpackage -d -l BSD-3-clause haskeline-0.8.2
%ghc_lib_subpackage -d -x -l BSD-3-clause hpc-%{hpc_ver}
# see below for integer-gmp
%ghc_lib_subpackage -d -x -l %BSDHaskellReport libiserv-%{ghc_version_override}
%ghc_lib_subpackage -d -l BSD mtl-2.2.2
%ghc_lib_subpackage -d -l BSD parsec-3.1.15.0
%ghc_lib_subpackage -d -l BSD pretty-1.1.3.6
%ghc_lib_subpackage -d -l BSD-3-clause mtl-2.2.2
%ghc_lib_subpackage -d -l BSD-3-clause parsec-3.1.15.0
%ghc_lib_subpackage -d -l BSD-3-clause pretty-1.1.3.6
%ghc_lib_subpackage -d -l %BSDHaskellReport process-1.6.16.0
%ghc_lib_subpackage -d -l BSD stm-2.5.0.2
%ghc_lib_subpackage -d -l BSD template-haskell-2.18.0.0
%ghc_lib_subpackage -d -l BSD -c ncurses-devel%{?_isa} terminfo-0.4.1.5
%ghc_lib_subpackage -d -l BSD text-1.2.5.0
%ghc_lib_subpackage -d -l BSD time-1.11.1.1
%ghc_lib_subpackage -d -l BSD transformers-0.5.6.2
%ghc_lib_subpackage -d -l BSD unix-2.7.2.2
%ghc_lib_subpackage -d -l BSD-3-clause stm-2.5.0.2
%ghc_lib_subpackage -d -l BSD-3-clause template-haskell-2.18.0.0
%ghc_lib_subpackage -d -l BSD-3-clause -c ncurses-devel%{?_isa} terminfo-0.4.1.5
%ghc_lib_subpackage -d -l BSD-3-clause text-1.2.5.0
%ghc_lib_subpackage -d -l BSD-3-clause time-1.11.1.1
%ghc_lib_subpackage -d -l BSD-3-clause transformers-0.5.6.2
%ghc_lib_subpackage -d -l BSD-3-clause unix-2.7.2.2
%if %{with haddock} || %{with hadrian}
%ghc_lib_subpackage -d -l BSD xhtml-%{xhtml_ver}
%ghc_lib_subpackage -d -l BSD-3-clause xhtml-%{xhtml_ver}
%endif
%endif
@ -412,7 +413,7 @@ This provides the hadrian tool which can be used to build ghc.
%package devel
Summary: GHC development libraries meta package
License: BSD and HaskellReport
License: BSD-3-clause and HaskellReport
Requires: %{name}-compiler = %{version}-%{release}
Obsoletes: %{name}-libraries < %{version}-%{release}
Provides: %{name}-libraries = %{version}-%{release}
@ -427,7 +428,7 @@ except the ghc library, which is installed by the toplevel ghc metapackage.
%if %{with ghc_prof}
%package prof
Summary: GHC profiling libraries meta package
License: BSD
License: BSD-3-clause
Requires: %{name}-compiler = %{version}-%{release}
%obsoletes_ghcXY prof
@ -443,40 +444,42 @@ Installing this package causes %{name}-*-prof packages corresponding to
%endif
%setup -q -n ghc-%{version} %{?with_testsuite:-b1}
%patch1 -p1 -b .orig
%patch3 -p1 -b .orig
%patch -P0 -p1 -b .orig
%patch -P1 -p1 -b .orig
%patch -P3 -p1 -b .orig
%patch2 -p1 -b .orig
%patch10 -p1 -b .orig
%patch11 -p1 -b .orig11
%patch -P2 -p1 -b .orig
%patch -P9 -p1 -b .orig
%patch -P10 -p1 -b .orig
%patch -P11 -p1 -b .orig11
rm libffi-tarballs/libffi-*.tar.gz
%ifarch armv7hl
%patch12 -p1 -b .orig
%patch -P12 -p1 -b .orig
%endif
# remove s390x after complete switching to llvm
%ifarch %{ghc_unregisterized_arches} s390x riscv64
%patch15 -p1 -b .orig
%patch16 -p1 -b .orig
%patch -P15 -p1 -b .orig
%patch -P16 -p1 -b .orig
%endif
# bigendian
%ifarch s390x
%patch18 -p1 -b .orig
%patch -P18 -p1 -b .orig
%endif
# ppc64le
%patch20 -p1 -b .orig
%patch -P20 -p1 -b .orig
# debian
%patch24 -p1 -b .orig
%patch26 -p1 -b .orig
%patch27 -p1 -b .orig
%patch -P24 -p1 -b .orig
%patch -P26 -p1 -b .orig
%patch -P27 -p1 -b .orig
# newer LLVM versions
%patch30 -p1 -b .orig
%patch -P30 -p1 -b .orig
%if %{with haddock} && %{without hadrian}
%global gen_contents_index gen_contents_index.orig
@ -1014,31 +1017,15 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index
%changelog
* Sun Apr 15 2023 David Abdurachmanov <davidlt@rivosinc.com> - 9.2.6-130.6.riscv64
- Enable haddock on riscv64
* Sun Apr 15 2023 David Abdurachmanov <davidlt@rivosinc.com> - 9.2.6-130.5.riscv64
- Apply missing patches
* Sun Apr 15 2023 David Abdurachmanov <davidlt@rivosinc.com> - 9.2.6-130.4.riscv64
- Disable haddock on riscv64
* Sun Apr 15 2023 David Abdurachmanov <davidlt@rivosinc.com> - 9.2.6-130.3.riscv64
- Enable LLVM for riscv64
* Fri Jun 23 2023 David Abdurachmanov <davidlt@rivosinc.com> - 9.2.6-131.0.riscv64
- Change LLVM from 12 to 13
* Sun Apr 09 2023 David Abdurachmanov <davidlt@rivosinc.com> - 9.2.6-130.2.riscv64
- Enable haddock on riscv64
- Disable LLVM on riscv64
* Thu Apr 06 2023 David Abdurachmanov <davidlt@rivosinc.com> - 9.2.6-130.1.riscv64
- Disable haddock on riscv64
- Move riscv64 to LLVM arch
- Disable LTO on riscv64 to speed up builds
* Thu Apr 06 2023 David Abdurachmanov <davidlt@rivosinc.com> - 9.2.6-130.0.riscv64
- Disable ld.gold on riscv64 (not supported)
* Thu May 25 2023 Jens Petersen <petersen@redhat.com> - 9.2.6-131
- include backport of 9.4 m32_allocator_init changes by Sylvain Henry (#2209162)
- SPDX migration of license tags
* Mon Mar 13 2023 Jens Petersen <petersen@redhat.com> - 9.2.6-130
- allow parallel installing ghc9.2-9.2.7