From 4a0dca558ad6bda46de079e4ba54e0b0aabcd6a6054144209e1140ff8b6be0fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Sun, 19 Jan 2020 12:18:21 +0000 Subject: [PATCH 1/2] Accepting request 765562 from devel:languages:haskell:ghc-8.8.x - drop 0001-Fix-check-whether-GCC-supports-__atomic_-builtins.patch * fixed upstream - drop D5212.patch * fixed upstream - drop fix-build-using-unregisterized-v8.4.patch * bootstrap compiler is 8.6.5 now - refresh fix-unregisterised-v8.4-8.6.patch - clean up spec file - update to 8.8.2 * A bug (Issue #17088) in the compacting garbage collector resulting in segmentation faults under specific circumstances. Note that this may affect user programs even if they did not explicitly request the compacting GC (using the -c RTS flag) since GHC may fallback to compacting collection during times of high memory pressure. * A code generator bug (Issue #17334) resulting in GHC panics has been fixed. * A typechecker bug (Issue #17112) resulting in GHC panicking on some programs has been fixed. * A bug (Issue #16707) in the implementation of software transactional memory potentially resulting in hanging transactions has been fixed. * A bug in the implementation of compact normal forms resulting in segmentation faults in some uses (Issue #17044) has been fixed. OBS-URL: https://build.opensuse.org/request/show/765562 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=319 --- ...ther-GCC-supports-__atomic_-builtins.patch | 60 ------------------ D5212.patch | 23 ------- fix-build-using-unregisterized-v8.4.patch | 58 ----------------- fix-unregisterised-v8.4-8.6.patch | 8 +-- ghc-8.8.1-src.tar.xz | 3 - ghc-8.8.1-src.tar.xz.sig | Bin 586 -> 0 bytes ghc-8.8.2-src.tar.xz | 3 + ghc-8.8.2-src.tar.xz.sig | Bin 0 -> 586 bytes ghc.changes | 28 ++++++++ ghc.spec | 30 ++------- 10 files changed, 42 insertions(+), 171 deletions(-) delete mode 100644 0001-Fix-check-whether-GCC-supports-__atomic_-builtins.patch delete mode 100644 D5212.patch delete mode 100644 fix-build-using-unregisterized-v8.4.patch delete mode 100644 ghc-8.8.1-src.tar.xz delete mode 100644 ghc-8.8.1-src.tar.xz.sig create mode 100644 ghc-8.8.2-src.tar.xz create mode 100644 ghc-8.8.2-src.tar.xz.sig diff --git a/0001-Fix-check-whether-GCC-supports-__atomic_-builtins.patch b/0001-Fix-check-whether-GCC-supports-__atomic_-builtins.patch deleted file mode 100644 index 2d1043b..0000000 --- a/0001-Fix-check-whether-GCC-supports-__atomic_-builtins.patch +++ /dev/null @@ -1,60 +0,0 @@ -From ce3897ffd6e7c8b8f36b8e920168bac8c7f836ae Mon Sep 17 00:00:00 2001 -From: Ilias Tsitsimpis -Date: Tue, 18 Sep 2018 17:45:17 +0200 -Subject: [PATCH] Fix check whether GCC supports __atomic_ builtins - -Summary: -C11 atomics are never used because: - -* The program used for checking whether GCC supports -__atomic_ builtins fails with the following error: - -``` - error: size mismatch in argument 2 of `__atomic_load` - int test(int *x) { int y; __atomic_load(&x, &y, __ATOMIC_SEQ_CST); return x; } -``` - -* There is a typo when checking if CONF_GCC_SUPPORTS__ATOMICS equals YES, -resulting in PRIM_CFLAGS and PRIM_EXTRA_LIBRARIES never being set. - -Reviewers: bgamari - -Reviewed By: bgamari - -Subscribers: rwbarton, erikd, carter - -Differential Revision: https://phabricator.haskell.org/D5154 ---- - libraries/ghc-prim/aclocal.m4 | 2 +- - libraries/ghc-prim/configure.ac | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libraries/ghc-prim/aclocal.m4 b/libraries/ghc-prim/aclocal.m4 -index e5695385f2..81fc44c500 100644 ---- a/libraries/ghc-prim/aclocal.m4 -+++ b/libraries/ghc-prim/aclocal.m4 -@@ -5,7 +5,7 @@ AC_DEFUN([FP_GCC_SUPPORTS__ATOMICS], - [ - AC_REQUIRE([AC_PROG_CC]) - AC_MSG_CHECKING([whether GCC supports __atomic_ builtins]) -- echo 'int test(int *x) { int y; __atomic_load(&x, &y, __ATOMIC_SEQ_CST); return x; }' > conftest.c -+ echo 'int test(int *x) { int y; __atomic_load(x, &y, __ATOMIC_SEQ_CST); return y; }' > conftest.c - if $CC -c conftest.c > /dev/null 2>&1; then - CONF_GCC_SUPPORTS__ATOMICS=YES - AC_MSG_RESULT([yes]) -diff --git a/libraries/ghc-prim/configure.ac b/libraries/ghc-prim/configure.ac -index bacc89ccc8..8249be31a9 100644 ---- a/libraries/ghc-prim/configure.ac -+++ b/libraries/ghc-prim/configure.ac -@@ -8,7 +8,7 @@ dnl unregisterised, Sparc, and PPC backends. - FP_GCC_SUPPORTS__ATOMICS - AC_DEFINE([HAVE_C11_ATOMICS], [$CONF_GCC_SUPPORTS__ATOMICS], [Does GCC support __atomic primitives?]) - --if test "x$CONF_GCC_SUPPORTS__ATOMICS" = YES -+if test "$CONF_GCC_SUPPORTS__ATOMICS" = "YES" - then PRIM_CFLAGS=-DHAVE_C11_ATOMICS - PRIM_EXTRA_LIBRARIES=atomic - fi --- -2.13.7 - diff --git a/D5212.patch b/D5212.patch deleted file mode 100644 index 6272b02..0000000 --- a/D5212.patch +++ /dev/null @@ -1,23 +0,0 @@ -Index: ghc-8.6.1/libraries/ghc-heap/GHC/Exts/Heap/InfoTable.hsc -=================================================================== ---- ghc-8.6.1.orig/libraries/ghc-heap/GHC/Exts/Heap/InfoTable.hsc -+++ ghc-8.6.1/libraries/ghc-heap/GHC/Exts/Heap/InfoTable.hsc -@@ -58,7 +58,7 @@ pokeItbl a0 itbl = do - #endif - (#poke StgInfoTable, layout.payload.ptrs) a0 (ptrs itbl) - (#poke StgInfoTable, layout.payload.nptrs) a0 (nptrs itbl) -- (#poke StgInfoTable, type) a0 (fromEnum (tipe itbl)) -+ (#poke StgInfoTable, type) a0 (toHalfWord (fromEnum (tipe itbl))) - #if __GLASGOW_HASKELL__ > 804 - (#poke StgInfoTable, srt) a0 (srtlen itbl) - #else -@@ -71,6 +71,9 @@ pokeItbl a0 itbl = do - Just (Left xs) -> pokeArray code_offset xs - Just (Right xs) -> pokeArray code_offset xs - #endif -+ where -+ toHalfWord :: Int -> HalfWord -+ toHalfWord i = fromIntegral i - - -- | Size in bytes of a standard InfoTable - itblSize :: Int diff --git a/fix-build-using-unregisterized-v8.4.patch b/fix-build-using-unregisterized-v8.4.patch deleted file mode 100644 index 1cc9604..0000000 --- a/fix-build-using-unregisterized-v8.4.patch +++ /dev/null @@ -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 -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); diff --git a/fix-unregisterised-v8.4-8.6.patch b/fix-unregisterised-v8.4-8.6.patch index b8026cd..c9978f5 100644 --- a/fix-unregisterised-v8.4-8.6.patch +++ b/fix-unregisterised-v8.4-8.6.patch @@ -1,8 +1,8 @@ -Index: ghc-8.8.1/includes/stg/MiscClosures.h +Index: ghc-8.8.2/includes/stg/MiscClosures.h =================================================================== ---- ghc-8.8.1.orig/includes/stg/MiscClosures.h -+++ ghc-8.8.1/includes/stg/MiscClosures.h -@@ -400,8 +400,12 @@ RTS_FUN_DECL(stg_copySmallMutableArrayzh +--- ghc-8.8.2.orig/includes/stg/MiscClosures.h ++++ ghc-8.8.2/includes/stg/MiscClosures.h +@@ -390,8 +390,12 @@ RTS_FUN_DECL(stg_copySmallMutableArrayzh RTS_FUN_DECL(stg_casSmallArrayzh); RTS_FUN_DECL(stg_newMutVarzh); diff --git a/ghc-8.8.1-src.tar.xz b/ghc-8.8.1-src.tar.xz deleted file mode 100644 index 7c51495..0000000 --- a/ghc-8.8.1-src.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:908a83d9b814da74585de9d39687189e6260ec3848131f9d9236cab8a123721a -size 28634672 diff --git a/ghc-8.8.1-src.tar.xz.sig b/ghc-8.8.1-src.tar.xz.sig deleted file mode 100644 index 72eec04ff2a10d185cb949428320cbbc04961f48d5cd8f4e0d6ff020aac038dd..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 586 zcmV-Q0=4~#0!IV@0SEvw79j-x>wM@Q7NcuEE$weD;7v}K+hnZ;0$pP3;}aZWWo|%s zWo&FMba`-PWG-WGZ2$@h5G~+MPM6zctxEF`{SyQB)A9_%0d|OsW>%Ehh2OfLDdDp> zUMIGT!u7EA&_^*hLUR**(0uQ6^#`J;`@{t=(7m(x}P+HM*R*-mc-< zsqQUdj1m|jZnpU1!W#n3oP+@v!6hPF2OgWth8CwbOMWsq96~wpA)7Hh;*h!2&m2F& ztoi{fllsN2zrgkXpGfN|3=`Vbb?FsjEDMYo&R-|cmeARTteSo56jft!N)rjoE89S7 z3+Po^zEGP$h*JC@e8Zr$+~z|R&NyT;q2UrI%GdK>qjFTiY`q#_XSJg6{G65VljO!5Cg%=da-ijxyl3}Cw(z!>vwZy04ZP{?a;a5OTtlZ2y*LvZtN;K2 diff --git a/ghc-8.8.2-src.tar.xz b/ghc-8.8.2-src.tar.xz new file mode 100644 index 0000000..233dc1c --- /dev/null +++ b/ghc-8.8.2-src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01cea54d90686b97bcc9960b108beaffccd4336dee930dcf9beaf52b1f370a0b +size 19365816 diff --git a/ghc-8.8.2-src.tar.xz.sig b/ghc-8.8.2-src.tar.xz.sig new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..31d4cdd6f001c96dfd620b2df123c75306126485cac57ad60e02fccc34268917 GIT binary patch literal 586 zcmV-Q0=4~#0!IV@0SEvw79j-x>wM@Q7NcuEE$weD;7v}K+hnZ;0$w0`G7}tPWo|%s zWo&FMba`-PWG-WGZ2$@h5G~+MPM6zct!LN}0D&VeZ0$k3Qw{y0$VV;{5R8G3NqvDY zsP-IPlP~@0pd7K(+R(+w*0!6Ek!|2S6@}s8qES~qvOqldV?rrQ)*XK#?Y7!8?Rh0j z+1qV7Zs)y6E2Rm6{NRNro~vZvVJK3nhUSGSxSf$Q&*O7Gmp5a@nLDt`^o!WyRFZf$ zIOl+5k`49g96WqIk|2Q6|Eu!L94I~M&U3t(&)x^?b><9{8Xe%iv+$}JF)jR9*M035 zt=$u@)mPLytR{!R*hJMs&y0uR&{<<(4}3`)I#d=7scbGI@O9B)Wo{dBy-Mka08Ffd zAr3c$xkK#qyb+AepQXAtQ)7pOkH>#w3ps(}o7;^xfvj-+9T)NS*JR_I*Kt5wy zop3sp{i7BkHvi4`1!Ty)1f%r&D1K8@VhWi_-|eezd|adj8qi6sRH+~5_wzh#oS@76I|He7(bX`l|%)xTFp7@I~J^x-cXmKruLb>gL Yd}#T5 + +- drop 0001-Fix-check-whether-GCC-supports-__atomic_-builtins.patch + * fixed upstream +- drop D5212.patch + * fixed upstream +- drop fix-build-using-unregisterized-v8.4.patch + * bootstrap compiler is 8.6.5 now +- refresh fix-unregisterised-v8.4-8.6.patch +- clean up spec file + +------------------------------------------------------------------- +Thu Jan 16 17:56:27 UTC 2020 - Ondřej Súkup + +- update to 8.8.2 + * A bug (Issue #17088) in the compacting garbage collector resulting in segmentation + faults under specific circumstances. Note that this may affect user programs even + if they did not explicitly request the compacting GC (using the -c RTS flag) + since GHC may fallback to compacting collection during times of high memory pressure. + * A code generator bug (Issue #17334) resulting in GHC panics has been fixed. + * A typechecker bug (Issue #17112) resulting in GHC panicking on some programs + has been fixed. + * A bug (Issue #16707) in the implementation of software transactional memory + potentially resulting in hanging transactions has been fixed. + * A bug in the implementation of compact normal forms resulting in segmentation + faults in some uses (Issue #17044) has been fixed. + ------------------------------------------------------------------- Tue Dec 31 18:17:24 UTC 2019 - Peter Trommler diff --git a/ghc.spec b/ghc.spec index 7e39240..b0c9aed 100644 --- a/ghc.spec +++ b/ghc.spec @@ -29,12 +29,11 @@ %global unregisterised_archs s390 s390x riscv64 Name: ghc -Version: 8.8.1 +Version: 8.8.2 Release: 0 URL: https://www.haskell.org/ghc/ -Source: https://downloads.haskell.org/~ghc/8.8.1/ghc-%{version}-src.tar.xz -Source1: https://downloads.haskell.org/~ghc/8.8.1/ghc-%{version}-src.tar.xz.sig -Source2: ghc-rpmlintrc +Source: https://downloads.haskell.org/~ghc/8.8.2/ghc-%{version}-src.tar.xz +Source1: https://downloads.haskell.org/~ghc/8.8.2/ghc-%{version}-src.tar.xz.sig Summary: The Glorious Glasgow Haskell Compiler License: BSD-3-Clause Group: Development/Languages/Other @@ -81,9 +80,6 @@ BuildRequires: python3-Sphinx BuildRequires: libnuma-devel %endif -# for patch 1 -# BuildRequires: python3 - # bogus requires %ifarch x86_64 BuildRequires: ghc-bootstrap-helpers @@ -96,14 +92,8 @@ PreReq: update-alternatives Requires: ghc-compiler = %{version}-%{release} Requires: ghc-ghc-devel = %{version}-%{release} Requires: ghc-libraries = %{version}-%{release} -# PATCH-FIX-UPSTREAM 0001-Fix-check-whether-GCC-supports-__atomic_-builtins.patch ptrommler@icloud.com -- Fix __atomic_builtin detection. Patch taken from upstream commit ce3897ff. -Patch1: 0001-Fix-check-whether-GCC-supports-__atomic_-builtins.patch -# PATCH-FIX-UPSTREAM D5212.patch ptrommler@icloud.com -- Fix GHCi on big endiansystems. Submitted for upstream review. -Patch2: D5212.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 fix-build-using-unregisterized-v8.4.patch -Patch5: fix-build-using-unregisterized-v8.4.patch # PATCH-FIX-UPSTREAM fix-unregisterised-v8.4-8.6.patch Patch6: fix-unregisterised-v8.4-8.6.patch # PATCH-FIX-UPSTREAM ghc-pie.patch - set linux as default PIE platform @@ -172,14 +162,14 @@ To install all of GHC install package ghc. %endif %if %{defined ghclibdir} -%ghc_lib_subpackage -d Cabal-3.0.0.0 +%ghc_lib_subpackage -d Cabal-3.0.1.0 %ghc_lib_subpackage -d array-0.5.4.0 %ghc_lib_subpackage -d -c gmp-devel,libffi-devel,libdw-devel,libelf-devel%{libnuma_dep} base-4.13.0.0 %ghc_lib_subpackage -d binary-0.8.7.0 -%ghc_lib_subpackage -d bytestring-0.10.9.0 +%ghc_lib_subpackage -d bytestring-0.10.10.0 %ghc_lib_subpackage -d containers-0.6.2.1 %ghc_lib_subpackage -d deepseq-1.4.4.0 -%ghc_lib_subpackage -d directory-1.3.3.2 +%ghc_lib_subpackage -d directory-1.3.4.0 %ghc_lib_subpackage -d filepath-1.4.2.1 %ghc_lib_subpackage -d -x ghc-%{ghc_version_override} %ghc_lib_subpackage -d ghc-boot-%{ghc_version_override} @@ -193,7 +183,7 @@ To install all of GHC install package ghc. %ghc_lib_subpackage -d mtl-2.2.2 %ghc_lib_subpackage -d parsec-3.1.14.0 %ghc_lib_subpackage -d pretty-1.1.3.6 -%ghc_lib_subpackage -d process-1.6.5.1 +%ghc_lib_subpackage -d process-1.6.7.0 %ghc_lib_subpackage -d stm-2.5.0.0 %ghc_lib_subpackage -d template-haskell-2.15.0.0 %ghc_lib_subpackage -d -c ncurses-devel terminfo-0.4.1.4 @@ -222,21 +212,15 @@ except the ghc library, which is installed by the toplevel ghc metapackage. %prep %setup -q -#%%patch1 -p1 -#%%patch2 -p1 %ifarch ppc64 s390 s390x %patch3 -p1 %endif -%patch5 -p1 %patch6 -p1 %patch35 -p1 %patch100 -p1 %patch110 -p1 %build -# patch 1 modifies build system, we need to recreate configure -# ./boot - cat > mk/build.mk < Date: Sun, 19 Jan 2020 13:55:25 +0000 Subject: [PATCH 2/2] Accepting request 765569 from devel:languages:haskell:ghc-8.8.x fix OBS-URL: https://build.opensuse.org/request/show/765569 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=320 --- ghc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ghc.spec b/ghc.spec index b0c9aed..1b151a7 100644 --- a/ghc.spec +++ b/ghc.spec @@ -34,6 +34,7 @@ Release: 0 URL: https://www.haskell.org/ghc/ Source: https://downloads.haskell.org/~ghc/8.8.2/ghc-%{version}-src.tar.xz Source1: https://downloads.haskell.org/~ghc/8.8.2/ghc-%{version}-src.tar.xz.sig +Source2: ghc-rpmlintrc Summary: The Glorious Glasgow Haskell Compiler License: BSD-3-Clause Group: Development/Languages/Other