Compare commits

...

100 Commits

Author SHA1 Message Date
437025a4db
Upstream dist-git with no changes (rebuild)
All the changes have been upstreamed to dist-git, but this doesn't have
a new NVR yet. No actual changes here.

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-02-13 11:03:00 +02:00
0a7f7b22d5
Merge remote-tracking branch 'up/main' into main-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-02-13 11:01:30 +02:00
Jens Petersen
63a2061ee7 condition the riscv64 patches
Patching Cabal would cause the ABI hash to change causing major
rawhide breakage
2024-02-13 00:50:57 +08:00
Richard W.M. Jones
2c11fbebc0 riscv64: Apply Cabal patch
Commit ebb2ee7214 ("Add RISCV64 to Cabal") added the patch but did not
apply it in %prep.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
2024-02-12 15:38:31 +00:00
Richard W.M. Jones
c1d77a5759 riscv64: Enable support for GHCi (internal interpreter)
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
2024-02-12 14:48:56 +00:00
Jens Petersen
5bda6f7d57 Merge #6 Add support for riscv64 2024-02-12 14:15:46 +00:00
21c896f4bc Add support for riscv64
Support for an LLVM backend was added a while back in this
upstream commit:
31e265c1df

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-02-07 13:40:03 +00:00
ebb2ee7214 Add RISCV64 to Cabal
This is already merged upstreamed. See:
https://github.com/haskell/cabal/pull/9062

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-02-07 13:36:53 +00:00
Fedora Release Engineering
3797e2ad85 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 12:57:27 +00:00
Fedora Release Engineering
b9119ce1a9 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 20:41:58 +00:00
Jens Petersen
6253449ed3 enable the llvm alignment patch for all archs not just s390x 2023-12-16 18:18:55 +08:00
Jens Petersen
f3741279b3 BR ghc-*-devel instead of ghc-*-static 2023-11-29 10:34:09 +08:00
Jens Petersen
204697fda0 s390x: patch from @stefansf (IBM) to fix llvm alignment of data sections 2023-11-29 10:34:09 +08:00
3a0e032d3f
Rebuild for a new ghc-rpm-macros
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-11-20 20:02:58 +02:00
1f4e4e2818
Add RISCV64 to Cabal
This is already merged upstreamed. See:
https://github.com/haskell/cabal/pull/9062

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-11-20 19:27:40 +02:00
2f5be1a71c
Bump release
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-11-14 20:56:29 +02:00
69494acec6
Add support for riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-11-14 20:08:38 +02:00
Jens Petersen
af12036cab changelog for sphinx7 and external links tweak 2023-09-11 14:08:22 +08:00
Jens Petersen
24eeb06d7d tweak a couple of comments 2023-09-11 14:03:30 +08:00
Jens Petersen
afd169846d sync ghc9.4: add sphinx7 patch 2023-09-11 14:00:31 +08:00
Jens Petersen
029e0a3682 user_guide: update external links patch to final upstream
https://gitlab.haskell.org/ghc/ghc/-/issues/22690
2023-09-11 13:28:30 +08:00
Jens Petersen
7b4a7ac6f8 quote commented gpgverify macros 2023-08-09 02:38:59 +08:00
Jens Petersen
751bee0355 disable ghc9.4 obsoletes for 9.4.6 2023-08-09 02:38:30 +08:00
Jens Petersen
d003c8c955 fixup SPDX license tags to use "AND" 2023-08-07 00:45:46 +02:00
Jens Petersen
2b31b684ce rebase to 9.4.5 from ghc9.4 package
- https://downloads.haskell.org/~ghc/9.4.5/docs/users_guide/9.4.1-notes.html
2023-07-28 18:37:27 +08:00
Jens Petersen
624ff1fac9 changelog for commits added to fix mass rebuild 2023-07-25 15:27:03 +08:00
Jens Petersen
0f90ec3d22 backport hadrian macro handling 2023-07-25 15:26:08 +08:00
Jens Petersen
d7c965e2be s390x: no longer apply unregisterized patches 2023-07-25 15:26:08 +08:00
Jens Petersen
7fa56d508e base subpkg now owns ghcliblib and ghclibplatform dirs (#2185357) 2023-07-25 10:38:38 +08:00
Jens Petersen
1b7335d495 fix sphinx flags.py: python 3.12 dropped distutils
https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10922
2023-07-24 21:51:10 +08:00
Jens Petersen
f7e9d694be fix BSD3 SPDX tags 2023-07-20 23:35:27 +08:00
Fedora Release Engineering
74ee6275c8 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 21:14:18 +00: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
Jens Petersen
80e2008e81 allow parallel installing ghc9.2-9.2.7 2023-03-13 20:01:46 +08:00
Jens Petersen
aa1f6bd3d7 drop the ppc64le threaded hadrian workaround 2023-02-28 12:59:52 +08:00
Jens Petersen
b5d643a65e ppc64le: disable parallel GC in hadrian temporarily (before !5725) 2023-02-17 18:56:48 +08:00
Jens Petersen
1026d3dcb9 upstream patch to enable SMP rts for ppc64le 2023-02-17 18:32:54 +08:00
Jens Petersen
12e492c7ee rebuild to fix prof deps 2023-02-16 00:22:50 +08:00
Jens Petersen
fc6aef5532 restore RPATHs to allow correct dependency generation 2023-02-11 17:20:21 +08:00
Jens Petersen
5d91d09b6f update to 9.2.6 2023-02-11 17:20:10 +08:00
Jens Petersen
f0b4448eb6 happy is also needed when not building hadrian 2023-02-11 00:13:31 +08:00
Jens Petersen
6ad54b8225 restore ld.so.conf.d to workaround mock issue (rhbz#2166028) 2023-02-11 00:03:14 +08:00
Jens Petersen
1c6ff01623 remove the RUNPATHs again since they are covered by the ld.so.conf.d file 2023-02-05 00:42:53 +08:00
Jens Petersen
9b70e66d38 obsolete manual if disabled 2023-02-04 22:03:20 +08:00
Jens Petersen
0b223c6fe8 restore the ld.so.conf.d file to workaround mock issue (#2166028) 2023-02-04 22:03:09 +08:00
Jens Petersen
e9399b13bb also arch filesystem subpackage since content depends on haddock 2023-01-31 20:48:19 +08:00
Jens Petersen
eea1f6cad7 make ghc-doc-index arch since haddock disabled on i686
BuildError: The following noarch package built differently on different architectures: ghc-doc-index-9.2.5-125.fc38.noarch.rpm
rpmdiff output was:
added       /usr/share/doc/ghc/html/libraries/doc-index-124.html
added       /usr/share/doc/ghc/html/libraries/doc-index-126.html
added       /usr/share/doc/ghc/html/libraries/doc-index-33.html
:
:
2023-01-31 16:27:40 +08:00
Jens Petersen
608b9ae719 correct manpage location from docdir 2023-01-31 11:16:41 +08:00
Jens Petersen
e3d6c97334 hadrian: put ghc manpage in the right place 2023-01-30 23:48:23 +08:00
Jens Petersen
ce8a0ee17f include the manpage now built with hadrian 2023-01-30 22:50:17 +08:00
Jens Petersen
5cbb28b98c also disable haddock for i686: runs out of memory now like armv7hl
Warning: GHC.IfaceToCore: could not find link destinations for:
	- GHC.IfaceToCore.mergeIfaceDecl
Warning: GHC.Iface.Rename: could not find link destinations for:
	- GHC.Iface.Rename.ShIfM
Warning: GHC.Types.Name.Shape: could not find link destinations for:
	- GHC.Types.Name.Shape.uAvailInfos
haddock: out of memory (requested 1048576 bytes)
Warning: GHC.Tc.Gen.Splice: could not find link
2023-01-30 22:03:44 +08:00
Jens Petersen
a028d88f6f replace ghc-configure-c99.patch with upstream patch
https://fedoraproject.org/wiki/Changes/PortingToModernC
2023-01-30 20:23:07 +08:00
Jens Petersen
2a8e5b4268 actually update configure for ghc-configure-c99.patch 2023-01-30 20:22:45 +08:00
Jens Petersen
c7637d9d11 add 9.2.5 tarballs 2023-01-30 20:16:37 +08:00
Jens Petersen
eef765975c ghc_devel_prof deprecated 2023-01-30 20:16:37 +08:00
Jens Petersen
639b07bccd build manpage with sphinx 2023-01-30 20:16:37 +08:00
Jens Petersen
d8c7935735 subpackage ghc-bignum
some hackages now depend on it
2023-01-30 20:16:37 +08:00
Jens Petersen
46f60c5540 install bash-completion file 2023-01-30 20:16:37 +08:00
Jens Petersen
0c150de12d introduce %ghc_obsoletes_name so that ghc-* obsoletes ghc9.2-* 2023-01-30 20:16:37 +08:00
Jens Petersen
04d947cd74 consolidate ld.so.conf.d and chrpath for _ghcdynlibdir 2023-01-30 20:16:37 +08:00
Jens Petersen
24f60eba3d add xhtml_ver and obsoletes 2023-01-30 20:16:37 +08:00
Jens Petersen
206ca11ac0 use %ghcliblib as much as possible 2023-01-30 20:16:37 +08:00
Jens Petersen
a33ef3fd51 do not disable debuginfo
avoids build-id conflicts
2023-01-30 20:16:37 +08:00
Jens Petersen
feb7f7069e disable ld.so.conf.d/ghc.conf 2023-01-30 20:16:37 +08:00
Jens Petersen
c315c79429 define rts_ver to avoid double listing libHSrts-1.0.2-ghc*.so 2023-01-30 20:16:37 +08:00
Jens Petersen
f92afecbee override global %with_ghc_prof and %with_haddock 2023-01-30 20:16:37 +08:00
Jens Petersen
a15483db6e rebase to 9.2.5 from ghc9.2 2023-01-30 20:16:30 +08:00
Jens Petersen
2cf80b12e6 update to 9.0.2 from ghc9.0 2023-01-30 20:13:58 +08:00
Florian Weimer
fbe8f0f8e3 Port configure script to C99
Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
2023-01-12 13:23:26 +01:00
Jens Petersen
ba0880ec2a update a few issue urls to gitlab
taken from ghc8.10
2023-01-07 10:37:46 +08:00
Jens Petersen
d85561818a obsoletes ghc8.10 2022-09-28 16:41:51 +08:00
Jens Petersen
682df27912 bump llvm from 11 to 12 2022-09-28 16:40:58 +08:00
Jens Petersen
5dfb2bd4d6 ghc-compiler actually conflicts with ghcMAJOR-compiler-VERSION
add %ghc_major
2022-08-06 21:21:07 +08:00
Jens Petersen
d695d12eb5 conflicts with ghc8.10-compiler-8.10.7 2022-08-06 13:12:21 +08:00
Jens Petersen
4a785f1067 add ghc-filesystem obsoletes to help dnf 2022-08-06 13:11:16 +08:00
Fedora Release Engineering
08f84177dc Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 04:33:03 +00:00
Jens Petersen
88eb3f9143 add simple ci test 2022-06-15 21:59:53 +08:00
Jens Petersen
aafa21cdc2 rebase to 8.10.7 from ghc8.10; adding filesystem subpkg 2022-06-14 22:28:23 +08:00
Fedora Release Engineering
43ca3c7195 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 04:22:41 +00:00
Miro Hrončok
379a3830ce Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34 2022-01-08 11:11:19 +01:00
Jens Petersen
9d34518bd2 move zlib-devel Recommends to cabal-install 2021-09-17 18:50:11 +08:00
Jens Petersen
09b2d1dfd3 Revert "opt-out of F35 mass rebuild with noautobuild"
This reverts commit 0c5dec5b3c.
2021-08-04 23:50:04 +08:00
Jens Petersen
d010494668 revert back to 8.10.5 with rts patch and without s390x llvm
reduce cpus for post %install scripts for armv7hl
2021-07-23 10:44:05 +08:00
Jens Petersen
0c5dec5b3c opt-out of F35 mass rebuild with noautobuild 2021-07-21 20:22:00 +08:00
Jens Petersen
2c08099dac turn off llvm for s390x again
https://gitlab.haskell.org/ghc/ghc/-/issues/20120
2021-07-19 19:53:53 +08:00
Jens Petersen
872f1cef00 enable llvm backend for s390x and perf build 2021-07-16 00:01:59 +08:00
Jens Petersen
a4101c0be4 remove old unused patches 2021-07-15 20:17:29 +08:00
Jens Petersen
499775baf0 revert to ghc-8.10.4 (since ghc-8.10.5 fails to rebuild on s390x) 2021-07-15 20:16:05 +08:00
Jens Petersen
f2172368be enable llvm for s390x 2021-07-12 10:26:19 +08:00
Jens Petersen
055d1f9b29 enable quick build for s390x llvm bootstrap 2021-07-12 01:11:07 +08:00
Jens Petersen
cc98c023ef remove the debian x32 patch 2021-07-11 23:24:28 +08:00
Jens Petersen
a1a8a89e7c rebase to 8.10.5 from ghc:8.10 2021-07-11 21:27:39 +08:00
Jens Petersen
bad2a2b5a9 fix build with sphinx4 (#1977317)
use rawstring in conf.py (already in ghc-9)
2021-07-01 00:37:53 +08:00
Jens Petersen
71ccb69965 ghc-compiler now requires ghc-filesystem for html docdirs 2021-05-25 11:44:26 +08:00
Fedora Release Engineering
e1bee79cdc - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 06:44:33 +00:00
Jens Petersen
58f71ccc9b Add riscv64 to ghc_unregisterized_arches (David Abdurachmanov) 2020-12-12 23:42:02 +08:00
33 changed files with 3845 additions and 724 deletions

13
.gitignore vendored
View File

@ -31,3 +31,16 @@ testsuite-6.12.3.tar.bz2
/ghc-8.8.3-src.tar.xz.sig /ghc-8.8.3-src.tar.xz.sig
/ghc-8.8.4-src.tar.xz.sig /ghc-8.8.4-src.tar.xz.sig
/ghc-8.8.4-src.tar.xz /ghc-8.8.4-src.tar.xz
/ghc-8.10.5-src.tar.xz.sig
/ghc-8.10.5-src.tar.xz
/ghc-8.10.4-src.tar.xz.sig
/ghc-8.10.7-src.tar.xz
/ghc-8.10.7-src.tar.xz.sig
/ghc-9.0.2-src.tar.xz
/ghc-9.0.2-src.tar.xz.sig
/ghc-9.2.5-src.tar.xz
/ghc-9.2.5-src.tar.xz.sig
/ghc-9.2.6-src.tar.xz
/ghc-9.2.6-src.tar.xz.sig
/ghc-9.4.5-src.tar.xz
/ghc-9.4.5-src.tar.xz.sig

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

37
10922.patch Normal file
View File

@ -0,0 +1,37 @@
From 2e6447e073144b9b1352d5167f67ccd07460444a Mon Sep 17 00:00:00 2001
From: Jens Petersen <petersen@redhat.com>
Date: Thu, 20 Jul 2023 13:16:03 +0800
Subject: [PATCH] user_guide/flags.py: python-3.12 no longer includes distutils
packaging.version seems able to handle this fine
---
docs/users_guide/flags.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/users_guide/flags.py b/docs/users_guide/flags.py
index f6927d59817..474d1b65d4b 100644
--- a/docs/users_guide/flags.py
+++ b/docs/users_guide/flags.py
@@ -50,7 +50,7 @@ import sphinx
from sphinx import addnodes
from sphinx.domains.std import GenericObject
from sphinx.errors import SphinxError
-from distutils.version import LooseVersion
+from packaging.version import parse
from utils import build_table_from_list
import os.path
@@ -628,8 +628,8 @@ def purge_flags(app, env, docname):
def setup(app):
# The override argument to add_directive_to_domain is only supported by >= 1.8
- sphinx_version = LooseVersion(sphinx.__version__)
- override_arg = {'override': True} if sphinx_version >= LooseVersion('1.8') else {}
+ sphinx_version = parse(sphinx.__version__)
+ override_arg = {'override': True} if sphinx_version >= parse('1.8') else {}
# Add ghc-flag directive, and override the class with our own
app.add_object_type('ghc-flag', 'ghc-flag')
--
GitLab

42
10928.patch Normal file
View File

@ -0,0 +1,42 @@
From 5ce7496dba3368faa5088c88168f0f4d69cff32b Mon Sep 17 00:00:00 2001
From: Jens Petersen <petersen@redhat.com>
Date: Fri, 21 Jul 2023 15:26:16 +0800
Subject: [PATCH] make hadrian buildable with Cabal-3.8
---
hadrian/hadrian.cabal | 2 +-
hadrian/src/Hadrian/Haskell/Cabal/Parse.hs | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/hadrian/hadrian.cabal b/hadrian/hadrian.cabal
index c37974914a9..eb5690bbd1a 100644
--- a/hadrian/hadrian.cabal
+++ b/hadrian/hadrian.cabal
@@ -147,7 +147,7 @@ executable hadrian
, BangPatterns
other-extensions: MultiParamTypeClasses
, TypeFamilies
- build-depends: Cabal >= 3.2 && < 3.7
+ build-depends: Cabal >= 3.2 && < 3.9
, base >= 4.8 && < 5
, bytestring >= 0.10 && < 0.12
, containers >= 0.5 && < 0.7
diff --git a/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs b/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs
index 079f675b6ea..2d262a36445 100644
--- a/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs
+++ b/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs
@@ -23,7 +23,11 @@ import qualified Distribution.ModuleName as C
import qualified Distribution.Package as C
import qualified Distribution.PackageDescription as C
import qualified Distribution.PackageDescription.Configuration as C
+#if MIN_VERSION_Cabal(3,8,0)
+import qualified Distribution.Simple.PackageDescription as C
+#else
import qualified Distribution.PackageDescription.Parsec as C
+#endif
import qualified Distribution.Simple.Compiler as C
import qualified Distribution.Simple.Program.Db as C
import qualified Distribution.Simple as C
--
GitLab

31
11662.patch Normal file
View File

@ -0,0 +1,31 @@
From bed85f7bc358fdca4677a3070b94ea544bb9e7ff Mon Sep 17 00:00:00 2001
From: Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Date: Mon, 27 Nov 2023 12:34:47 +0100
Subject: [PATCH] llvmGen: Align objects in the data section
Objects in the data section may be referenced via tagged pointers.
Thus, align those objects to a 4- or 8-byte boundary for 32- or 64-bit
platforms, respectively. Note, this may need to be reconsidered if
objects with a greater natural alignment requirement are emitted as e.g.
128-bit atomics.
Fixes #24163.
---
compiler/GHC/CmmToLlvm/Data.hs | 1 +
1 file changed, 1 insertion(+)
diff --git a/compiler/GHC/CmmToLlvm/Data.hs b/compiler/GHC/CmmToLlvm/Data.hs
index caac121413c..5e8912e3bc7 100644
--- a/compiler/GHC/CmmToLlvm/Data.hs
+++ b/compiler/GHC/CmmToLlvm/Data.hs
@@ -89,6 +89,7 @@ genLlvmData (sec, CmmStaticsRaw lbl xs) = do
align = case sec of
Section CString _ -> if (platformArch platform == ArchS390X)
then Just 2 else Just 1
+ Section Data _ -> Just $ platformWordSizeInBytes platform
_ -> Nothing
const = if sectionProtection sec == ReadOnlySection
then Constant else Global
--
GitLab

35
5725.patch Normal file
View File

@ -0,0 +1,35 @@
From 7cfa6f3114168797cf1fa7faa4ffe6c06b73f149 Mon Sep 17 00:00:00 2001
From: Peter Trommler <ptrommler@acm.org>
Date: Tue, 11 May 2021 20:52:01 +0200
Subject: [PATCH] Hadrian: Enable SMP on powerpc64{le}
Fixes #19825
---
hadrian/src/Oracles/Flag.hs | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/hadrian/src/Oracles/Flag.hs b/hadrian/src/Oracles/Flag.hs
index 86521e4aa8a..1b3aff693eb 100644
--- a/hadrian/src/Oracles/Flag.hs
+++ b/hadrian/src/Oracles/Flag.hs
@@ -70,7 +70,16 @@ targetSupportsSMP :: Action Bool
targetSupportsSMP = do
unreg <- flag GhcUnregisterised
armVer <- targetArmVersion
- goodArch <- anyTargetArch ["i386", "x86_64", "sparc", "powerpc", "arm", "aarch64", "s390x", "riscv64"]
+ goodArch <- anyTargetArch ["i386"
+ , "x86_64"
+ , "sparc"
+ , "powerpc"
+ , "powerpc64"
+ , "powerpc64le"
+ , "arm"
+ , "aarch64"
+ , "s390x"
+ , "riscv64"]
if -- The THREADED_RTS requires `BaseReg` to be in a register and the
-- Unregisterised mode doesn't allow that.
| unreg -> return False
--
GitLab

View File

@ -0,0 +1,48 @@
From 6e12e3c178fe9ad16131eb3c089bd6578976f5d6 Mon Sep 17 00:00:00 2001
From: Ben Gamari <ben@smart-cactus.org>
Date: Tue, 3 May 2022 13:48:56 -0400
Subject: [PATCH] configure: Check for ffi.h
As noted in #21485, we checked for ffi.h yet then failed to throw an
error if it is missing.
Fixes #21485.
---
m4/fp_find_libffi.m4 | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/m4/fp_find_libffi.m4 b/m4/fp_find_libffi.m4
index ddc511553c8..bf52afefbb8 100644
--- a/m4/fp_find_libffi.m4
+++ b/m4/fp_find_libffi.m4
@@ -49,6 +49,7 @@ AC_DEFUN([FP_FIND_LIBFFI],
CFLAGS="$LIBFFI_CFLAGS $CFLAGS"
LDFLAGS2="$LDFLAGS"
LDFLAGS="$LIBFFI_LDFLAGS $LDFLAGS"
+
if test "$HostOS" = "openbsd";
then
# OpenBSD's libffi is not directly linked to the libpthread but
@@ -58,10 +59,16 @@ AC_DEFUN([FP_FIND_LIBFFI],
# symbols.
LDFLAGS="$LDFLAGS -lpthread"
fi
+
AC_CHECK_LIB(ffi, ffi_call,
- [AC_CHECK_HEADERS([ffi.h], [break], [])
- AC_DEFINE([HAVE_SYSTEM_LIBFFI], [1], [Define to 1 if you have libffi.])],
- [AC_MSG_ERROR([Cannot find system libffi])])
+ [AC_CHECK_HEADERS(
+ [ffi.h],
+ [AC_DEFINE([HAVE_SYSTEM_LIBFFI], [1], [Define to 1 if you have libffi.])],
+ [AC_MSG_ERROR([Cannot find ffi.h for system libffi])]
+ )],
+ [AC_MSG_ERROR([Cannot find system libffi])]
+ )
+
CFLAGS="$CFLAGS2"
LDFLAGS="$LDFLAGS2"
])
--
GitLab

View File

@ -1,277 +0,0 @@
From 6e361d895dda4600a85e01c72ff219474b5c7190 Mon Sep 17 00:00:00 2001
From: Kavon Farvardin <kavon@farvard.in>
Date: Thu, 4 Oct 2018 13:44:55 -0400
Subject: [PATCH] Multiple fixes / improvements for LLVM backend
- Fix for #13904 -- stop "trashing" callee-saved registers, since it is
not actually doing anything useful.
- Fix for #14251 -- fixes the calling convention for functions passing
raw SSE-register values by adding padding as needed to get the values
in the right registers. This problem cropped up when some args were
unused an dropped from the live list.
- Fixed a typo in 'readnone' attribute
- Added 'lower-expect' pass to level 0 LLVM optimization passes to
improve block layout in LLVM for stack checks, etc.
Test Plan: `make test WAYS=optllvm` and `make test WAYS=llvm`
Reviewers: bgamari, simonmar, angerman
Reviewed By: angerman
Subscribers: rwbarton, carter
GHC Trac Issues: #13904, #14251
Differential Revision: https://phabricator.haskell.org/D5190
(cherry picked from commit adcb5fb47c0942671d409b940d8884daa9359ca4)
---
compiler/llvmGen/Llvm/Types.hs | 2 +-
compiler/llvmGen/LlvmCodeGen/Base.hs | 62 ++++++++++++++++++++----
compiler/llvmGen/LlvmCodeGen/CodeGen.hs | 59 +++++-----------------
compiler/main/DriverPipeline.hs | 2 +-
testsuite/tests/codeGen/should_run/all.T | 4 +-
5 files changed, 67 insertions(+), 62 deletions(-)
diff --git a/compiler/llvmGen/Llvm/Types.hs b/compiler/llvmGen/Llvm/Types.hs
index 87111499fc0..c1c51afcf0f 100644
--- a/compiler/llvmGen/Llvm/Types.hs
+++ b/compiler/llvmGen/Llvm/Types.hs
@@ -560,7 +560,7 @@ instance Outputable LlvmFuncAttr where
ppr OptSize = text "optsize"
ppr NoReturn = text "noreturn"
ppr NoUnwind = text "nounwind"
- ppr ReadNone = text "readnon"
+ ppr ReadNone = text "readnone"
ppr ReadOnly = text "readonly"
ppr Ssp = text "ssp"
ppr SspReq = text "ssqreq"
diff --git a/compiler/llvmGen/LlvmCodeGen/Base.hs b/compiler/llvmGen/LlvmCodeGen/Base.hs
index 6e20da48c1b..ec91bacc4c8 100644
--- a/compiler/llvmGen/LlvmCodeGen/Base.hs
+++ b/compiler/llvmGen/LlvmCodeGen/Base.hs
@@ -26,7 +26,7 @@ module LlvmCodeGen.Base (
cmmToLlvmType, widthToLlvmFloat, widthToLlvmInt, llvmFunTy,
llvmFunSig, llvmFunArgs, llvmStdFunAttrs, llvmFunAlign, llvmInfAlign,
- llvmPtrBits, tysToParams, llvmFunSection,
+ llvmPtrBits, tysToParams, llvmFunSection, padLiveArgs, isSSE,
strCLabel_llvm, strDisplayName_llvm, strProcedureName_llvm,
getGlobalPtr, generateExternDecls,
@@ -58,6 +58,8 @@ import ErrUtils
import qualified Stream
import Control.Monad (ap)
+import Data.List (sort)
+import Data.Maybe (mapMaybe)
-- ----------------------------------------------------------------------------
-- * Some Data Types
@@ -147,16 +149,58 @@ llvmFunSection dflags lbl
-- | A Function's arguments
llvmFunArgs :: DynFlags -> LiveGlobalRegs -> [LlvmVar]
llvmFunArgs dflags live =
- map (lmGlobalRegArg dflags) (filter isPassed (activeStgRegs platform))
+ map (lmGlobalRegArg dflags) (filter isPassed allRegs)
where platform = targetPlatform dflags
- isLive r = not (isSSE r) || r `elem` alwaysLive || r `elem` live
+ allRegs = activeStgRegs platform
+ paddedLive = map (\(_,r) -> r) $ padLiveArgs live
+ isLive r = r `elem` alwaysLive || r `elem` paddedLive
isPassed r = not (isSSE r) || isLive r
- isSSE (FloatReg _) = True
- isSSE (DoubleReg _) = True
- isSSE (XmmReg _) = True
- isSSE (YmmReg _) = True
- isSSE (ZmmReg _) = True
- isSSE _ = False
+
+
+isSSE :: GlobalReg -> Bool
+isSSE (FloatReg _) = True
+isSSE (DoubleReg _) = True
+isSSE (XmmReg _) = True
+isSSE (YmmReg _) = True
+isSSE (ZmmReg _) = True
+isSSE _ = False
+
+sseRegNum :: GlobalReg -> Maybe Int
+sseRegNum (FloatReg i) = Just i
+sseRegNum (DoubleReg i) = Just i
+sseRegNum (XmmReg i) = Just i
+sseRegNum (YmmReg i) = Just i
+sseRegNum (ZmmReg i) = Just i
+sseRegNum _ = Nothing
+
+-- the bool indicates whether the global reg was added as padding.
+-- the returned list is not sorted in any particular order,
+-- but does indicate the set of live registers needed, with SSE padding.
+padLiveArgs :: LiveGlobalRegs -> [(Bool, GlobalReg)]
+padLiveArgs live = allRegs
+ where
+ sseRegNums = sort $ mapMaybe sseRegNum live
+ (_, padding) = foldl assignSlots (1, []) $ sseRegNums
+ allRegs = padding ++ map (\r -> (False, r)) live
+
+ assignSlots (i, acc) regNum
+ | i == regNum = -- don't need padding here
+ (i+1, acc)
+ | i < regNum = let -- add padding for slots i .. regNum-1
+ numNeeded = regNum-i
+ acc' = genPad i numNeeded ++ acc
+ in
+ (regNum+1, acc')
+ | otherwise = error "padLiveArgs -- i > regNum ??"
+
+ genPad start n =
+ take n $ flip map (iterate (+1) start) (\i ->
+ (True, FloatReg i))
+ -- NOTE: Picking float should be fine for the following reasons:
+ -- (1) Float aliases with all the other SSE register types on
+ -- the given platform.
+ -- (2) The argument is not live anyways.
+
-- | Llvm standard fun attributes
llvmStdFunAttrs :: [LlvmFuncAttr]
diff --git a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
index e812dd445f1..a7121b7909a 100644
--- a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
+++ b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
@@ -14,7 +14,7 @@ import LlvmCodeGen.Base
import LlvmCodeGen.Regs
import BlockId
-import CodeGen.Platform ( activeStgRegs, callerSaves )
+import CodeGen.Platform ( activeStgRegs )
import CLabel
import Cmm
import PprCmm
@@ -211,7 +211,6 @@ genCall t@(PrimTarget (MO_Prefetch_Data localityInt)) [] args
fptr <- liftExprData $ getFunPtr funTy t
argVars' <- castVarsW Signed $ zip argVars argTy
- doTrashStmts
let argSuffix = [mkIntLit i32 0, mkIntLit i32 localityInt, mkIntLit i32 1]
statement $ Expr $ Call StdCall fptr (argVars' ++ argSuffix) []
| otherwise = panic $ "prefetch locality level integer must be between 0 and 3, given: " ++ (show localityInt)
@@ -294,7 +293,6 @@ genCall t@(PrimTarget op) [] args
fptr <- getFunPtrW funTy t
argVars' <- castVarsW Signed $ zip argVars argTy
- doTrashStmts
let alignVal = mkIntLit i32 align
arguments = argVars' ++ (alignVal:isVolVal)
statement $ Expr $ Call StdCall fptr arguments []
@@ -446,7 +444,6 @@ genCall target res args = runStmtsDecls $ do
| never_returns = statement $ Unreachable
| otherwise = return ()
- doTrashStmts
-- make the actual call
case retTy of
@@ -1759,12 +1756,9 @@ genLit _ CmmHighStackMark
funPrologue :: LiveGlobalRegs -> [CmmBlock] -> LlvmM StmtData
funPrologue live cmmBlocks = do
- trash <- getTrashRegs
let getAssignedRegs :: CmmNode O O -> [CmmReg]
getAssignedRegs (CmmAssign reg _) = [reg]
- -- Calls will trash all registers. Unfortunately, this needs them to
- -- be stack-allocated in the first place.
- getAssignedRegs (CmmUnsafeForeignCall _ rs _) = map CmmGlobal trash ++ map CmmLocal rs
+ getAssignedRegs (CmmUnsafeForeignCall _ rs _) = map CmmLocal rs
getAssignedRegs _ = []
getRegsBlock (_, body, _) = concatMap getAssignedRegs $ blockToList body
assignedRegs = nub $ concatMap (getRegsBlock . blockSplit) cmmBlocks
@@ -1794,14 +1788,9 @@ funPrologue live cmmBlocks = do
funEpilogue :: LiveGlobalRegs -> LlvmM ([LlvmVar], LlvmStatements)
funEpilogue live = do
- -- Have information and liveness optimisation is enabled?
- let liveRegs = alwaysLive ++ live
- isSSE (FloatReg _) = True
- isSSE (DoubleReg _) = True
- isSSE (XmmReg _) = True
- isSSE (YmmReg _) = True
- isSSE (ZmmReg _) = True
- isSSE _ = False
+ -- the bool indicates whether the register is padding.
+ let alwaysNeeded = map (\r -> (False, r)) alwaysLive
+ livePadded = alwaysNeeded ++ padLiveArgs live
-- Set to value or "undef" depending on whether the register is
-- actually live
@@ -1813,39 +1802,17 @@ funEpilogue live = do
let ty = (pLower . getVarType $ lmGlobalRegVar dflags r)
return (Just $ LMLitVar $ LMUndefLit ty, nilOL)
platform <- getDynFlag targetPlatform
- loads <- flip mapM (activeStgRegs platform) $ \r -> case () of
- _ | r `elem` liveRegs -> loadExpr r
- | not (isSSE r) -> loadUndef r
+ let allRegs = activeStgRegs platform
+ loads <- flip mapM allRegs $ \r -> case () of
+ _ | (False, r) `elem` livePadded
+ -> loadExpr r -- if r is not padding, load it
+ | not (isSSE r) || (True, r) `elem` livePadded
+ -> loadUndef r
| otherwise -> return (Nothing, nilOL)
let (vars, stmts) = unzip loads
return (catMaybes vars, concatOL stmts)
-
--- | A series of statements to trash all the STG registers.
---
--- In LLVM we pass the STG registers around everywhere in function calls.
--- So this means LLVM considers them live across the entire function, when
--- in reality they usually aren't. For Caller save registers across C calls
--- the saving and restoring of them is done by the Cmm code generator,
--- using Cmm local vars. So to stop LLVM saving them as well (and saving
--- all of them since it thinks they're always live, we trash them just
--- before the call by assigning the 'undef' value to them. The ones we
--- need are restored from the Cmm local var and the ones we don't need
--- are fine to be trashed.
-getTrashStmts :: LlvmM LlvmStatements
-getTrashStmts = do
- regs <- getTrashRegs
- stmts <- flip mapM regs $ \ r -> do
- reg <- getCmmReg (CmmGlobal r)
- let ty = (pLower . getVarType) reg
- return $ Store (LMLitVar $ LMUndefLit ty) reg
- return $ toOL stmts
-
-getTrashRegs :: LlvmM [GlobalReg]
-getTrashRegs = do plat <- getLlvmPlatform
- return $ filter (callerSaves plat) (activeStgRegs plat)
-
-- | Get a function pointer to the CLabel specified.
--
-- This is for Haskell functions, function type is assumed, so doesn't work
@@ -1967,7 +1934,3 @@ getCmmRegW = lift . getCmmReg
genLoadW :: Atomic -> CmmExpr -> CmmType -> WriterT LlvmAccum LlvmM LlvmVar
genLoadW atomic e ty = liftExprData $ genLoad atomic e ty
-doTrashStmts :: WriterT LlvmAccum LlvmM ()
-doTrashStmts = do
- stmts <- lift getTrashStmts
- tell $ LlvmAccum stmts mempty
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 86dd913461c..f4d5e7f553c 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1465,7 +1465,7 @@ runPhase (RealPhase LlvmOpt) input_fn dflags
-- we always (unless -optlo specified) run Opt since we rely on it to
-- fix up some pretty big deficiencies in the code we generate
llvmOpts = case optLevel dflags of
- 0 -> "-mem2reg -globalopt"
+ 0 -> "-mem2reg -globalopt -lower-expect"
1 -> "-O1 -globalopt"
_ -> "-O2"

43
9394.patch Normal file
View File

@ -0,0 +1,43 @@
From 480b5d6440bbbd0b89dabdb2dc957333056aa2a7 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Tue, 22 Nov 2022 15:23:50 +0100
Subject: [PATCH] m4/fp_leading_underscore.m4: Avoid implicit exit function
declaration
And switch to a new-style function definition.
Fixes build issues with compilers that do not accept implicit function
declarations.
---
m4/fp_leading_underscore.m4 | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/m4/fp_leading_underscore.m4 b/m4/fp_leading_underscore.m4
index fde57c7625d..939cee3b69f 100644
--- a/m4/fp_leading_underscore.m4
+++ b/m4/fp_leading_underscore.m4
@@ -32,17 +32,15 @@ struct nlist xYzzY1[] = {{"xYzzY1", 0},{0}};
struct nlist xYzzY2[] = {{"_xYzzY2", 0},{0}};
#endif
-int main(argc, argv)
-int argc;
-char **argv;
+int main(int argc, char **argv)
{
#if defined(HAVE_NLIST_H)
if(nlist(argv[0], xYzzY1) == 0 && xYzzY1[0].n_value != 0)
- exit(1);
+ return 1;
if(nlist(argv[0], xYzzY2) == 0 && xYzzY2[0].n_value != 0)
- exit(0);
+ return 0;
#endif
- exit(1);
+ return 1;
}]])],[fptools_cv_leading_underscore=yes],[fptools_cv_leading_underscore=no],[fptools_cv_leading_underscore=no])
;;
esac]);
--
GitLab

View File

@ -0,0 +1,93 @@
From 9aace0eaf6279f17368a1753b65afbdc466e8291 Mon Sep 17 00:00:00 2001
From: Sylvain Henry <sylvain@haskus.fr>
Date: Sat, 10 Apr 2021 14:48:16 +0200
Subject: [PATCH] Produce constant file atomically (#19684)
---
utils/deriveConstants/Main.hs | 21 ++++++++++++++++-----
utils/deriveConstants/deriveConstants.cabal | 3 ++-
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/utils/deriveConstants/Main.hs b/utils/deriveConstants/Main.hs
index 8bf8ae7b44d..9db673a9852 100644
--- a/utils/deriveConstants/Main.hs
+++ b/utils/deriveConstants/Main.hs
@@ -34,9 +34,10 @@ import Data.Maybe (catMaybes, mapMaybe, fromMaybe)
import Numeric (readHex)
import System.Environment (getArgs)
import System.Exit (ExitCode(ExitSuccess), exitFailure)
-import System.FilePath ((</>))
+import System.FilePath ((</>),(<.>))
import System.IO (stderr, hPutStrLn)
import System.Process (showCommandForUser, readProcess, rawSystem)
+import System.Directory (renameFile)
main :: IO ()
main = do opts <- parseArgs
@@ -79,6 +80,16 @@ data Options = Options {
o_targetOS :: Maybe String
}
+-- | Write a file atomically
+--
+-- This avoids other processes seeing the file while it is being written into.
+atomicWriteFile :: FilePath -> String -> IO ()
+atomicWriteFile fn s = do
+ let tmp = fn <.> "tmp"
+ writeFile tmp s
+ renameFile tmp fn
+
+
parseArgs :: IO Options
parseArgs = do args <- getArgs
opts <- f emptyOptions args
@@ -670,7 +681,7 @@ getWanted verbose os tmpdir gccProgram gccFlags nmProgram mobjdumpProgram
= do let cStuff = unlines (headers ++ concatMap (doWanted . snd) (wanteds os))
cFile = tmpdir </> "tmp.c"
oFile = tmpdir </> "tmp.o"
- writeFile cFile cStuff
+ atomicWriteFile cFile cStuff
execute verbose gccProgram (gccFlags ++ ["-c", cFile, "-o", oFile])
xs <- case os of
"openbsd" -> readProcess objdumpProgam ["--syms", oFile] ""
@@ -855,7 +866,7 @@ getWanted verbose os tmpdir gccProgram gccFlags nmProgram mobjdumpProgram
= return (w, FieldTypeGcptrMacro name)
writeHaskellType :: FilePath -> [What Fst] -> IO ()
-writeHaskellType fn ws = writeFile fn xs
+writeHaskellType fn ws = atomicWriteFile fn xs
where xs = unlines [header, body, footer, parser]
header = "module GHC.Platform.Constants where\n\n\
\import Prelude\n\
@@ -920,7 +931,7 @@ writeHaskellType fn ws = writeFile fn xs
writeHaskellValue :: FilePath -> [What Snd] -> IO ()
-writeHaskellValue fn rs = writeFile fn xs
+writeHaskellValue fn rs = atomicWriteFile fn xs
where xs = unlines [header, body, footer]
header = "PlatformConstants {"
footer = " }"
@@ -937,7 +948,7 @@ writeHaskellValue fn rs = writeFile fn xs
doWhat (FieldTypeGcptrMacro {}) = []
writeHeader :: FilePath -> [(Where, What Snd)] -> IO ()
-writeHeader fn rs = writeFile fn xs
+writeHeader fn rs = atomicWriteFile fn xs
where xs = headers ++ hs ++ unlines body
headers = "/* This file is created automatically. Do not edit by hand.*/\n\n"
haskellRs = fmap snd $ filter (\r -> fst r `elem` [Haskell,Both]) rs
diff --git a/utils/deriveConstants/deriveConstants.cabal b/utils/deriveConstants/deriveConstants.cabal
index 50b5b695c30..36ba7ebe1f7 100644
--- a/utils/deriveConstants/deriveConstants.cabal
+++ b/utils/deriveConstants/deriveConstants.cabal
@@ -20,4 +20,5 @@ Executable deriveConstants
Build-Depends: base >= 4 && < 5,
containers,
process,
- filepath
+ filepath,
+ directory
--
GitLab

View File

@ -0,0 +1,87 @@
Description: Don't include BufPos in interface files
Author: Matthew Pickering
Origin: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8972
Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/22162
Index: b/compiler/GHC/Iface/Ext/Types.hs
===================================================================
--- a/compiler/GHC/Iface/Ext/Types.hs
+++ b/compiler/GHC/Iface/Ext/Types.hs
@@ -746,5 +746,5 @@ toHieName name
| isKnownKeyName name = KnownKeyName (nameUnique name)
| isExternalName name = ExternalName (nameModule name)
(nameOccName name)
- (nameSrcSpan name)
- | otherwise = LocalName (nameOccName name) (nameSrcSpan name)
+ (removeBufSpan $ nameSrcSpan name)
+ | otherwise = LocalName (nameOccName name) (removeBufSpan $ nameSrcSpan name)
Index: b/compiler/GHC/Types/SrcLoc.hs
===================================================================
--- a/compiler/GHC/Types/SrcLoc.hs
+++ b/compiler/GHC/Types/SrcLoc.hs
@@ -72,6 +72,7 @@ module GHC.Types.SrcLoc (
getBufPos,
BufSpan(..),
getBufSpan,
+ removeBufSpan,
-- * Located
Located,
@@ -397,6 +398,10 @@ data UnhelpfulSpanReason
| UnhelpfulOther !FastString
deriving (Eq, Show)
+removeBufSpan :: SrcSpan -> SrcSpan
+removeBufSpan (RealSrcSpan s _) = RealSrcSpan s Nothing
+removeBufSpan s = s
+
{- Note [Why Maybe BufPos]
~~~~~~~~~~~~~~~~~~~~~~~~~~
In SrcLoc we store (Maybe BufPos); in SrcSpan we store (Maybe BufSpan).
Index: b/compiler/GHC/Utils/Binary.hs
===================================================================
--- a/compiler/GHC/Utils/Binary.hs
+++ b/compiler/GHC/Utils/Binary.hs
@@ -1444,19 +1444,6 @@ instance Binary RealSrcSpan where
return (mkRealSrcSpan (mkRealSrcLoc f sl sc)
(mkRealSrcLoc f el ec))
-instance Binary BufPos where
- put_ bh (BufPos i) = put_ bh i
- get bh = BufPos <$> get bh
-
-instance Binary BufSpan where
- put_ bh (BufSpan start end) = do
- put_ bh start
- put_ bh end
- get bh = do
- start <- get bh
- end <- get bh
- return (BufSpan start end)
-
instance Binary UnhelpfulSpanReason where
put_ bh r = case r of
UnhelpfulNoLocationInfo -> putByte bh 0
@@ -1475,10 +1462,11 @@ instance Binary UnhelpfulSpanReason wher
_ -> UnhelpfulOther <$> get bh
instance Binary SrcSpan where
- put_ bh (RealSrcSpan ss sb) = do
+ put_ bh (RealSrcSpan ss _sb) = do
putByte bh 0
+ -- BufSpan doesn't ever get serialised because the positions depend
+ -- on build location.
put_ bh ss
- put_ bh sb
put_ bh (UnhelpfulSpan s) = do
putByte bh 1
@@ -1488,8 +1476,7 @@ instance Binary SrcSpan where
h <- getByte bh
case h of
0 -> do ss <- get bh
- sb <- get bh
- return (RealSrcSpan ss sb)
+ return (RealSrcSpan ss Nothing)
_ -> do s <- get bh
return (UnhelpfulSpan s)

View File

@ -1,8 +1,10 @@
Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424 Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424
--- a/compiler/iface/MkIface.hs Index: b/compiler/GHC/Iface/Recomp.hs
+++ b/compiler/iface/MkIface.hs ===================================================================
@@ -681,7 +681,7 @@ addFingerprints hsc_env mb_old_fingerpri --- a/compiler/GHC/Iface/Recomp.hs
+++ b/compiler/GHC/Iface/Recomp.hs
@@ -1071,7 +1071,7 @@ addFingerprints hsc_env iface0
iface_hash <- computeFingerprint putNameLiterally iface_hash <- computeFingerprint putNameLiterally
(mod_hash, (mod_hash,
ann_fn (mkVarOcc "module"), -- See mkIfaceAnnCache ann_fn (mkVarOcc "module"), -- See mkIfaceAnnCache
@ -11,13 +13,12 @@ Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424
sorted_deps, sorted_deps,
mi_hpc iface0) mi_hpc iface0)
@@ -714,6 +714,9 @@ addFingerprints hsc_env mb_old_fingerpri @@ -1106,6 +1106,8 @@ addFingerprints hsc_env iface0
(non_orph_rules, orph_rules) = mkOrphMap ifRuleOrph (mi_rules iface0)
(non_orph_fis, orph_fis) = mkOrphMap ifFamInstOrph (mi_fam_insts iface0) (non_orph_fis, orph_fis) = mkOrphMap ifFamInstOrph (mi_fam_insts iface0)
fix_fn = mi_fix_fn iface0
ann_fn = mkIfaceAnnCache (mi_anns iface0) ann_fn = mkIfaceAnnCache (mi_anns iface0)
+ -- Do not allow filenames to affect the interface + -- Do not allow filenames to affect the interface
+ usages = [ case u of UsageFile _ fp -> UsageFile "" fp; _ -> u | u <- mi_usages iface0 ] + usages = [ case u of UsageFile _ fp -> UsageFile "" fp; _ -> u | u <- mi_usages iface0 ]
+
-- | Retrieve the orphan hashes 'mi_orphan_hash' for a list of modules -- | Retrieve the orphan hashes 'mi_orphan_hash' for a list of modules
-- (in particular, the orphan modules which are transitively imported by the -- (in particular, the orphan modules which are transitively imported by the

43
cabal-add-riscv64.patch Normal file
View File

@ -0,0 +1,43 @@
diff --git a/libraries/Cabal/Cabal-syntax/src/Distribution/System.hs b/libraries/Cabal/Cabal-syntax/src/Distribution/System.hs
index 68bda63..6521464 100644
--- a/libraries/Cabal/Cabal-syntax/src/Distribution/System.hs
+++ b/libraries/Cabal/Cabal-syntax/src/Distribution/System.hs
@@ -159,7 +159,7 @@ buildOS = classifyOS Permissive System.Info.os
-- | These are the known Arches: I386, X86_64, PPC, PPC64, Sparc,
-- Arm, AArch64, Mips, SH, IA64, S390, S390X, Alpha, Hppa, Rs6000,
--- M68k, Vax, JavaScript and Wasm32.
+-- M68k, Vax, RISCV64, JavaScript and Wasm32.
--
-- The following aliases can also be used:
-- * PPC alias: powerpc
@@ -173,7 +173,7 @@ data Arch = I386 | X86_64 | PPC | PPC64 | Sparc
| Arm | AArch64 | Mips | SH
| IA64 | S390 | S390X
| Alpha | Hppa | Rs6000
- | M68k | Vax
+ | M68k | Vax | RISCV64
| JavaScript
| Wasm32
| OtherArch String
@@ -188,7 +188,7 @@ knownArches = [I386, X86_64, PPC, PPC64, Sparc
,Arm, AArch64, Mips, SH
,IA64, S390, S390X
,Alpha, Hppa, Rs6000
- ,M68k, Vax
+ ,M68k, Vax, RISCV64
,JavaScript
,Wasm32]
diff --git a/libraries/Cabal/Cabal/src/Distribution/Simple/PreProcess.hs b/libraries/Cabal/Cabal/src/Distribution/Simple/PreProcess.hs
index fbe5710..a53b33d 100644
--- a/libraries/Cabal/Cabal/src/Distribution/Simple/PreProcess.hs
+++ b/libraries/Cabal/Cabal/src/Distribution/Simple/PreProcess.hs
@@ -729,6 +729,7 @@ platformDefines lbi =
Rs6000 -> ["rs6000"]
M68k -> ["m68k"]
Vax -> ["vax"]
+ RISCV64 -> ["riscv64"]
JavaScript -> ["javascript"]
Wasm32 -> ["wasm32"]
OtherArch _ -> []

View File

@ -0,0 +1,26 @@
From dd38aca95ac25adc9888083669b32ff551151259 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@suse.de>
Date: Mon, 19 Jun 2023 10:38:26 +0200
Subject: [PATCH] Hadrian: enable GHCi support on riscv64
---
hadrian/src/Oracles/Setting.hs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hadrian/src/Oracles/Setting.hs b/hadrian/src/Oracles/Setting.hs
index b9e5d312074..93561a94fe4 100644
--- a/hadrian/src/Oracles/Setting.hs
+++ b/hadrian/src/Oracles/Setting.hs
@@ -302,7 +302,8 @@ ghcWithInterpreter = do
, "darwin", "kfreebsdgnu" ]
goodArch <- anyTargetArch [ "i386", "x86_64", "powerpc"
, "arm", "aarch64", "s390x"
- , "powerpc64", "powerpc64le" ]
+ , "powerpc64", "powerpc64le"
+ , "riscv64" ]
return $ goodOs && goodArch
-- | Variants of the ARM architecture.
--
GitLab

View File

@ -1,31 +0,0 @@
Description: Allow unregisterised ghc-8.6 to build newer GHC
Commit af9b744bbf1 introduced a regression stopping existing unregisterised
compilers from being able to compile newer versions of GHC. The problem is
that the bootstrap compiler uses the newer `includes/stg/MiscClosures.h` file
where some defines have been renamed, resulting in the following error:
.
error: stg_atomicModifyMutVarzh undeclared (first use in this function); did you mean stg_atomicModifyMutVar2zh?
.
For more information, see https://gitlab.haskell.org/ghc/ghc/issues/17111.
.
This patch can be removed, once ghc-8.6 is no longer the bootstrap compiler.
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Bug: https://gitlab.haskell.org/ghc/ghc/issues/17111
Index: b/includes/stg/MiscClosures.h
===================================================================
--- a/includes/stg/MiscClosures.h
+++ b/includes/stg/MiscClosures.h
@@ -390,8 +390,12 @@ RTS_FUN_DECL(stg_copySmallMutableArrayzh
RTS_FUN_DECL(stg_casSmallArrayzh);
RTS_FUN_DECL(stg_newMutVarzh);
+#if __GLASGOW_HASKELL__ < 808
+RTS_FUN_DECL(stg_atomicModifyMutVarzh);
+#else
RTS_FUN_DECL(stg_atomicModifyMutVar2zh);
RTS_FUN_DECL(stg_atomicModifyMutVarzuzh);
+#endif
RTS_FUN_DECL(stg_casMutVarzh);
RTS_FUN_DECL(stg_isEmptyMVarzh);

View File

@ -1,51 +0,0 @@
Description: Allow unregisterised ghc-8.2 to build newer GHC
Commit b68697e579d38ca29c2b84377dc2affa04659a28 introduced a regression
stopping existing unregisteristed compilers from being used to compile a newer
version of GHC. The problem is that the bootstrap compiler uses the newer Stg.h
where EB_, IB_, etc, definitions have changed resulting in the following error:
.
error: conflicting types for 'ghc_GhcPrelude_zdtrModule4_bytes'
note: in definition of macro 'EB_'
#define EB_(X) extern const char X[]
note: previous definition of 'ghc_GhcPrelude_zdtrModule4_bytes' was here
char ghc_GhcPrelude_zdtrModule4_bytes[] = "ghc";
.
For more information about the problem, see https://phabricator.haskell.org/D4114.
.
This patch is a rework of https://phabricator.haskell.org/D3741.
It modifies Stg.h to include the old definitions, if a compiler older than
8.4 is being used.
.
This patch can be removed, once ghc-8.2 is no longer the bootstrap compiler.
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Bug: https://ghc.haskell.org/trac/ghc/ticket/15201
Index: b/includes/Stg.h
===================================================================
--- a/includes/Stg.h
+++ b/includes/Stg.h
@@ -232,6 +232,16 @@ typedef StgInt I_;
typedef StgWord StgWordArray[];
typedef StgFunPtr F_;
+#if __GLASGOW_HASKELL__ < 804
+#define EB_(X) extern char X[]
+#define IB_(X) static char X[]
+#define EI_(X) extern StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
+#define II_(X) static StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
+#define IF_(f) static StgFunPtr GNUC3_ATTRIBUTE(used) f(void)
+#define FN_(f) StgFunPtr f(void)
+#define EF_(f) StgFunPtr f(void) /* External Cmm functions */
+#define EFF_(f) void f() /* See Note [External function prototypes] */
+#else
/* byte arrays (and strings): */
#define EB_(X) extern const char X[]
#define IB_(X) static const char X[]
@@ -250,6 +260,7 @@ typedef StgFunPtr F_;
#define EF_(f) StgFunPtr f(void) /* External Cmm functions */
/* foreign functions: */
#define EFF_(f) void f() /* See Note [External function prototypes] */
+#endif /* __GLASGOW_HASKELL__ < 804 */
/* Note [External function prototypes] See Trac #8965, #11395
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -1,58 +0,0 @@
Description: Allow unregisterised ghc-8.4 to build newer GHC
Commit 4075656e8bb introduced a regression stopping existing unregisteristed
compilers from being able to compile newer versions of GHC. The problem is
that the bootstrap compiler uses the newer `rts/storage/ClosureTypes.h` file
where some defines have been renamed, resulting in the following error:
.
error: stg_MUT_ARR_PTRS_FROZEN0_info undeclared (first use in this function); did you mean stg_MUT_ARR_PTRS_FROZEN_DIRTY_info?
.
For more information, see https://gitlab.haskell.org/ghc/ghc/issues/15913.
.
This patch can be removed, once ghc-8.4 is no longer the bootstrap compiler.
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Bug: https://gitlab.haskell.org/ghc/ghc/issues/15913
Bug-Debian: https://bugs.debian.org/932941
Index: b/includes/rts/storage/ClosureTypes.h
===================================================================
--- a/includes/rts/storage/ClosureTypes.h
+++ b/includes/rts/storage/ClosureTypes.h
@@ -82,5 +82,11 @@
#define SMALL_MUT_ARR_PTRS_DIRTY 60
#define SMALL_MUT_ARR_PTRS_FROZEN_DIRTY 61
#define SMALL_MUT_ARR_PTRS_FROZEN_CLEAN 62
+#if __GLASGOW_HASKELL__ < 806
+#define SMALL_MUT_ARR_PTRS_FROZEN0 SMALL_MUT_ARR_PTRS_FROZEN_DIRTY
+#define SMALL_MUT_ARR_PTRS_FROZEN SMALL_MUT_ARR_PTRS_FROZEN_CLEAN
+#define MUT_ARR_PTRS_FROZEN0 MUT_ARR_PTRS_FROZEN_DIRTY
+#define MUT_ARR_PTRS_FROZEN MUT_ARR_PTRS_FROZEN_CLEAN
+#endif
#define COMPACT_NFDATA 63
#define N_CLOSURE_TYPES 64
Index: b/includes/stg/MiscClosures.h
===================================================================
--- a/includes/stg/MiscClosures.h
+++ b/includes/stg/MiscClosures.h
@@ -116,12 +116,22 @@ RTS_ENTRY(stg_ARR_WORDS);
RTS_ENTRY(stg_MUT_ARR_WORDS);
RTS_ENTRY(stg_MUT_ARR_PTRS_CLEAN);
RTS_ENTRY(stg_MUT_ARR_PTRS_DIRTY);
+#if __GLASGOW_HASKELL__ < 806
+RTS_ENTRY(stg_MUT_ARR_PTRS_FROZEN);
+RTS_ENTRY(stg_MUT_ARR_PTRS_FROZEN0);
+#else
RTS_ENTRY(stg_MUT_ARR_PTRS_FROZEN_CLEAN);
RTS_ENTRY(stg_MUT_ARR_PTRS_FROZEN_DIRTY);
+#endif
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_CLEAN);
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_DIRTY);
+#if __GLASGOW_HASKELL__ < 806
+RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_FROZEN);
+RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_FROZEN0);
+#else
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_FROZEN_CLEAN);
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_FROZEN_DIRTY);
+#endif
RTS_ENTRY(stg_MUT_VAR_CLEAN);
RTS_ENTRY(stg_MUT_VAR_DIRTY);
RTS_ENTRY(stg_END_TSO_QUEUE);

View File

@ -1,35 +0,0 @@
--- ghc-8.6.3/docs/users_guide/flags.py~ 2018-09-21 06:18:23.000000000 +0800
+++ ghc-8.6.3/docs/users_guide/flags.py 2019-03-05 10:20:38.639782096 +0800
@@ -49,6 +49,8 @@
import sphinx
from sphinx import addnodes
from sphinx.domains.std import GenericObject
+from sphinx.domains import ObjType
+from sphinx.roles import XRefRole
from sphinx.errors import SphinxError
from distutils.version import LooseVersion
from utils import build_table_from_list
@@ -603,14 +605,21 @@
sphinx_version = LooseVersion(sphinx.__version__)
override_arg = {'override': True} if sphinx_version >= LooseVersion('1.8') else {}
+ # Yuck: We can't use app.add_object_type since we need to provide the
+ # Directive instance ourselves.
+ std_object_types = app.registry.domain_object_types.setdefault('std', {})
+
# Add ghc-flag directive, and override the class with our own
- app.add_object_type('ghc-flag', 'ghc-flag')
app.add_directive_to_domain('std', 'ghc-flag', Flag, **override_arg)
+ app.add_role_to_domain('std', 'ghc-flag', XRefRole())
+ std_object_types['ghc-flag'] = ObjType('ghc-flag', 'ghc-flag')
# Add extension directive, and override the class with our own
- app.add_object_type('extension', 'extension')
app.add_directive_to_domain('std', 'extension', LanguageExtension,
**override_arg)
+ app.add_role_to_domain('std', 'extension', XRefRole())
+ std_object_types['extension'] = ObjType('ghc-flag', 'ghc-flag')
+
# NB: language-extension would be misinterpreted by sphinx, and produce
# lang="extensions" XML attributes

View File

@ -0,0 +1,9 @@
--- ghc-9.2.1/hadrian/hadrian.cabal~ 2021-10-29 04:41:34.000000000 +0800
+++ ghc-9.2.1/hadrian/hadrian.cabal 2021-11-01 15:02:49.625656704 +0800
@@ -162,5 +162,5 @@
-- 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

View File

@ -1,5 +1,5 @@
--- ghc-8.2.2/libraries/Cabal/Cabal/Distribution/Simple/Install.hs~ 2017-05-05 23:51:43.000000000 +0900 --- ghc/libraries/Cabal/Cabal/src/Distribution/Simple/Install.hs~ 2017-05-05 23:51:43.000000000 +0900
+++ ghc-8.2.2/libraries/Cabal/Cabal/Distribution/Simple/Install.hs 2018-02-27 12:22:13.159432104 +0900 +++ ghc/libraries/Cabal/Cabal/src/Distribution/Simple/Install.hs 2018-02-27 12:22:13.159432104 +0900
@@ -215,8 +215,7 @@ @@ -215,8 +215,7 @@
++ " in " ++ binPref) ++ " in " ++ binPref)
inPath <- isInSearchPath binPref inPath <- isInSearchPath binPref

View File

@ -0,0 +1,11 @@
--- ghc-9.4.1/compiler/GHC/Driver/Pipeline/Execute.hs~ 2022-08-07 12:00:38.000000000 +0800
+++ ghc-9.4.1/compiler/GHC/Driver/Pipeline/Execute.hs 2022-08-16 18:31:48.638516201 +0800
@@ -1161,7 +1161,7 @@
-- suppress the generation of the .note.gnu.build-id section,
-- which we don't need and sometimes causes ld to emit a
-- warning:
- ld_build_id | toolSettings_ldSupportsBuildId toolSettings' = ["--build-id=none"]
+ ld_build_id {-| toolSettings_ldSupportsBuildId toolSettings' = ["--build-id=none"]-}
| otherwise = []
if ldIsGnuLd

70
ghc-configure-c99.patch Normal file
View File

@ -0,0 +1,70 @@
Submitted upstream:
<https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9394>
From 6b218717ac85d6dc9104f470cac0b4fb594104f4 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Tue, 22 Nov 2022 15:23:50 +0100
Subject: [PATCH] m4/fp_leading_underscore.m4: Avoid implicit exit function
declaration
Content-type: text/plain
And switch to a new-style function definition.
Fixes build issues with compilers that do not accept implicit function
declarations.
---
m4/fp_leading_underscore.m4 | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/m4/fp_leading_underscore.m4 b/m4/fp_leading_underscore.m4
index fde57c7625..939cee3b69 100644
--- a/m4/fp_leading_underscore.m4
+++ b/m4/fp_leading_underscore.m4
@@ -32,17 +32,15 @@ struct nlist xYzzY1[] = {{"xYzzY1", 0},{0}};
struct nlist xYzzY2[] = {{"_xYzzY2", 0},{0}};
#endif
-int main(argc, argv)
-int argc;
-char **argv;
+int main(int argc, char **argv)
{
#if defined(HAVE_NLIST_H)
if(nlist(argv[0], xYzzY1) == 0 && xYzzY1[0].n_value != 0)
- exit(1);
+ return 1;
if(nlist(argv[0], xYzzY2) == 0 && xYzzY2[0].n_value != 0)
- exit(0);
+ return 0;
#endif
- exit(1);
+ return 1;
}]])],[fptools_cv_leading_underscore=yes],[fptools_cv_leading_underscore=no],[fptools_cv_leading_underscore=no])
;;
esac]);
diff -ur ghc-9.4.3.orig/configure ghc-9.4.3/configure
--- ghc-9.4.3.orig/configure 2022-11-03 04:46:32.000000000 +0100
+++ ghc-9.4.3/configure 2022-11-22 16:37:07.812512120 +0100
@@ -17095,17 +17101,15 @@
struct nlist xYzzY2[] = {{"_xYzzY2", 0},{0}};
#endif
-int main(argc, argv)
-int argc;
-char **argv;
+int main(int argc, char **argv)
{
#if defined(HAVE_NLIST_H)
if(nlist(argv[0], xYzzY1) == 0 && xYzzY1[0].n_value != 0)
- exit(1);
+ return 1;
if(nlist(argv[0], xYzzY2) == 0 && xYzzY2[0].n_value != 0)
- exit(0);
+ return 0;
#endif
- exit(1);
+ return 1;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :

View File

@ -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)

963
ghc.spec

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
Description: Remove hard-coded googleapis font URL
Bug: https://github.com/haskell/haddock/issues/1211
Bug-Debian: https://bugs.debian.org/963690
Index: b/utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs
===================================================================
--- a/utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs
+++ b/utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs
@@ -137,7 +137,7 @@ headHtml docTitle themes mathjax_url bas
, thetype "text/css"
, href (withBaseURL base_url quickJumpCssFile) ]
<< noHtml
- , thelink ! [ rel "stylesheet", thetype "text/css", href fontUrl] << noHtml
+ -- , thelink ! [ rel "stylesheet", thetype "text/css", href fontUrl] << noHtml
, script ! [ src (withBaseURL base_url haddockJsFile)
, emptyAttr "async"
, thetype "text/javascript" ]
@@ -146,7 +146,7 @@ headHtml docTitle themes mathjax_url bas
, script ! [src mjUrl, thetype "text/javascript"] << noHtml
]
where
- fontUrl = "https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700"
+ -- fontUrl = "https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700"
mjUrl = fromMaybe "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML" mathjax_url
mjConf = unwords [ "MathJax.Hub.Config({"
, "tex2jax: {"

View File

@ -7,4 +7,4 @@ fi
cd libraries cd libraries
grep -i ^version: Cabal/Cabal/Cabal.cabal */*.cabal | grep -v -e "\(Win32\|gmp.old\|gmp2\|integer-simple\)" | sed -e "s!/.*: \+!-!" grep -i ^version: Cabal/Cabal/Cabal.cabal containers/containers/containers.cabal template-haskell/template-haskell.cabal.in */*.cabal | grep -v -e "\(Win32\|gmp.old\|gmp2\|integer-simple\)" | sed -e "s!/.*: \+!-!" | sort

View File

@ -1,2 +1,2 @@
SHA512 (ghc-8.8.4-src.tar.xz.sig) = 1ed2e64e8b75a147d7c66b0018119f54ac740131b6f74612aa975c9120d8f7a8a2286829cef22ef2cd16262af0604659daa41c09ef3bdec6c22b8d086fbc1166 SHA512 (ghc-9.4.5-src.tar.xz) = 6e469558433e9d1d83ae348fb242a178ee7008fcb5c9707f0bdf93f17c394dc05d993b9cd7f9cd65d20c32fadcd1276ed49c3a74ade98235735de5268c3c1315
SHA512 (ghc-8.8.4-src.tar.xz) = efd23bd819f7429486696a3a929a040471db7ea8a2d1f1d832e4cf0825b9e1e0c5e6ecad0ab8376f58b74e9c28c1d2f773bd126596d6d853c9e57d57e5ceb090 SHA512 (ghc-9.4.5-src.tar.xz.sig) = a46b41f21760dbeb5078af3ca1a8bb1acbc3404c54bd201122e4ee06a3bf21d772b88751c8dd7e16891a9a5d2545e5f2894e2fe79922a5e20f7235106dddf1a1

26
sphinx7.patch Normal file
View File

@ -0,0 +1,26 @@
From 52d701b31dc4427b7e321a04be3f5f13a5fc271e Mon Sep 17 00:00:00 2001
From: "mimi.vx" <mimi.vx@gmail.com>
Date: Wed, 24 May 2023 12:42:15 +0000
Subject: [PATCH] Fix for Sphinx 7 removed style key
Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/23444
---
docs/users_guide/rtd-theme/layout.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/users_guide/rtd-theme/layout.html b/docs/users_guide/rtd-theme/layout.html
index 2a61142514a..7ffeff7befc 100644
--- a/docs/users_guide/rtd-theme/layout.html
+++ b/docs/users_guide/rtd-theme/layout.html
@@ -64,7 +64,7 @@
{%- endif %}
{# CSS #}
- <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
+ <link rel="stylesheet" href="{{ pathto('_static/' + styles[-1], 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
{%- for css in css_files %}
{%- if css|attr("rel") %}
--
GitLab

6
tests/smoke/runtest.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
set -e
echo 'main = return ()' > test.hs
ghc test.hs && ./test

11
tests/tests.yml Normal file
View File

@ -0,0 +1,11 @@
---
- hosts: localhost
tags:
- classic
roles:
- role: standard-test-basic
required_packages:
- ghc
tests:
- smoke
...

View File

@ -0,0 +1,12 @@
--- ghc-9.4.0.20220501/libraries/text/text.cabal~ 2022-04-30 02:50:06.000000000 +0800
+++ ghc-9.4.0.20220501/libraries/text/text.cabal 2022-05-06 23:55:56.091521266 +0800
@@ -121,9 +121,6 @@
if os(windows) && impl(ghc >= 8.2 && < 8.4 || == 8.6.3 || == 8.10.1)
build-depends: base < 0
- -- GHC 8.10 has linking issues (probably TH-related) on ARM.
- if (arch(aarch64) || arch(arm)) && impl(ghc == 8.10.*)
- build-depends: base < 0
-- Subword primitives in GHC 9.2.1 are broken on ARM platforms.
if (arch(aarch64) || arch(arm)) && impl(ghc == 9.2.1)

View File

@ -1,27 +0,0 @@
Description: Use native x86_64 instructions on x32
This patch enables a few native 64-bit integer instructions
on x32 which are available on this architecture despite using
32-bit pointers. These instructions are present on x86_64 but
not on x86 and ghc checks the size of (void *) to determine
that. This method fails on x32 since despite using 32-bit
pointers and hence sizeof(void *) == 4, it still uses the
full x86_64 instruction set and software-emulated variants
of the aforementioned 64-bit integer instructions are
therefore not present in the toolchain which will make ghc
fail to build on x32.
See: https://ghc.haskell.org/trac/ghc/ticket/11571
.
Index: ghc-8.0.2/rts/RtsSymbols.c
===================================================================
--- ghc-8.0.2.orig/rts/RtsSymbols.c
+++ ghc-8.0.2/rts/RtsSymbols.c
@@ -857,7 +857,7 @@
// 64-bit support functions in libgcc.a
-#if defined(__GNUC__) && SIZEOF_VOID_P <= 4 && !defined(_ABIN32)
+#if defined(__GNUC__) && SIZEOF_VOID_P <= 4 && !defined(_ABIN32) && !(defined(__x86_64__) && defined(__ILP32__))
#define RTS_LIBGCC_SYMBOLS \
SymI_NeedsProto(__divdi3) \
SymI_NeedsProto(__udivdi3) \