diff --git a/9_2_3-bootstrap-sources.tar.gz b/9_2_3-bootstrap-sources.tar.gz deleted file mode 100644 index 53104bb..0000000 --- a/9_2_3-bootstrap-sources.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:14c0aaeffa8f8ad642ddd9e97a1d862c2f06e2f00a81f03909bd6485525acfb5 -size 1494230 diff --git a/9_4_4-bootstrap-sources.tar.gz b/9_4_4-bootstrap-sources.tar.gz new file mode 100644 index 0000000..15609dd --- /dev/null +++ b/9_4_4-bootstrap-sources.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ddfa4d0675fce5b19d7f77674f47a2ca557d0edbadd935bf214048b4d031c64 +size 1500603 diff --git a/bytestring.patch b/bytestring.patch deleted file mode 100644 index 01426c6..0000000 --- a/bytestring.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: ghc-9.4.6/libraries/bytestring/cbits/is-valid-utf8.c -=================================================================== ---- ghc-9.4.6.orig/libraries/bytestring/cbits/is-valid-utf8.c -+++ ghc-9.4.6/libraries/bytestring/cbits/is-valid-utf8.c -@@ -50,7 +50,7 @@ SUCH DAMAGE. - #endif - - #include --#include "Rts.h" -+#include "ghcplatform.h" - - #ifdef WORDS_BIGENDIAN - #define to_little_endian(x) __builtin_bswap64(x) diff --git a/execstack.patch b/execstack.patch deleted file mode 100644 index c3d8f42..0000000 --- a/execstack.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 3739e565f8fa09b3a31ba8f563c518480585f6f9 Mon Sep 17 00:00:00 2001 -From: Andreas Schwab -Date: Sat, 11 Jun 2022 23:29:24 +0200 -Subject: [PATCH] RTS: Add stack marker to StgCRunAsm.S - -Every object file must be properly marked for non-executable stack, even if it -contains no code. ---- - rts/StgCRunAsm.S | 11 +++++------ - 1 file changed, 5 insertions(+), 6 deletions(-) - -diff --git a/rts/StgCRunAsm.S b/rts/StgCRunAsm.S -index aed3241d12..9216e6c759 100644 ---- a/rts/StgCRunAsm.S -+++ b/rts/StgCRunAsm.S -@@ -66,8 +66,6 @@ StgReturn: - addi 12,1,-(8*18) - bl _restgpr1_14 - b _restfpr_14 -- -- .section .note.GNU-stack,"",@progbits - # else // linux_HOST_OS - # error Only Linux support for power64 little endian right now. - # endif -@@ -231,8 +229,6 @@ StgReturn: - .cfi_endproc - .size StgReturn, .-StgReturn - -- .section .note.GNU-stack,"",@progbits -- - #elif defined(riscv64_HOST_ARCH) - # define STACK_FRAME_SIZE (RESERVED_C_STACK_BYTES+208) - .text -@@ -374,8 +370,11 @@ StgReturn: - ret - .cfi_endproc - .size StgReturn, .-StgReturn -- -- .section .note.GNU-stack,"",@progbits - #endif - - #endif /* !USE_MINIINTERPRETER */ -+ -+/* mark stack as nonexecutable */ -+#if defined(__linux__) && defined(__ELF__) -+.section .note.GNU-stack,"",@progbits -+#endif --- -2.37.0 - diff --git a/ghc-9.4.6-src.tar.xz b/ghc-9.4.6-src.tar.xz deleted file mode 100644 index edf3779..0000000 --- a/ghc-9.4.6-src.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1b705cf52692f9d4d6707cdf8e761590f5f56ec8ea6a65e36610db392d3d24b9 -size 28594616 diff --git a/ghc-9.6.3-src.tar.xz b/ghc-9.6.3-src.tar.xz new file mode 100644 index 0000000..80dcae6 --- /dev/null +++ b/ghc-9.6.3-src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfcde67b4aa550a0b8a1a9bb8105835dc999fad6397cce33d72fd55d21eb77f5 +size 29346888 diff --git a/ghc-9.6.3-src.tar.xz.sig b/ghc-9.6.3-src.tar.xz.sig new file mode 100644 index 0000000..27e3752 Binary files /dev/null and b/ghc-9.6.3-src.tar.xz.sig differ diff --git a/ghc-pie.patch b/ghc-pie.patch index 5a0b9a5..355cf51 100644 --- a/ghc-pie.patch +++ b/ghc-pie.patch @@ -1,8 +1,8 @@ -Index: ghc-9.4.4/compiler/GHC/Driver/Session.hs +Index: ghc-9.6.1/compiler/GHC/Driver/Session.hs =================================================================== ---- ghc-9.4.4.orig/compiler/GHC/Driver/Session.hs -+++ ghc-9.4.4/compiler/GHC/Driver/Session.hs -@@ -3870,6 +3870,7 @@ default_PIC platform = +--- ghc-9.6.1.orig/compiler/GHC/Driver/Session.hs ++++ ghc-9.6.1/compiler/GHC/Driver/Session.hs +@@ -3861,6 +3861,7 @@ default_PIC platform = -- This requires PIC on AArch64, and ExternalDynamicRefs on Linux as on top -- of that. Subsequently we expect all code on aarch64/linux (and macOS) to -- be built with -fPIC. diff --git a/ghc.changes b/ghc.changes index 07706c8..b9f60d4 100644 --- a/ghc.changes +++ b/ghc.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Nov 8 11:52:04 UTC 2023 - Ondřej Súkup + +- Update to 9.6.3 +- dropped execstack.patch and bytestring.patch + * Major update of ghc see full release notes on: + https://downloads.haskell.org/ghc/9.6.3/docs/users_guide/release-notes.html + ------------------------------------------------------------------- Fri Aug 11 09:33:00 UTC 2023 - Ondřej Súkup @@ -72,7 +80,12 @@ Wed Apr 19 08:44:04 UTC 2023 - Ondřej Súkup ------------------------------------------------------------------- Fri Apr 7 13:08:27 UTC 2023 - Ondřej Súkup - * add provides hsc2hs into ghc-compiler +- add provides hsc2hs into ghc-compiler + +------------------------------------------------------------------- +Wed May 24 14:04:24 UTC 2023 - Ondřej Súkup + +- add sphinx7.patch ------------------------------------------------------------------- Fri Mar 17 11:09:29 UTC 2023 - Ondřej Súkup @@ -92,11 +105,11 @@ Fri Mar 17 11:09:29 UTC 2023 - Ondřej Súkup - added patches: * ghc-gen_contents_index-haddock-path.patch * ghc-Cabal-install-PATH-warning.patch - * execstack.patch + * execstack.patch * libatomic.patch - * riscv-tntc.patch + * riscv-tntc.patch * ghc-hadrian-s390x-rts--qg.patch - + ------------------------------------------------------------------- Tue Jan 31 09:37:15 UTC 2023 - Peter Simons diff --git a/ghc.spec b/ghc.spec index 5119e3a..a4cbe4e 100644 --- a/ghc.spec +++ b/ghc.spec @@ -16,15 +16,15 @@ # -%define full_version 9.4.6 -%define short_version 9.4.6 +%define full_version 9.6.3 +%define short_version 9.6.3 %ifnarch s390x %define with_libnuma 1 %else %define with_libnuma 0 %endif -# Keep in sync with ghc-bootstrap.spec + %global llvm_major 14 # conditionals @@ -63,12 +63,19 @@ %bcond_without perf_build %endif +%if %{without hadrian} +# locked together since disabling haddock causes no manuals built +# and disabling haddock still created index.html +# https://gitlab.haskell.org/ghc/ghc/-/issues/15190 +%{?with_haddock:%bcond_without manual} +%endif + %global ghc_llvm_archs s390x riscv64 %global ghc_unregisterized_arches noarch -%global base_ver 4.17.2.0 +%global base_ver 4.18.1.0 %global ghc_compact_ver 0.1.0.0 -%global hpc_ver 0.6.1.0 +%global hpc_ver 0.6.2.0 %global hsc2hs_ver 0.68.8 Name: ghc @@ -78,30 +85,26 @@ Summary: The Glorious Glasgow Haskell Compiler License: BSD-3-Clause URL: https://www.haskell.org/ghc/ Source: https://downloads.haskell.org/~ghc/%{full_version}/ghc-%{version}-src.tar.xz +Source1: https://downloads.haskell.org/~ghc/%{full_version}/ghc-%{version}-src.tar.xz.sig Source2: ghc-rpmlintrc -Source3: 9_2_3-bootstrap-sources.tar.gz +Source4: 9_4_4-bootstrap-sources.tar.gz Source5: ghc-pkg.man Source6: haddock.man Source7: runghc.man Source9: ghc.keyring Patch1: ghc-gen_contents_index-haddock-path.patch -# for unregisterized (s390x) # https://ghc.haskell.org/trac/ghc/ticket/15689 Patch2: ghc-Cabal-install-PATH-warning.patch # PATCH-FIX-UPSTREAM Disable-unboxed-arrays.patch ptrommler@icloud.com -- Do not use unboxed arrays on big-endian platforms. See Haskell Trac #15411. Patch3: Disable-unboxed-arrays.patch -# PATCH-FIX-UPSTREAM execstack.patch -- RTS: Add stack marker to StgCRunAsm.S -Patch7: execstack.patch -# Work around a bug in Sphinx 6.1.x to fix the documentation build. Remove this patch ASAP. -Patch8: bytestring.patch # PATCH-FIX-UPSTREAM ghc-pie.patch - set linux as default PIE platform Patch35: ghc-pie.patch Patch200: ghc-hadrian-s390x-rts--qg.patch -Patch300: sphinx7.patch +Patch300: sphinx7.patch BuildRequires: binutils-devel BuildRequires: gcc-PIE BuildRequires: gcc-c++ -BuildRequires: ghc-bootstrap >= 9.0 +BuildRequires: ghc-bootstrap >= 9.2 BuildRequires: ghc-bootstrap-helpers >= 1.3 BuildRequires: ghc-rpm-macros-extra BuildRequires: glibc-devel @@ -110,7 +113,7 @@ BuildRequires: libdw-devel BuildRequires: libelf-devel BuildRequires: libffi-devel BuildRequires: libtool -%ifarch s390x riscv64 +%ifarch %{ghc_llvm_archs} BuildRequires: clang%{llvm_major} BuildRequires: llvm%{llvm_major} BuildRequires: llvm%{llvm_major}-devel @@ -170,9 +173,9 @@ Haskell home page at . %package compiler Summary: GHC compiler and utilities License: BSD-3-Clause -Requires: %{name}-filesystem = %{version}-%{release} Requires: gcc Requires: ghc-base-devel = %{base_ver}-%{release} +Requires: %{name}-filesystem = %{version}-%{release} Provides: hsc2hs-%{hsc2hs_ver}-%{release} %ifarch riscv64 s390x Requires: clang%{llvm_major} @@ -214,6 +217,7 @@ This package provides some common directories used for Haskell libraries documentation. %endif + %if %{with manual} %package manual Summary: GHC manual @@ -225,6 +229,7 @@ BuildArch: noarch This package provides the User Guide and Haddock manual. %endif + %global ghc_version_override %{version} %global ghc_pkg_c_deps ghc-compiler = %{ghc_version_override}-%{release} %global version %{ghc_version_override} @@ -234,37 +239,37 @@ This package provides the User Guide and Haddock manual. %define libnuma_dep %{nil} %endif #!ForceMultiversion -%ghc_lib_subpackage -d Cabal-3.8.1.0 -%ghc_lib_subpackage -d Cabal-syntax-3.8.1.0 -%ghc_lib_subpackage -d array-0.5.4.0 +%ghc_lib_subpackage -d Cabal-3.10.1.0 +%ghc_lib_subpackage -d Cabal-syntax-3.10.1.0 +%ghc_lib_subpackage -d array-0.5.5.0 %ghc_lib_subpackage -d -c gmp-devel,libffi-devel,libdw-devel,libelf-devel%{libnuma_dep} base-%{base_ver} %ghc_lib_subpackage -d binary-0.8.9.1 -%ghc_lib_subpackage -d bytestring-0.11.5.1 +%ghc_lib_subpackage -d bytestring-0.11.5.2 %ghc_lib_subpackage -d containers-0.6.7 -%ghc_lib_subpackage -d deepseq-1.4.8.0 -%ghc_lib_subpackage -d directory-1.3.7.1 -%ghc_lib_subpackage -d exceptions-0.10.5 -%ghc_lib_subpackage -d filepath-1.4.2.2 +%ghc_lib_subpackage -d deepseq-1.4.8.1 +%ghc_lib_subpackage -d directory-1.3.8.1 +%ghc_lib_subpackage -d exceptions-0.10.7 +%ghc_lib_subpackage -d filepath-1.4.100.4 %ghc_lib_subpackage -d -x ghc-%{ghc_version_override} %ghc_lib_subpackage -d -x ghc-boot-%{ghc_version_override} %ghc_lib_subpackage -d ghc-boot-th-%{ghc_version_override} -%ghc_lib_subpackage -d -x ghc-compact-0.1.0.0 +%ghc_lib_subpackage -d -x ghc-compact-%{ghc_compact_ver} %ghc_lib_subpackage -d -x ghc-heap-%{ghc_version_override} %ghc_lib_subpackage -d -x ghci-%{ghc_version_override} -%ghc_lib_subpackage -d haskeline-0.8.2 -%ghc_lib_subpackage -d -x hpc-0.6.1.0 +%ghc_lib_subpackage -d haskeline-0.8.2.1 +%ghc_lib_subpackage -d -x hpc-%{hpc_ver} %ghc_lib_subpackage -d -x libiserv-%{ghc_version_override} -%ghc_lib_subpackage -d mtl-2.2.2 +%ghc_lib_subpackage -d mtl-2.3.1 %ghc_lib_subpackage -d parsec-3.1.16.1 %ghc_lib_subpackage -d pretty-1.1.3.6 %ghc_lib_subpackage -d process-1.6.17.0 %ghc_lib_subpackage -d stm-2.5.1.0 -%ghc_lib_subpackage -d template-haskell-2.19.0.0 -%ghc_lib_subpackage -d -c ncurses-devel terminfo-0.4.1.5 +%ghc_lib_subpackage -d template-haskell-2.20.0.0 +%ghc_lib_subpackage -d -c ncurses-devel terminfo-0.4.1.6 %ghc_lib_subpackage -d text-2.0.2 %ghc_lib_subpackage -d time-1.12.2 -%ghc_lib_subpackage -d transformers-0.5.6.2 -%ghc_lib_subpackage -d unix-2.7.3 +%ghc_lib_subpackage -d transformers-0.6.1.0 +%ghc_lib_subpackage -d unix-2.8.1.0 %ghc_lib_subpackage -d xhtml-3000.2.2.1 %global version %{ghc_version_override} @@ -295,13 +300,11 @@ Installing this package causes %{name}-*-prof packages corresponding to %setup -q %patch1 -p1 %patch2 -p1 -%patch7 -p1 -%patch8 -p1 -%ifarch ppc64 s390 s390x +%ifarch s390x %patch3 -p1 %endif %patch35 -p1 -%ifarch ppc64 ppc64le s390x riscv64 +%ifarch ppc64le s390x riscv64 %patch200 -p1 %endif %patch300 -p1 @@ -309,8 +312,9 @@ Installing this package causes %{name}-*-prof packages corresponding to rm libffi-tarballs/libffi-*.tar.gz %build -cp %{SOURCE3} ./ -hadrian/bootstrap/bootstrap.py --bootstrap-sources 9_2_3-bootstrap-sources.tar.gz +cp %{SOURCE4} ./ +hadrian/bootstrap/bootstrap.py --bootstrap-sources 9_4_4-bootstrap-sources.tar.gz + %global hadrian _build/bin/hadrian %ghc_set_gcc_flags @@ -357,6 +361,7 @@ python3 boot.source --hadrian %{hadrian} -j1 --flavour=%{?with_quickbuild:quick+no_profiled_libs}%{!?with_quickbuild:perf%{!?with_ghc_prof:+no_profiled_libs}}%{?hadrian_llvm} %{hadrian_docs} binary-dist-dir %endif + %install ( @@ -366,6 +371,7 @@ make install ) mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d echo "%{ghclibplatform}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf + # avoid 'E: binary-or-shlib-defines-rpath' for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \; -print); do chrpath -d $i @@ -398,7 +404,7 @@ echo "%%dir %{ghclibdir}" >> %{name}-base%{?_ghcdynlibdir:-devel}.files %ghc_gen_filelists libiserv %{ghc_version_override} %ghc_gen_filelists ghc-bignum 1.3 -%ghc_gen_filelists ghc-prim 0.9.1 +%ghc_gen_filelists ghc-prim 0.10.0 %ghc_gen_filelists integer-gmp 1.1 %ghc_gen_filelists rts 1.0.2 @@ -407,11 +413,11 @@ echo "%%dir %{ghclibdir}" >> %{name}-base%{?_ghcdynlibdir:-devel}.files %ghc_merge_filelist integer-gmp base %ghc_merge_filelist rts base +# add rts libs for i in %{buildroot}%{ghclibplatform}/libHSrts*ghc%{ghc_version}.so; do echo $i >> %{name}-base.files done echo "%{_sysconfdir}/ld.so.conf.d/%{name}.conf" >> %{name}-base.files - if [ -f %{buildroot}%{ghcliblib}/package.conf.d/system-cxx-std-lib-1.0.conf ]; then ls -d %{buildroot}%{ghcliblib}/package.conf.d/system-cxx-std-lib-1.0.conf >> %{name}-base-devel.files fi @@ -494,7 +500,7 @@ $GHC --info %license LICENSE %dir %{ghcliblib} %dir %{ghclibdir} -%dir %{ghcliblib}/%{ghcplatform} +%dir %{ghcliblib}/%{ghcplatform} %files compiler %license LICENSE @@ -573,7 +579,6 @@ $GHC --info %{_mandir}/man1/ghc.1%{?ext_man} %endif - %files devel %if %{with haddock} || (%{with hadrian} && %{with manual}) diff --git a/libatomic.patch b/libatomic.patch new file mode 100644 index 0000000..255fc0d --- /dev/null +++ b/libatomic.patch @@ -0,0 +1,12 @@ +Index: ghc-9.6.1/rts/rts.cabal.in +=================================================================== +--- ghc-9.6.1.orig/rts/rts.cabal.in ++++ ghc-9.6.1/rts/rts.cabal.in +@@ -152,6 +152,7 @@ library + extra-libraries: tsan + + if os(linux) ++ extra-libraries: atomic + -- the RTS depends upon libc. while this dependency is generally + -- implicitly added by `cc`, we must explicitly add it here to ensure + -- that it is ordered correctly with libpthread, since ghc-prim.cabal