From 08cc33e6afc629e28f57cdcf3af9bf7445c4644c99945022970a8ee7b2f3b7e8 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Tue, 17 Oct 2017 18:44:22 +0000 Subject: [PATCH] Accepting request 534523 from home:ptrommler:branches:devel:languages:haskell - add D4089.patch * fix GHCi issue on ppc64 * see Haskell Trac #11262 OBS-URL: https://build.opensuse.org/request/show/534523 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=252 --- D4089.patch | 23 +++++++++++++++++++++++ ghc.changes | 7 +++++++ ghc.spec | 3 +++ 3 files changed, 33 insertions(+) create mode 100644 D4089.patch diff --git a/D4089.patch b/D4089.patch new file mode 100644 index 0000000..44e5c1d --- /dev/null +++ b/D4089.patch @@ -0,0 +1,23 @@ +Index: ghc-8.0.2/compiler/ghci/RtClosureInspect.hs +=================================================================== +--- ghc-8.0.2.orig/compiler/ghci/RtClosureInspect.hs ++++ ghc-8.0.2/compiler/ghci/RtClosureInspect.hs +@@ -55,6 +55,7 @@ import TysWiredIn + import DynFlags + import Outputable as Ppr + import GHC.Arr ( Array(..) ) ++import GHC.Char + import GHC.Exts + import GHC.IO ( IO(..) ) + +@@ -495,7 +496,9 @@ cPprTermBase y = + repPrim :: TyCon -> [Word] -> SDoc + repPrim t = rep where + rep x +- | t == charPrimTyCon = text $ show (build x :: Char) ++ -- Char# uses native machine words, whereas Char's Storable instance uses ++ -- Int32, so we have to read it as an Int. ++ | t == charPrimTyCon = text $ show (chr (build x :: Int)) + | t == intPrimTyCon = text $ show (build x :: Int) + | t == wordPrimTyCon = text $ show (build x :: Word) + | t == floatPrimTyCon = text $ show (build x :: Float) diff --git a/ghc.changes b/ghc.changes index 7878f59..bbcf216 100644 --- a/ghc.changes +++ b/ghc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Oct 17 09:54:11 UTC 2017 - ptrommler@icloud.com + +- add D4089.patch + * fix GHCi issue on ppc64 + * see Haskell Trac #11262 + ------------------------------------------------------------------- Fri Sep 22 07:57:10 UTC 2017 - ptrommler@icloud.com diff --git a/ghc.spec b/ghc.spec index b8c41c8..08ede9b 100644 --- a/ghc.spec +++ b/ghc.spec @@ -80,6 +80,8 @@ Patch31: ghc-pie.patch Patch32: 0001-PPC-Implement-Atomic-operations.patch # PATCH-FIX-UPSTREAM 0001-Use-__atomic-intrinsics-for-atomicread-write.patch ptrommler@icloud.com -- Fix atomic read and atomic write on platforms that have no native code generator nor LLVM backend. This is s390x for openSUSE. See Haskell Trac #14244. Patch33: 0001-Use-__atomic-intrinsics-for-atomicread-write.patch +# PATCH-FIX-UPSTREAM D4089.patch ptrommler@icloud.com -- Fix GHCi on ppc64. See Haskell Trac #11262 +Patch34: D4089.patch # PATCH-FIX-OPENSUSE ghc-8.0.2-Cabal-dynlibdir.patch -- Fix shared library directory location. Patch100: ghc-8.0.2-Cabal-dynlibdir.patch # PATCH-FIX-UPSTREAM buildpath-abi-stability.patch -- debian patch for more stable abi-1 @@ -177,6 +179,7 @@ except the ghc library, which is installed by the toplevel ghc metapackage. %patch31 -p1 %patch32 -p1 %patch33 -p1 +%patch34 -p1 %patch100 -p1 %patch110 -p1 %patch111 -p1