The package rpms/ghc9.2.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/ghc9.2.git/commit/?id=4e40662bfc1...
https://src.fedoraproject.org/cgit/rpms/ghc9.2.git/commit/?id=fe7833fac33...
https://src.fedoraproject.org/cgit/rpms/ghc9.2.git/commit/?id=24713a08d70....
Change:
-%ifarch armv7hl
-%ifarch armv7hl
+%ifarch s390x
Thanks.
Full change:
============
commit bac426e3e976c068b6d3238ac0d4e60c62240d54
Author: Jens Petersen <petersen(a)redhat.com>
Date: Thu Jun 2 18:31:30 2022 +0800
Revert "add %bcond for system libffi"
This reverts commit 6a0523b889f40e0c13956ffe0bed5e5756a8d397.
It is not necessary after all
diff --git a/ghc9.2.spec b/ghc9.2.spec
index e89c097..55f8334 100644
--- a/ghc9.2.spec
+++ b/ghc9.2.spec
@@ -8,8 +8,6 @@
# use the Hadrian buildsystem
%bcond_without hadrian
-%bcond_without systemlibffi
-
%global ghc_name ghc9.2
# to handle RCs
@@ -134,9 +132,7 @@ BuildRequires: ghc-template-haskell-devel
BuildRequires: ghc-transformers-devel
BuildRequires: alex
BuildRequires: gmp-devel
-%if %{with systemlibffi}
BuildRequires: libffi-devel
-%endif
BuildRequires: lzip
BuildRequires: make
BuildRequires: gcc-c++
@@ -220,9 +216,6 @@ for the functional language Haskell. Highlights:
%package compiler
Summary: GHC compiler and utilities
License: BSD
-%if %{without systemlibffi}
-Provides: bundled(libffi) = 3.3-rc2
-%endif
Requires: gcc%{?_isa}
Requires: %{name}-base-devel%{?_isa} = %{base_ver}-%{release}
Requires: ghc-filesystem
@@ -305,7 +298,7 @@ This provides the hadrian tool which can be used to build ghc.
%if %{defined ghclibdir}
%ghc_lib_subpackage -d -l BSD 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}%{?with_systemlibffi:,libffi-devel%{?_isa}} base-%{base_ver}
+%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.3.1
%ghc_lib_subpackage -d -l %BSDHaskellReport containers-0.6.5.1
@@ -379,9 +372,7 @@ Installing this package causes %{name}-*-prof packages corresponding
to
%patch6 -p1 -b .orig
%patch10 -p1 -b .orig
-%if %{with systemlibffi}
rm libffi-tarballs/libffi-*.tar.gz
-%endif
%ifarch armv7hl
%patch12 -p1 -b .orig
@@ -459,9 +450,7 @@ export CC=%{_bindir}/gcc
--libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} \
--sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \
--docdir=%{_docdir}/%{name} \
-%if %{with systemlibffi}
--with-system-libffi \
-%endif
%ifarch %{ghc_unregisterized_arches}
--enable-unregisterised \
%endif
@@ -572,7 +561,7 @@ fi\
# add rts libs
%if %{with hadrian}
-for i in %{buildroot}%{ghclibplatform}/libHSrts*ghc%{ghc_version}.so
%{!?with_systemlibffi:%{buildroot}%{ghclibplatform}/libffi.so*}; do
+for i in %{buildroot}%{ghclibplatform}/libHSrts*ghc%{ghc_version}.so; do
echo $i >> %{name}-base.files
done
%else
commit d81f6368a22e94216761b6c446e4b392a018c5cb
Author: Jens Petersen <petersen(a)redhat.com>
Date: Wed Jun 1 00:08:29 2022 +0800
add %bcond for system libffi
diff --git a/ghc9.2.spec b/ghc9.2.spec
index 55f8334..e89c097 100644
--- a/ghc9.2.spec
+++ b/ghc9.2.spec
@@ -8,6 +8,8 @@
# use the Hadrian buildsystem
%bcond_without hadrian
+%bcond_without systemlibffi
+
%global ghc_name ghc9.2
# to handle RCs
@@ -132,7 +134,9 @@ BuildRequires: ghc-template-haskell-devel
BuildRequires: ghc-transformers-devel
BuildRequires: alex
BuildRequires: gmp-devel
+%if %{with systemlibffi}
BuildRequires: libffi-devel
+%endif
BuildRequires: lzip
BuildRequires: make
BuildRequires: gcc-c++
@@ -216,6 +220,9 @@ for the functional language Haskell. Highlights:
%package compiler
Summary: GHC compiler and utilities
License: BSD
+%if %{without systemlibffi}
+Provides: bundled(libffi) = 3.3-rc2
+%endif
Requires: gcc%{?_isa}
Requires: %{name}-base-devel%{?_isa} = %{base_ver}-%{release}
Requires: ghc-filesystem
@@ -298,7 +305,7 @@ This provides the hadrian tool which can be used to build ghc.
%if %{defined ghclibdir}
%ghc_lib_subpackage -d -l BSD 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 %BSDHaskellReport -c
gmp-devel%{?_isa}%{?with_systemlibffi:,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.3.1
%ghc_lib_subpackage -d -l %BSDHaskellReport containers-0.6.5.1
@@ -372,7 +379,9 @@ Installing this package causes %{name}-*-prof packages corresponding
to
%patch6 -p1 -b .orig
%patch10 -p1 -b .orig
+%if %{with systemlibffi}
rm libffi-tarballs/libffi-*.tar.gz
+%endif
%ifarch armv7hl
%patch12 -p1 -b .orig
@@ -450,7 +459,9 @@ export CC=%{_bindir}/gcc
--libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} \
--sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \
--docdir=%{_docdir}/%{name} \
+%if %{with systemlibffi}
--with-system-libffi \
+%endif
%ifarch %{ghc_unregisterized_arches}
--enable-unregisterised \
%endif
@@ -561,7 +572,7 @@ fi\
# add rts libs
%if %{with hadrian}
-for i in %{buildroot}%{ghclibplatform}/libHSrts*ghc%{ghc_version}.so; do
+for i in %{buildroot}%{ghclibplatform}/libHSrts*ghc%{ghc_version}.so
%{!?with_systemlibffi:%{buildroot}%{ghclibplatform}/libffi.so*}; do
echo $i >> %{name}-base.files
done
%else
commit e74c73680706b36facb1232dc139f913e74b12b0
Author: Jens Petersen <petersen(a)redhat.com>
Date: Thu Jun 2 18:28:01 2022 +0800
do not disable the s390x unboxed arrays patch on Hadrian!
This caused me to file these two anomalous bugs:
+
https://gitlab.haskell.org/ghc/ghc/-/issues/21671
+
https://gitlab.haskell.org/ghc/ghc/-/issues/21686
diff --git a/ghc9.2.spec b/ghc9.2.spec
index f86c8f3..55f8334 100644
--- a/ghc9.2.spec
+++ b/ghc9.2.spec
@@ -385,11 +385,9 @@ rm libffi-tarballs/libffi-*.tar.gz
%endif
# bigendian
-%if %{without hadrian}
%ifarch s390x
%patch18 -p1 -b .orig
%endif
-%endif
#debian
#%%patch24 -p1 -b .orig
commit 4e40662bfc100d47e7daffda82aef500b00b3185
Author: Jens Petersen <petersen(a)redhat.com>
Date: Tue May 31 18:55:39 2022 +0800
non-hadrian also needs autotools
diff --git a/ghc9.2.spec b/ghc9.2.spec
index 6b3ed1c..f86c8f3 100644
--- a/ghc9.2.spec
+++ b/ghc9.2.spec
@@ -150,10 +150,7 @@ BuildRequires: llvm%{llvm_major}
BuildRequires: llvm >= %{llvm_major}
%endif
%endif
-%ifarch armv7hl
-# patch12
BuildRequires: autoconf, automake
-%endif
%if %{with hadrian}
BuildRequires: ghc-Cabal-static
BuildRequires: ghc-QuickCheck-static
@@ -170,8 +167,6 @@ BuildRequires: ghc-stm-static
BuildRequires: ghc-transformers-static
BuildRequires: ghc-unordered-containers-static
BuildRequires: alex
-BuildRequires: autoconf
-BuildRequires: automake
BuildRequires: happy
%endif
Requires: %{name}-compiler = %{version}-%{release}
@@ -444,8 +439,8 @@ EOF
%build
autoupdate
+# noisy:
./boot
-autoconf
%ghc_set_gcc_flags
export CC=%{_bindir}/gcc
commit fe7833fac33d3f6b42620188629b0a5931e93b6c
Author: Jens Petersen <petersen(a)redhat.com>
Date: Sun May 29 10:04:23 2022 +0800
update to 9.2.3
diff --git a/.gitignore b/.gitignore
index d38be8a..6c1674e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/ghc-9.2.1-src.tar.lz
/ghc-9.2.1/
/ghc-9.2.2-src.tar.lz
+/ghc-9.2.3-src.tar.lz
diff --git a/0d2f6bd5254c31b3b8891ea541aeecc3bb922a7d.patch
b/0d2f6bd5254c31b3b8891ea541aeecc3bb922a7d.patch
deleted file mode 100644
index b918aba..0000000
--- a/0d2f6bd5254c31b3b8891ea541aeecc3bb922a7d.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From 0d2f6bd5254c31b3b8891ea541aeecc3bb922a7d Mon Sep 17 00:00:00 2001
-From: Matthew Pickering <matthewtpickering(a)gmail.com>
-Date: Fri, 20 May 2022 10:56:25 +0200
-Subject: [PATCH] hadrian: Only copy and install libffi headers when using
- in-tree libffi
-
-When passed `--use-system-libffi` then we shouldn't copy and install the
-headers from the system package. Instead the headers are expected to be
-available as a runtime dependency on the users system.
-
-Fixes #21485 #21487
-
--------------------------
-Metric Decrease:
- T10421
- T12234
- T12425
- T13035
- T18923
--------------------------
----
- hadrian/src/Rules/Generate.hs | 7 +++++--
- hadrian/src/Rules/Rts.hs | 5 +----
- rts/rts.cabal.in | 6 +++---
- 3 files changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/hadrian/src/Rules/Generate.hs b/hadrian/src/Rules/Generate.hs
-index a1d2092ab893..8f56507794bd 100644
---- a/hadrian/src/Rules/Generate.hs
-+++ b/hadrian/src/Rules/Generate.hs
-@@ -50,8 +50,9 @@ compilerDependencies = do
- ghcPath <- expr $ buildPath (vanillaContext stage compiler)
- rtsPath <- expr (rtsBuildPath stage)
- libDir <- expr $ stageLibPath stage
-+ useSystemFfi <- expr (flag UseSystemFfi)
- mconcat [ return $ (libDir -/-) <$> derivedConstantsFiles
-- , notStage0 ? return ((rtsPath -/-) <$> libffiHeaderFiles)
-+ , notStage0 ? not useSystemFfi ? return ((rtsPath -/-) <$>
libffiHeaderFiles)
- , return $ fmap (ghcPath -/-)
- [ "primop-can-fail.hs-incl"
- , "primop-code-size.hs-incl"
-@@ -78,9 +79,11 @@ generatedDependencies = do
- rtsPath <- expr (rtsBuildPath stage)
- includes <- expr $ includesDependencies stage
- libDir <- expr $ stageLibPath stage
-+ useSystemFfi <- expr (flag UseSystemFfi)
- mconcat [ package compiler ? compilerDependencies
- , package ghcPrim ? ghcPrimDependencies
-- , package rts ? return (fmap (rtsPath -/-) libffiHeaderFiles
-+ , package rts ? return (
-+ (if useSystemFfi then [] else fmap (rtsPath -/-) libffiHeaderFiles)
- ++ includes
- ++ ((libDir -/-) <$> derivedConstantsFiles))
- , stage0 ? return includes ]
-diff --git a/hadrian/src/Rules/Rts.hs b/hadrian/src/Rules/Rts.hs
-index 633b4ed408a5..746eedcf1b78 100644
---- a/hadrian/src/Rules/Rts.hs
-+++ b/hadrian/src/Rules/Rts.hs
-@@ -118,11 +118,8 @@ needRtsLibffiTargets stage = do
- rtsPath <- rtsBuildPath stage
- useSystemFfi <- flag UseSystemFfi
-
-- -- Header files (in the rts build dir).
-- let headers = fmap (rtsPath -/-) libffiHeaderFiles
--
- if useSystemFfi
-- then return headers
-+ then return []
- else do
- -- Need Libffi
- -- This returns the dynamic library files (in the Libffi build dir).
-diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in
-index be94c2383957..a2acf27cb5bc 100644
---- a/rts/rts.cabal.in
-+++ b/rts/rts.cabal.in
-@@ -67,6 +67,9 @@ library
- extra-bundled-libraries: Cffi-6
- else
- extra-bundled-libraries: Cffi
-+ install-includes: ffi.h ffitarget.h
-+ -- ^ see Note [Packaging libffi headers] in
-+ -- GHC.Driver.CodeOutput.
-
- -- The make build system does something special in config.mk.in
- -- for generating profiled, debugged, etc builds of those
-@@ -151,7 +154,7 @@
- install-includes: Cmm.h HsFFI.h MachDeps.h Rts.h RtsAPI.h Stg.h
- ghcautoconf.h ghcconfig.h ghcplatform.h ghcversion.h
- -- ^ from ../includes
-- DerivedConstants.h ffi.h ffitarget.h
-+ DerivedConstants.h
- -- ^ generated
- rts/Adjustor.h
- rts/ExecPage.h
diff --git a/ghc9.2.spec b/ghc9.2.spec
index b4986e0..6b3ed1c 100644
--- a/ghc9.2.spec
+++ b/ghc9.2.spec
@@ -13,7 +13,7 @@
# to handle RCs
%global ghc_release %{version}
-%global base_ver 4.16.1.0
+%global base_ver 4.16.2.0
%global ghc_compact_ver 0.1.0.0
%global hpc_ver 0.6.1.0
@@ -60,12 +60,12 @@
%endif
Name: %{ghc_name}
-Version: 9.2.2
+Version: 9.2.3
# Since library subpackages are versioned:
# - 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: 9%{?dist}
+Release: 10%{?dist}
Summary: Glasgow Haskell Compiler
License: BSD and HaskellReport
@@ -83,8 +83,6 @@ 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
-# hadrian: Only copy and install libffi headers when using in-tree libffi
-Patch8:
https://gitlab.haskell.org/ghc/ghc/-/commit/0d2f6bd5254c31b3b8891ea541aee...
#
https://gitlab.haskell.org/ghc/ghc/-/issues/19684
# DerivedConstants.h not produced atomically
Patch10:
https://gitlab.haskell.org/ghc/ghc/-/commit/9aace0eaf6279f17368a1753b65af...
@@ -101,9 +99,10 @@ Patch16: ghc-9.2.1-hadrian-s390x-rts--qg.patch
#
https://gitlab.haskell.org/ghc/ghc/issues/15411
#
https://gitlab.haskell.org/ghc/ghc/issues/16505
#
https://bugzilla.redhat.com/show_bug.cgi?id=1651448
-#
https://ghc.haskell.org/trac/ghc/ticket/15914
+#
https://gitlab.haskell.org/ghc/ghc/-/issues/15914
#
https://gitlab.haskell.org/ghc/ghc/issues/16973
#
https://bugzilla.redhat.com/show_bug.cgi?id=1733030
+#
https://gitlab.haskell.org/ghc/ghc/-/issues/16998
Patch18: Disable-unboxed-arrays.patch
# Debian patches:
@@ -140,9 +139,7 @@ BuildRequires: gcc-c++
# for terminfo
BuildRequires: ncurses-devel
BuildRequires: perl-interpreter
-%if %{with testsuite}
BuildRequires: python3
-%endif
%if %{with manual}
BuildRequires: python3-sphinx
%endif
@@ -308,7 +305,7 @@ This provides the hadrian tool which can be used to build ghc.
%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.3.0
+%ghc_lib_subpackage -d -l BSD bytestring-0.11.3.1
%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
@@ -378,10 +375,9 @@ Installing this package causes %{name}-*-prof packages corresponding
to
%patch2 -p1 -b .orig
%patch6 -p1 -b .orig
-%patch8 -p1 -b .orig
%patch10 -p1 -b .orig
-rm -r libffi-tarballs
+rm libffi-tarballs/libffi-*.tar.gz
%ifarch armv7hl
%patch12 -p1 -b .orig
@@ -447,10 +443,9 @@ EOF
%endif
%build
-# for patch12
-%ifarch armv7hl
-autoreconf
-%endif
+autoupdate
+./boot
+autoconf
%ghc_set_gcc_flags
export CC=%{_bindir}/gcc
@@ -869,6 +864,10 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index
%changelog
+* Sun May 29 2022 Jens Petersen <petersen(a)redhat.com> - 9.2.3-10
+-
https://downloads.haskell.org/~ghc/9.2.3/docs/html/users_guide/9.2.3-note...
+- base-4.16.2.0 and bytestring-0.11.3.1
+
* Sun May 1 2022 Jens Petersen <petersen(a)redhat.com> - 9.2.2-9
- ghc9.2 now recommends ghc9.2-compiler-default
- recommends zlib-devel was moved to cabal-install/stack
diff --git a/sources b/sources
index 87dcad5..9ad1942 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (ghc-9.2.2-src.tar.lz) =
2d47d5b2824c7cea1275afc613c2cd399bdd1b478f98a8e739753338c1bece2bb246773546c19f65689e8c6c4566ee5cd6144922d52b8f10b58bd8e21acff7b5
+SHA512 (ghc-9.2.3-src.tar.lz) =
750216eab4d1612b07225c312903b9e0b864a3aa798d743332a4f041f397c3d584c38d4e0c13ab87c1ed5ca216a01ae568c51e4059fe85a532c879f8a1102179
commit 33b7a281a903c51ee94652b9d4bf04adfda539b1
Author: Jens Petersen <petersen(a)redhat.com>
Date: Tue May 24 13:45:40 2022 +0800
hadrian haddock generation works now with quick build
diff --git a/ghc9.2.spec b/ghc9.2.spec
index e523961..b4986e0 100644
--- a/ghc9.2.spec
+++ b/ghc9.2.spec
@@ -484,7 +484,7 @@ cd hadrian
%endif
%if %{with haddock}
# sphinx failing with "Undefined reference targets found in Sphinx log."
-%define hadrian_docs --docs=%{?with_quickbuild:none}%{!?with_quickbuild:no-sphinx}
+%define hadrian_docs --docs=no-sphinx
%else
%define hadrian_docs --docs=none
%endif
commit 4c0dda96714f9f8069577c6baf4ba7541df24511
Author: Jens Petersen <petersen(a)redhat.com>
Date: Tue May 24 01:09:20 2022 +0800
restore ghc-base-devel's dependency on libffi-devel for Hadrian
diff --git a/ghc9.2.spec b/ghc9.2.spec
index 54e1798..e523961 100644
--- a/ghc9.2.spec
+++ b/ghc9.2.spec
@@ -306,11 +306,7 @@ This provides the hadrian tool which can be used to build ghc.
%if %{defined ghclibdir}
%ghc_lib_subpackage -d -l BSD Cabal-3.6.3.0
%ghc_lib_subpackage -d -l %BSDHaskellReport array-0.5.4.0
-%if %{with hadrian}
-%ghc_lib_subpackage -d -l %BSDHaskellReport -c gmp-devel%{?_isa} base-%{base_ver}
-%else
%ghc_lib_subpackage -d -l %BSDHaskellReport -c gmp-devel%{?_isa},libffi-devel%{?_isa}
base-%{base_ver}
-%endif
%ghc_lib_subpackage -d -l BSD binary-0.8.9.0
%ghc_lib_subpackage -d -l BSD bytestring-0.11.3.0
%ghc_lib_subpackage -d -l %BSDHaskellReport containers-0.6.5.1
commit 7584d9e2dba3f5bf710390586ae2c568cca677a7
Author: Jens Petersen <petersen(a)redhat.com>
Date: Tue May 24 00:14:17 2022 +0800
add a compat include/ symlink into lib/ for Hadrian (#2083958)
reported by Alexey Radkov
diff --git a/ghc9.2.spec b/ghc9.2.spec
index 4f523de..54e1798 100644
--- a/ghc9.2.spec
+++ b/ghc9.2.spec
@@ -653,6 +653,10 @@ ln -sf ../../bin/$i
fi
done
)
+
+#
https://gitlab.haskell.org/ghc/ghc/-/issues/16434
+#
https://gitlab.haskell.org/ghc/ghc/-/issues/21609
+ln -s ../include %{buildroot}%{ghclibdir}/lib
%endif
@@ -781,6 +785,7 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index
%{ghclibdir}/lib/ghcautoconf.h
%{ghclibdir}/lib/ghcplatform.h
%{ghclibdir}/lib/ghcversion.h
+%{ghclibdir}/lib/include
%endif
%{ghcliblib}/ghc-usage.txt
%{ghcliblib}/ghci-usage.txt
@@ -873,6 +878,7 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index
- recommends zlib-devel was moved to cabal-install/stack
- enable system libffi (for Hadrian)
NB unfortunately this changes all the library ABI hash keys
+- add a compat symlink for include/ into lib/ for Hadrian (#2083958)
* Sat Mar 12 2022 Jens Petersen <petersen(a)redhat.com> - 9.2.2-8
-
https://downloads.haskell.org/~ghc/9.2.2/docs/html/users_guide/9.2.2-note...
commit 24713a08d70f338aad4572c469c81f91770bedda
Author: Jens Petersen <petersen(a)redhat.com>
Date: Tue May 24 00:11:10 2022 +0800
enable system libffi for Hadrian
diff --git a/0d2f6bd5254c31b3b8891ea541aeecc3bb922a7d.patch
b/0d2f6bd5254c31b3b8891ea541aeecc3bb922a7d.patch
new file mode 100644
index 0000000..b918aba
--- /dev/null
+++ b/0d2f6bd5254c31b3b8891ea541aeecc3bb922a7d.patch
@@ -0,0 +1,94 @@
+From 0d2f6bd5254c31b3b8891ea541aeecc3bb922a7d Mon Sep 17 00:00:00 2001
+From: Matthew Pickering <matthewtpickering(a)gmail.com>
+Date: Fri, 20 May 2022 10:56:25 +0200
+Subject: [PATCH] hadrian: Only copy and install libffi headers when using
+ in-tree libffi
+
+When passed `--use-system-libffi` then we shouldn't copy and install the
+headers from the system package. Instead the headers are expected to be
+available as a runtime dependency on the users system.
+
+Fixes #21485 #21487
+
+-------------------------
+Metric Decrease:
+ T10421
+ T12234
+ T12425
+ T13035
+ T18923
+-------------------------
+---
+ hadrian/src/Rules/Generate.hs | 7 +++++--
+ hadrian/src/Rules/Rts.hs | 5 +----
+ rts/rts.cabal.in | 6 +++---
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/hadrian/src/Rules/Generate.hs b/hadrian/src/Rules/Generate.hs
+index a1d2092ab893..8f56507794bd 100644
+--- a/hadrian/src/Rules/Generate.hs
++++ b/hadrian/src/Rules/Generate.hs
+@@ -50,8 +50,9 @@ compilerDependencies = do
+ ghcPath <- expr $ buildPath (vanillaContext stage compiler)
+ rtsPath <- expr (rtsBuildPath stage)
+ libDir <- expr $ stageLibPath stage
++ useSystemFfi <- expr (flag UseSystemFfi)
+ mconcat [ return $ (libDir -/-) <$> derivedConstantsFiles
+- , notStage0 ? return ((rtsPath -/-) <$> libffiHeaderFiles)
++ , notStage0 ? not useSystemFfi ? return ((rtsPath -/-) <$>
libffiHeaderFiles)
+ , return $ fmap (ghcPath -/-)
+ [ "primop-can-fail.hs-incl"
+ , "primop-code-size.hs-incl"
+@@ -78,9 +79,11 @@ generatedDependencies = do
+ rtsPath <- expr (rtsBuildPath stage)
+ includes <- expr $ includesDependencies stage
+ libDir <- expr $ stageLibPath stage
++ useSystemFfi <- expr (flag UseSystemFfi)
+ mconcat [ package compiler ? compilerDependencies
+ , package ghcPrim ? ghcPrimDependencies
+- , package rts ? return (fmap (rtsPath -/-) libffiHeaderFiles
++ , package rts ? return (
++ (if useSystemFfi then [] else fmap (rtsPath -/-) libffiHeaderFiles)
+ ++ includes
+ ++ ((libDir -/-) <$> derivedConstantsFiles))
+ , stage0 ? return includes ]
+diff --git a/hadrian/src/Rules/Rts.hs b/hadrian/src/Rules/Rts.hs
+index 633b4ed408a5..746eedcf1b78 100644
+--- a/hadrian/src/Rules/Rts.hs
++++ b/hadrian/src/Rules/Rts.hs
+@@ -118,11 +118,8 @@ needRtsLibffiTargets stage = do
+ rtsPath <- rtsBuildPath stage
+ useSystemFfi <- flag UseSystemFfi
+
+- -- Header files (in the rts build dir).
+- let headers = fmap (rtsPath -/-) libffiHeaderFiles
+-
+ if useSystemFfi
+- then return headers
++ then return []
+ else do
+ -- Need Libffi
+ -- This returns the dynamic library files (in the Libffi build dir).
+diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in
+index be94c2383957..a2acf27cb5bc 100644
+--- a/rts/rts.cabal.in
++++ b/rts/rts.cabal.in
+@@ -67,6 +67,9 @@ library
+ extra-bundled-libraries: Cffi-6
+ else
+ extra-bundled-libraries: Cffi
++ install-includes: ffi.h ffitarget.h
++ -- ^ see Note [Packaging libffi headers] in
++ -- GHC.Driver.CodeOutput.
+
+ -- The make build system does something special in config.mk.in
+ -- for generating profiled, debugged, etc builds of those
+@@ -151,7 +154,7 @@
+ install-includes: Cmm.h HsFFI.h MachDeps.h Rts.h RtsAPI.h Stg.h
+ ghcautoconf.h ghcconfig.h ghcplatform.h ghcversion.h
+ -- ^ from ../includes
+- DerivedConstants.h ffi.h ffitarget.h
++ DerivedConstants.h
+ -- ^ generated
+ rts/Adjustor.h
+ rts/ExecPage.h
diff --git a/ghc9.2.spec b/ghc9.2.spec
index b867ffc..4f523de 100644
--- a/ghc9.2.spec
+++ b/ghc9.2.spec
@@ -83,7 +83,10 @@ 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
+# hadrian: Only copy and install libffi headers when using in-tree libffi
+Patch8:
https://gitlab.haskell.org/ghc/ghc/-/commit/0d2f6bd5254c31b3b8891ea541aee...
#
https://gitlab.haskell.org/ghc/ghc/-/issues/19684
+# DerivedConstants.h not produced atomically
Patch10:
https://gitlab.haskell.org/ghc/ghc/-/commit/9aace0eaf6279f17368a1753b65af...
# armv7hl patches
@@ -130,9 +133,7 @@ BuildRequires: ghc-template-haskell-devel
BuildRequires: ghc-transformers-devel
BuildRequires: alex
BuildRequires: gmp-devel
-%if %{without hadrian}
BuildRequires: libffi-devel
-%endif
BuildRequires: lzip
BuildRequires: make
BuildRequires: gcc-c++
@@ -176,9 +177,6 @@ BuildRequires: autoconf
BuildRequires: automake
BuildRequires: happy
%endif
-%if %{with hadrian}
-Provides: bundled(libffi) = 3.3-rc2
-%endif
Requires: %{name}-compiler = %{version}-%{release}
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-ghc-devel = %{version}-%{release}
@@ -384,11 +382,10 @@ Installing this package causes %{name}-*-prof packages corresponding
to
%patch2 -p1 -b .orig
%patch6 -p1 -b .orig
+%patch8 -p1 -b .orig
%patch10 -p1 -b .orig
-%if %{without hadrian}
rm -r libffi-tarballs
-%endif
%ifarch armv7hl
%patch12 -p1 -b .orig
@@ -401,9 +398,11 @@ rm -r libffi-tarballs
%endif
# bigendian
-%ifarch ppc64 s390x
+%if %{without hadrian}
+%ifarch s390x
%patch18 -p1 -b .orig
%endif
+%endif
#debian
#%%patch24 -p1 -b .orig
@@ -467,9 +466,7 @@ export CC=%{_bindir}/gcc
--libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} \
--sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \
--docdir=%{_docdir}/%{name} \
-%if %{without hadrian}
--with-system-libffi \
-%endif
%ifarch %{ghc_unregisterized_arches}
--enable-unregisterised \
%endif
@@ -580,7 +577,7 @@ fi\
# add rts libs
%if %{with hadrian}
-for i in %{buildroot}%{ghclibplatform}/libHSrts*ghc%{ghc_version}.so
%{buildroot}%{ghclibplatform}/libffi.so*; do
+for i in %{buildroot}%{ghclibplatform}/libHSrts*ghc%{ghc_version}.so; do
echo $i >> %{name}-base.files
done
%else
@@ -874,6 +871,8 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index
* Sun May 1 2022 Jens Petersen <petersen(a)redhat.com> - 9.2.2-9
- ghc9.2 now recommends ghc9.2-compiler-default
- recommends zlib-devel was moved to cabal-install/stack
+- enable system libffi (for Hadrian)
+ NB unfortunately this changes all the library ABI hash keys
* Sat Mar 12 2022 Jens Petersen <petersen(a)redhat.com> - 9.2.2-8
-
https://downloads.haskell.org/~ghc/9.2.2/docs/html/users_guide/9.2.2-note...
commit e0e4d9e82b776004ba490307fa2eba9a9258d8a9
Author: Jens Petersen <petersen(a)redhat.com>
Date: Mon May 2 00:51:36 2022 +0800
recommends zlib-devel was moved to cabal-install/stack
diff --git a/ghc9.2.spec b/ghc9.2.spec
index 8862072..b867ffc 100644
--- a/ghc9.2.spec
+++ b/ghc9.2.spec
@@ -199,7 +199,6 @@ Suggests: %{name}-manual = %{version}-%{release}
Suggests: %{name}-prof = %{version}-%{release}
%endif
Recommends: %{name}-compiler-default = %{version}-%{release}
-Recommends: zlib-devel
%description
GHC is a state-of-the-art, open source, compiler and interactive environment
@@ -874,6 +873,7 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index
%changelog
* Sun May 1 2022 Jens Petersen <petersen(a)redhat.com> - 9.2.2-9
- ghc9.2 now recommends ghc9.2-compiler-default
+- recommends zlib-devel was moved to cabal-install/stack
* Sat Mar 12 2022 Jens Petersen <petersen(a)redhat.com> - 9.2.2-8
-
https://downloads.haskell.org/~ghc/9.2.2/docs/html/users_guide/9.2.2-note...
commit 91ed0ec2df4b58fc9264ae903641c5f702685153
Author: Jens Petersen <petersen(a)redhat.com>
Date: Sun May 1 17:00:24 2022 +0800
ghc9.2 now recommends ghc9.2-compiler-default
diff --git a/ghc9.2.spec b/ghc9.2.spec
index 308ca9c..8862072 100644
--- a/ghc9.2.spec
+++ b/ghc9.2.spec
@@ -65,7 +65,7 @@ Version: 9.2.2
# - 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: 8%{?dist}
+Release: 9%{?dist}
Summary: Glasgow Haskell Compiler
License: BSD and HaskellReport
@@ -198,6 +198,7 @@ Suggests: %{name}-manual = %{version}-%{release}
%if %{with ghc_prof}
Suggests: %{name}-prof = %{version}-%{release}
%endif
+Recommends: %{name}-compiler-default = %{version}-%{release}
Recommends: zlib-devel
%description
@@ -871,6 +872,9 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index
%changelog
+* Sun May 1 2022 Jens Petersen <petersen(a)redhat.com> - 9.2.2-9
+- ghc9.2 now recommends ghc9.2-compiler-default
+
* Sat Mar 12 2022 Jens Petersen <petersen(a)redhat.com> - 9.2.2-8
-
https://downloads.haskell.org/~ghc/9.2.2/docs/html/users_guide/9.2.2-note...
- use llvm12 for aarch64 and s390x