[Git][haskell-team/DHG_packages][master] haskell-memory: Add upstream patch to fix build on 32bit architectures

Gianfranco Costamagna (@locutusofborg) gitlab at salsa.debian.org
Tue Sep 5 14:07:56 BST 2023



Gianfranco Costamagna pushed to branch master at Debian Haskell Group / DHG_packages


Commits:
f8ef90e9 by Gianfranco Costamagna at 2023-09-05T15:06:53+02:00
haskell-memory: Add upstream patch to fix build on 32bit architectures

- - - - -


3 changed files:

- p/haskell-memory/debian/changelog
- + p/haskell-memory/debian/patches/99.patch
- + p/haskell-memory/debian/patches/series


Changes:

=====================================
p/haskell-memory/debian/changelog
=====================================
@@ -1,3 +1,10 @@
+haskell-memory (0.18.0-2) unstable; urgency=medium
+
+  * debian/patches/99.patch:
+    - add upstream patch to fix build on 32bit architectures.
+
+ -- Gianfranco Costamagna <locutusofborg at debian.org>  Tue, 05 Sep 2023 15:05:08 +0200
+
 haskell-memory (0.18.0-1) unstable; urgency=medium
 
   [ Ilias Tsitsimpis ]


=====================================
p/haskell-memory/debian/patches/99.patch
=====================================
@@ -0,0 +1,36 @@
+From 2738929ce15b4c8704bbbac24a08539b5d4bf30e Mon Sep 17 00:00:00 2001
+From: sternenseemann <sternenseemann at 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__ < 904
+ 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 =


=====================================
p/haskell-memory/debian/patches/series
=====================================
@@ -0,0 +1 @@
+99.patch



View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/commit/f8ef90e992cbf2406750989c29dfed5db3a84efa

-- 
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/commit/f8ef90e992cbf2406750989c29dfed5db3a84efa
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20230905/d46e3991/attachment-0001.htm>


More information about the Pkg-haskell-commits mailing list