[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/09: gnu: ghc-memory: Fix building on i686-linux.
From: |
guix-commits |
Subject: |
06/09: gnu: ghc-memory: Fix building on i686-linux. |
Date: |
Wed, 15 Nov 2023 11:04:17 -0500 (EST) |
efraim pushed a commit to branch mesa-updates
in repository guix.
commit 879503464f26fed14570f42b8f040ea7484b72ea
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Wed Nov 15 13:22:32 2023 +0200
gnu: ghc-memory: Fix building on i686-linux.
* gnu/packages/haskell-xyz.scm (ghc-memory)[source]: Add patch.
* gnu/packages/patches/ghc-memory-fix-32bit.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
Change-Id: I8dc7a13a94ce37021ad402b4e2d0cd061220f670
---
gnu/local.mk | 1 +
gnu/packages/haskell-xyz.scm | 3 +-
gnu/packages/patches/ghc-memory-fix-32bit.patch | 40 +++++++++++++++++++++++++
3 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 4961b82efa..a46d569684 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1272,6 +1272,7 @@ dist_patch_DATA =
\
%D%/packages/patches/ghc-basement-fix-32bit.patch \
%D%/packages/patches/ghc-bytestring-handle-ghc9.patch \
%D%/packages/patches/ghc-language-haskell-extract-ghc-8.10.patch \
+ %D%/packages/patches/ghc-memory-fix-32bit.patch \
%D%/packages/patches/ghostscript-CVE-2023-36664.patch \
%D%/packages/patches/ghostscript-CVE-2023-36664-fixup.patch \
%D%/packages/patches/ghostscript-leptonica-hurd.patch \
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index b9039d3875..cf4172e590 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -7055,7 +7055,8 @@ speed, flexibility, and quality of parse errors.")
(uri (hackage-uri "memory" version))
(sha256
(base32
- "0yl3ivvn7i9wbx910b7bzj9c3g0jjjk91j05wj74qb5zx2yyf9rk"))))
+ "0yl3ivvn7i9wbx910b7bzj9c3g0jjjk91j05wj74qb5zx2yyf9rk"))
+ (patches (search-patches "ghc-memory-fix-32bit.patch"))))
(build-system haskell-build-system)
(properties '((upstream-name . "memory")))
(inputs (list ghc-basement))
diff --git a/gnu/packages/patches/ghc-memory-fix-32bit.patch
b/gnu/packages/patches/ghc-memory-fix-32bit.patch
new file mode 100644
index 0000000000..cb81b42521
--- /dev/null
+++ b/gnu/packages/patches/ghc-memory-fix-32bit.patch
@@ -0,0 +1,40 @@
+https://github.com/vincenthz/hs-memory/commit/2738929ce15b4c8704bbbac24a08539b5d4bf30e.patch
+https://github.com/vincenthz/hs-memory/pull/99
+Adjusted so the '904' becomes '902'
+
+From 2738929ce15b4c8704bbbac24a08539b5d4bf30e Mon Sep 17 00:00:00 2001
+From: sternenseemann <sternenseemann@systemli.org>
+Date: Mon, 14 Aug 2023 10:51:30 +0200
+Subject: [PATCH] Data.Memory.Internal.CompatPrim64: fix 32 bit with GHC >= 9.4
+
+Since 9.4, GHC.Prim exports Word64# operations like timesWord64# even on
+i686 whereas GHC.IntWord64 no longer exists. Therefore, we can just use
+the ready made solution.
+
+Closes #98, as it should be the better solution.
+---
+ Data/Memory/Internal/CompatPrim64.hs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/Data/Memory/Internal/CompatPrim64.hs
b/Data/Memory/Internal/CompatPrim64.hs
+index b9eef8a..a134c88 100644
+--- a/Data/Memory/Internal/CompatPrim64.hs
++++ b/Data/Memory/Internal/CompatPrim64.hs
+@@ -150,6 +150,7 @@ w64# :: Word# -> Word# -> Word# -> Word64#
+ w64# w _ _ = w
+
+ #elif WORD_SIZE_IN_BITS == 32
++#if __GLASGOW_HASKELL__ < 902
+ import GHC.IntWord64
+ import GHC.Prim (Word#)
+
+@@ -158,6 +159,9 @@ timesWord64# a b =
+ let !ai = word64ToInt64# a
+ !bi = word64ToInt64# b
+ in int64ToWord64# (timesInt64# ai bi)
++#else
++import GHC.Prim
++#endif
+
+ w64# :: Word# -> Word# -> Word# -> Word64#
+ w64# _ hw lw =
- branch mesa-updates updated (92f113694f -> d1b786fe62), guix-commits, 2023/11/15
- 01/09: gnu: curl: Skip failing test on arm machines., guix-commits, 2023/11/15
- 02/09: gnu: ghc-basement: Fix build on i686-linux., guix-commits, 2023/11/15
- 08/09: gnu: ghc-pandoc: Skip failing tests from i686-linux., guix-commits, 2023/11/15
- 06/09: gnu: ghc-memory: Fix building on i686-linux.,
guix-commits <=
- 04/09: gnu: ghc-base64: Skip tests on i686-linux., guix-commits, 2023/11/15
- 05/09: gnu: ghc-bloomfilter: Update to 2.0.1.2., guix-commits, 2023/11/15
- 07/09: gnu: ghc-persistent: Fix build on i686-linux., guix-commits, 2023/11/15
- 09/09: gnu: pandoc: Install bash completions, man page., guix-commits, 2023/11/15
- 03/09: gnu: ghc-base64: Update to Cabal revision 4., guix-commits, 2023/11/15