upstream patch to fix 32bit build with ghc-9.2
This commit is contained in:
parent
814194f68c
commit
6abd992513
|
@ -0,0 +1,30 @@
|
||||||
|
From 7b94c5ac957cfa9d51815747d48dbec2d57a9aaa Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jakub Janczak <jakub.janczak@scrive.com>
|
||||||
|
Date: Wed, 8 Feb 2023 21:33:24 +0100
|
||||||
|
Subject: [PATCH] Fix for machines with 64bit word and base >= 4.17
|
||||||
|
|
||||||
|
---
|
||||||
|
cborg/src/Codec/CBOR/Magic.hs | 6 +++++-
|
||||||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/cborg/src/Codec/CBOR/Magic.hs b/cborg/src/Codec/CBOR/Magic.hs
|
||||||
|
index 1b497a2..cdeb455 100644
|
||||||
|
--- a/cborg/src/Codec/CBOR/Magic.hs
|
||||||
|
+++ b/cborg/src/Codec/CBOR/Magic.hs
|
||||||
|
@@ -257,11 +257,15 @@ grabWord64 (Ptr ip#) =
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if WORD_SIZE_IN_BITS == 64
|
||||||
|
+#if MIN_VERSION_base(4,17,0)
|
||||||
|
+-- case taken from Codec.CBOR.Decoding
|
||||||
|
+ w64 w# = W64# (wordToWord64# (toWord w#))
|
||||||
|
+#else
|
||||||
|
w64 w# = W64# (toWord w#)
|
||||||
|
+#endif
|
||||||
|
#else
|
||||||
|
w64 w# = W64# (wordToWord64# (toWord w#))
|
||||||
|
#endif
|
||||||
|
-
|
||||||
|
#endif
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
|
@ -20,6 +20,7 @@ Url: https://hackage.haskell.org/package/%{pkg_name}
|
||||||
Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
|
Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
|
||||||
Source1: https://hackage.haskell.org/package/%{pkgver}/%{pkg_name}.cabal#/%{pkgver}.cabal
|
Source1: https://hackage.haskell.org/package/%{pkgver}/%{pkg_name}.cabal#/%{pkgver}.cabal
|
||||||
# End cabal-rpm sources
|
# End cabal-rpm sources
|
||||||
|
Patch0: https://patch-diff.githubusercontent.com/raw/well-typed/cborg/pull/307.patch
|
||||||
|
|
||||||
# Begin cabal-rpm deps:
|
# Begin cabal-rpm deps:
|
||||||
BuildRequires: dos2unix
|
BuildRequires: dos2unix
|
||||||
|
@ -117,6 +118,7 @@ This package provides the Haskell %{pkg_name} profiling library.
|
||||||
%setup -q -n %{pkgver}
|
%setup -q -n %{pkgver}
|
||||||
dos2unix -k -n %{SOURCE1} %{pkg_name}.cabal
|
dos2unix -k -n %{SOURCE1} %{pkg_name}.cabal
|
||||||
# End cabal-rpm setup
|
# End cabal-rpm setup
|
||||||
|
%patch0 -p2 -b .orig
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
Loading…
Reference in New Issue