Merge remote-tracking branch 'up/main' into main-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
commit
0a7f7b22d5
31
11662.patch
Normal file
31
11662.patch
Normal 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
|
||||||
|
|
26
dd38aca95ac25adc9888083669b32ff551151259.patch
Normal file
26
dd38aca95ac25adc9888083669b32ff551151259.patch
Normal 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
|
||||||
|
|
65
ghc.spec
65
ghc.spec
@ -20,10 +20,6 @@
|
|||||||
# use Hadrian buildsystem for production builds: seems redundant
|
# use Hadrian buildsystem for production builds: seems redundant
|
||||||
%bcond hadrian 1
|
%bcond hadrian 1
|
||||||
|
|
||||||
%ifarch riscv64
|
|
||||||
%global _lto_cflags %{nil}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# disabled to allow parallel install of ghcX.Y-X.Y.(Z+1) and ghc-X.Y.Z
|
# disabled to allow parallel install of ghcX.Y-X.Y.(Z+1) and ghc-X.Y.Z
|
||||||
%if 0
|
%if 0
|
||||||
%global ghc_major 9.4
|
%global ghc_major 9.4
|
||||||
@ -91,7 +87,7 @@ Version: 9.4.5
|
|||||||
# - 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: 136.3.riscv64%{?dist}
|
Release: 139%{?dist}
|
||||||
Summary: Glasgow Haskell Compiler
|
Summary: Glasgow Haskell Compiler
|
||||||
|
|
||||||
License: BSD-3-Clause AND HaskellReport
|
License: BSD-3-Clause AND HaskellReport
|
||||||
@ -137,6 +133,11 @@ Patch13: text2-allow-ghc8-arm.patch
|
|||||||
Patch15: ghc-warnings.mk-CC-Wall.patch
|
Patch15: ghc-warnings.mk-CC-Wall.patch
|
||||||
Patch16: ghc-hadrian-s390x-rts--qg.patch
|
Patch16: ghc-hadrian-s390x-rts--qg.patch
|
||||||
|
|
||||||
|
# s390x
|
||||||
|
# https://gitlab.haskell.org/ghc/ghc/-/issues/24163
|
||||||
|
# https://gitlab.haskell.org/ghc/ghc/-/merge_requests/11662
|
||||||
|
Patch17: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/11662.patch
|
||||||
|
|
||||||
# Debian patches:
|
# Debian patches:
|
||||||
Patch24: buildpath-abi-stability.patch
|
Patch24: buildpath-abi-stability.patch
|
||||||
Patch26: no-missing-haddock-file-warning.patch
|
Patch26: no-missing-haddock-file-warning.patch
|
||||||
@ -148,6 +149,10 @@ Patch30: https://src.opensuse.org/rpm/ghc/raw/branch/factory/sphinx7.patch
|
|||||||
# See: https://github.com/haskell/cabal/pull/9062
|
# See: https://github.com/haskell/cabal/pull/9062
|
||||||
Patch40: cabal-add-riscv64.patch
|
Patch40: cabal-add-riscv64.patch
|
||||||
|
|
||||||
|
# Enable GHCi support on riscv64
|
||||||
|
# Upstream in >= 9.9.
|
||||||
|
Patch41: https://gitlab.haskell.org/ghc/ghc/-/commit/dd38aca95ac25adc9888083669b32ff551151259.patch
|
||||||
|
|
||||||
# https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms
|
# https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms
|
||||||
|
|
||||||
# fedora ghc has been bootstrapped on
|
# fedora ghc has been bootstrapped on
|
||||||
@ -200,20 +205,20 @@ BuildRequires: elfutils-devel
|
|||||||
# needed for binary-dist-dir
|
# needed for binary-dist-dir
|
||||||
BuildRequires: autoconf automake
|
BuildRequires: autoconf automake
|
||||||
%if %{with build_hadrian}
|
%if %{with build_hadrian}
|
||||||
BuildRequires: ghc-Cabal-static
|
BuildRequires: ghc-Cabal-devel
|
||||||
BuildRequires: ghc-QuickCheck-static
|
BuildRequires: ghc-QuickCheck-devel
|
||||||
BuildRequires: ghc-base-static
|
BuildRequires: ghc-base-devel
|
||||||
BuildRequires: ghc-bytestring-static
|
BuildRequires: ghc-bytestring-devel
|
||||||
BuildRequires: ghc-containers-static
|
BuildRequires: ghc-containers-devel
|
||||||
BuildRequires: ghc-directory-static
|
BuildRequires: ghc-directory-devel
|
||||||
BuildRequires: ghc-extra-static
|
BuildRequires: ghc-extra-devel
|
||||||
BuildRequires: ghc-filepath-static
|
BuildRequires: ghc-filepath-devel
|
||||||
BuildRequires: ghc-mtl-static
|
BuildRequires: ghc-mtl-devel
|
||||||
BuildRequires: ghc-parsec-static
|
BuildRequires: ghc-parsec-devel
|
||||||
BuildRequires: ghc-shake-static
|
BuildRequires: ghc-shake-devel
|
||||||
BuildRequires: ghc-stm-static
|
BuildRequires: ghc-stm-devel
|
||||||
BuildRequires: ghc-transformers-static
|
BuildRequires: ghc-transformers-devel
|
||||||
BuildRequires: ghc-unordered-containers-static
|
BuildRequires: ghc-unordered-containers-devel
|
||||||
%else
|
%else
|
||||||
BuildRequires: %{name}-hadrian
|
BuildRequires: %{name}-hadrian
|
||||||
%endif
|
%endif
|
||||||
@ -462,6 +467,8 @@ rm libffi-tarballs/libffi-*.tar.gz
|
|||||||
%patch -P16 -p1 -b .orig
|
%patch -P16 -p1 -b .orig
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%patch -P17 -p1 -b .orig
|
||||||
|
|
||||||
#debian
|
#debian
|
||||||
#%%patch -P24 -p1 -b .orig
|
#%%patch -P24 -p1 -b .orig
|
||||||
%patch -P26 -p1 -b .orig
|
%patch -P26 -p1 -b .orig
|
||||||
@ -472,6 +479,13 @@ rm libffi-tarballs/libffi-*.tar.gz
|
|||||||
%patch -P30 -p1 -b .orig
|
%patch -P30 -p1 -b .orig
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%ifarch riscv64
|
||||||
|
#RISCV64 cabal support
|
||||||
|
%patch -P40 -p1 -b .orig
|
||||||
|
#GHCi support
|
||||||
|
%patch -P41 -p1 -b .orig
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with haddock} && %{without hadrian}
|
%if %{with haddock} && %{without hadrian}
|
||||||
%global gen_contents_index gen_contents_index.orig
|
%global gen_contents_index gen_contents_index.orig
|
||||||
if [ ! -f "libraries/%{gen_contents_index}" ]; then
|
if [ ! -f "libraries/%{gen_contents_index}" ]; then
|
||||||
@ -1015,14 +1029,15 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Nov 20 2023 David Abdurachmanov <davidlt@rivosinc.com> - 9.4.5-136.3.riscv64
|
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 9.4.5-139
|
||||||
- Build with a new ghc-rpm-macros
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
* Mon Nov 20 2023 David Abdurachmanov <davidlt@rivosinc.com> - 9.4.5-136.2.riscv64
|
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 9.4.5-138
|
||||||
- Add RISCV64 to Cabal
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
* Tue Nov 14 2023 David Abdurachmanov <davidlt@rivosinc.com> - 9.4.5-136.0.riscv64
|
* Sat Nov 25 2023 Jens Petersen <petersen@redhat.com> - 9.4.5-137
|
||||||
- Add support for riscv64
|
- s390x: patch from @stefansf (IBM) to fix llvm alignment in data sections
|
||||||
|
which should fix certain runtime crashes (#2248097)
|
||||||
|
|
||||||
* Mon Sep 11 2023 Jens Petersen <petersen@redhat.com> - 9.4.5-136
|
* Mon Sep 11 2023 Jens Petersen <petersen@redhat.com> - 9.4.5-136
|
||||||
- sync with ghc9.4: add sphinx7 patch
|
- sync with ghc9.4: add sphinx7 patch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user