Accepting request 395520 from devel:languages:haskell
1 OBS-URL: https://build.opensuse.org/request/show/395520 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ghc?expand=0&rev=46
This commit is contained in:
commit
b8dc45c0a9
71
0001-Fix-misspelled-WORDS_BIGENDIAN-macro.patch
Normal file
71
0001-Fix-misspelled-WORDS_BIGENDIAN-macro.patch
Normal file
@ -0,0 +1,71 @@
|
||||
From 4f52849a99753fab63d634769dd35a31f4d5a1b2 Mon Sep 17 00:00:00 2001
|
||||
From: Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Date: Thu, 12 May 2016 20:36:34 +0200
|
||||
Subject: [PATCH] Fix misspelled WORDS_BIGENDIAN macro
|
||||
|
||||
This was causing word{16,32,64}{le,be} primitives to break
|
||||
on big endian archs (such as `powerpc`/`powerpc64`) with
|
||||
serious consequences such as
|
||||
https://github.com/TomMD/pureMD5/issues/5
|
||||
---
|
||||
Data/ByteString/Builder/Prim/Binary.hs | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: ghc-8.0.1/libraries/bytestring/Data/ByteString/Builder/Prim/Binary.hs
|
||||
===================================================================
|
||||
--- ghc-8.0.1.orig/libraries/bytestring/Data/ByteString/Builder/Prim/Binary.hs
|
||||
+++ ghc-8.0.1/libraries/bytestring/Data/ByteString/Builder/Prim/Binary.hs
|
||||
@@ -83,7 +83,7 @@ word8 = storableToF
|
||||
-- | Encoding 'Word16's in big endian format.
|
||||
{-# INLINE word16BE #-}
|
||||
word16BE :: FixedPrim Word16
|
||||
-#ifdef WORD_BIGENDIAN
|
||||
+#ifdef WORDS_BIGENDIAN
|
||||
word16BE = word16Host
|
||||
#else
|
||||
word16BE = fixedPrim 2 $ \w p -> do
|
||||
@@ -94,7 +94,7 @@ word16BE = fixedPrim 2 $ \w p -> do
|
||||
-- | Encoding 'Word16's in little endian format.
|
||||
{-# INLINE word16LE #-}
|
||||
word16LE :: FixedPrim Word16
|
||||
-#ifdef WORD_BIGENDIAN
|
||||
+#ifdef WORDS_BIGENDIAN
|
||||
word16LE = fixedPrim 2 $ \w p -> do
|
||||
poke p (fromIntegral (w) :: Word8)
|
||||
poke (p `plusPtr` 1) (fromIntegral (shiftr_w16 w 8) :: Word8)
|
||||
@@ -105,7 +105,7 @@ word16LE = word16Host
|
||||
-- | Encoding 'Word32's in big endian format.
|
||||
{-# INLINE word32BE #-}
|
||||
word32BE :: FixedPrim Word32
|
||||
-#ifdef WORD_BIGENDIAN
|
||||
+#ifdef WORDS_BIGENDIAN
|
||||
word32BE = word32Host
|
||||
#else
|
||||
word32BE = fixedPrim 4 $ \w p -> do
|
||||
@@ -118,7 +118,7 @@ word32BE = fixedPrim 4 $ \w p -> do
|
||||
-- | Encoding 'Word32's in little endian format.
|
||||
{-# INLINE word32LE #-}
|
||||
word32LE :: FixedPrim Word32
|
||||
-#ifdef WORD_BIGENDIAN
|
||||
+#ifdef WORDS_BIGENDIAN
|
||||
word32LE = fixedPrim 4 $ \w p -> do
|
||||
poke p (fromIntegral (w) :: Word8)
|
||||
poke (p `plusPtr` 1) (fromIntegral (shiftr_w32 w 8) :: Word8)
|
||||
@@ -134,7 +134,7 @@ word32LE = word32Host
|
||||
-- | Encoding 'Word64's in big endian format.
|
||||
{-# INLINE word64BE #-}
|
||||
word64BE :: FixedPrim Word64
|
||||
-#ifdef WORD_BIGENDIAN
|
||||
+#ifdef WORDS_BIGENDIAN
|
||||
word64BE = word64Host
|
||||
#else
|
||||
#if WORD_SIZE_IN_BITS < 64
|
||||
@@ -170,7 +170,7 @@ word64BE = fixedPrim 8 $ \w p -> do
|
||||
-- | Encoding 'Word64's in little endian format.
|
||||
{-# INLINE word64LE #-}
|
||||
word64LE :: FixedPrim Word64
|
||||
-#ifdef WORD_BIGENDIAN
|
||||
+#ifdef WORDS_BIGENDIAN
|
||||
#if WORD_SIZE_IN_BITS < 64
|
||||
word64LE =
|
||||
fixedPrim 8 $ \w p -> do
|
16
D2214.patch
Normal file
16
D2214.patch
Normal file
@ -0,0 +1,16 @@
|
||||
Index: ghc-7.10.3/compiler/nativeGen/PPC/Ppr.hs
|
||||
===================================================================
|
||||
--- ghc-7.10.3.orig/compiler/nativeGen/PPC/Ppr.hs
|
||||
+++ ghc-7.10.3/compiler/nativeGen/PPC/Ppr.hs
|
||||
@@ -488,9 +488,10 @@ pprInstr (STU sz reg addr) = hcat [
|
||||
char '\t',
|
||||
ptext (sLit "st"),
|
||||
pprSize sz,
|
||||
- ptext (sLit "u\t"),
|
||||
+ char 'u',
|
||||
case addr of AddrRegImm _ _ -> empty
|
||||
AddrRegReg _ _ -> char 'x',
|
||||
+ char '\t',
|
||||
pprReg reg,
|
||||
ptext (sLit ", "),
|
||||
pprAddr addr
|
11
ghc.changes
11
ghc.changes
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat May 14 09:13:07 UTC 2016 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- add D2214.patch
|
||||
* backport of upstream patch slated for ghc 8.0.2
|
||||
* fix issue in code PowerPC code generator (32 bit and 64 bit)
|
||||
- add 0001-Fix-misspelled-WORDS_BIGENDIAN-macro.patch
|
||||
* backport of upstream fix slated for ghc 8.0.2
|
||||
* fix bytestring library on big-endian archs
|
||||
* fix wrong results in ghc-pureMD5 and others on big-endian
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 19 12:50:38 UTC 2016 - mimi.vx@gmail.com
|
||||
|
||||
|
7
ghc.spec
7
ghc.spec
@ -82,6 +82,11 @@ Patch21: u_terminfo_0402.patch
|
||||
Patch22: u_Cabal_update.patch
|
||||
# PATCH-FIX-UPSTREAM u_haskeline_update.patch mimi.vx@gmail.com -- update haskeline to 0.7.2.3
|
||||
Patch23: u_haskeline_update.patch
|
||||
# PATCH-FIX-UPSTREAM 0001-Fix-misspelled-WORDS_BIGENDIAN-macro.patch peter.trommler@ohm-hochschule.de -- Fix ghc-pureMD5 and other Haskell packages on big-endian architectures.
|
||||
Patch24: 0001-Fix-misspelled-WORDS_BIGENDIAN-macro.patch
|
||||
# PATCH-FIX-UPSTREAM D2214.patch peter.trommler@ohm-hochschule.de -- Fix PowerPC code generator. See Haskell Trac #12054 and https://phabricator.haskell.org/D2214 for details.
|
||||
Patch25: D2214.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -178,6 +183,8 @@ except the ghc library, which is installed by the toplevel ghc metapackage.
|
||||
%patch21 -p2
|
||||
%patch22 -p2
|
||||
%patch23 -p2
|
||||
%patch24 -p1
|
||||
%patch25 -p1
|
||||
|
||||
%build
|
||||
# Patch 19 modifies build system
|
||||
|
Loading…
x
Reference in New Issue
Block a user