[Git][haskell-team/DHG_packages][master] 2 commits: ghc: Re-add risc-support patch
Ilias Tsitsimpis
gitlab at salsa.debian.org
Fri Jul 26 15:00:51 BST 2019
Ilias Tsitsimpis pushed to branch master at Debian Haskell Group / DHG_packages
Commits:
c291aef6 by Ilias Tsitsimpis at 2019-07-26T09:44:22Z
ghc: Re-add risc-support patch
- - - - -
4bbf400c by Ilias Tsitsimpis at 2019-07-26T10:09:58Z
ghc: Backport upstream commit 35a897782b6
- - - - -
4 changed files:
- p/ghc/debian/changelog
- + p/ghc/debian/patches/PprC-Add-support-for-adjacent-floats
- + p/ghc/debian/patches/risc-support.patch
- p/ghc/debian/patches/series
Changes:
=====================================
p/ghc/debian/changelog
=====================================
@@ -1,8 +1,13 @@
ghc (8.6.5+dfsg1-2) unstable; urgency=medium
* Use ghc-8.4 as the bootstrap compiler and drop the
- fix-build-using-unregisterized-v8.2 patch.
+ fix-build-using-unregisterized-v8.2 patch (Closes: #921579)
* Allow unregisterised ghc-8.4 to build newer GHC (Closes: #932941)
+ * Re-add upstream patches (which were lost during packaging of the latest
+ release) to support risc* platforms. Thanks to Aurelien Jarno for
+ reporting this (Closes: #933009)
+ * Backport upstream patch to fix a bug where an unregisterised GHC failed to
+ compile some libraries (e.g., gloss, juicypixels) on 64-bit architectures.
-- Ilias Tsitsimpis <iliastsi at debian.org> Thu, 25 Jul 2019 17:59:31 +0300
=====================================
p/ghc/debian/patches/PprC-Add-support-for-adjacent-floats
=====================================
@@ -0,0 +1,64 @@
+commit 35a897782b6b0a252da7fdcf4921198ad4e1d96c
+Author: James Clarke <jrtc27 at jrtc27.com>
+Date: Thu Nov 22 11:55:17 2018 -0500
+
+ UNREG: PprC: Add support for adjacent floats
+
+ When two 32-bit floats are adjacent for a 64-bit target, there is no
+ padding between them to force alignment, so we must combine their bit
+ representations into a single word.
+
+ Reviewers: bgamari, simonmar
+
+ Reviewed By: simonmar
+
+ Subscribers: rwbarton, carter
+
+ GHC Trac Issues: #15853
+
+ Differential Revision: https://phabricator.haskell.org/D5306
+
+Index: b/compiler/cmm/PprC.hs
+===================================================================
+--- a/compiler/cmm/PprC.hs
++++ b/compiler/cmm/PprC.hs
+@@ -512,9 +512,12 @@ pprLit1 other = pprLit other
+ pprStatics :: DynFlags -> [CmmStatic] -> [SDoc]
+ pprStatics _ [] = []
+ pprStatics dflags (CmmStaticLit (CmmFloat f W32) : rest)
+- -- floats are padded to a word by padLitToWord, see #1852
++ -- odd numbers of floats are padded to a word by mkVirtHeapOffsetsWithPadding
+ | wORD_SIZE dflags == 8, CmmStaticLit (CmmInt 0 W32) : rest' <- rest
+ = pprLit1 (floatToWord dflags f) : pprStatics dflags rest'
++ -- adjacent floats aren't padded but combined into a single word
++ | wORD_SIZE dflags == 8, CmmStaticLit (CmmFloat g W32) : rest' <- rest
++ = pprLit1 (floatPairToWord dflags f g) : pprStatics dflags rest'
+ | wORD_SIZE dflags == 4
+ = pprLit1 (floatToWord dflags f) : pprStatics dflags rest
+ | otherwise
+@@ -1261,6 +1264,25 @@ floatToWord dflags r
+ , wORDS_BIGENDIAN dflags = 32
+ | otherwise = 0
+
++floatPairToWord :: DynFlags -> Rational -> Rational -> CmmLit
++floatPairToWord dflags r1 r2
++ = runST (do
++ arr <- newArray_ ((0::Int),1)
++ writeArray arr 0 (fromRational r1)
++ writeArray arr 1 (fromRational r2)
++ arr' <- castFloatToWord32Array arr
++ w32_1 <- readArray arr' 0
++ w32_2 <- readArray arr' 1
++ return (pprWord32Pair w32_1 w32_2)
++ )
++ where pprWord32Pair w32_1 w32_2
++ | wORDS_BIGENDIAN dflags =
++ CmmInt ((shiftL i1 32) .|. i2) W64
++ | otherwise =
++ CmmInt ((shiftL i2 32) .|. i1) W64
++ where i1 = toInteger w32_1
++ i2 = toInteger w32_2
++
+ doubleToWords :: DynFlags -> Rational -> [CmmLit]
+ doubleToWords dflags r
+ = runST (do
=====================================
p/ghc/debian/patches/risc-support.patch
=====================================
@@ -0,0 +1,31 @@
+Description: cherry-pick of upstream commits
+ beba89a0f16681c85d39fc8a894bde4162ff492a.patch:
+ 5e63a25249f3cb07300258e115af9ff55079d2ea.patch:
+Last-Update: 2019-05-27
+
+Index: b/aclocal.m4
+===================================================================
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -217,7 +217,7 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_V
+ mipsel)
+ test -z "[$]2" || eval "[$]2=ArchMipsel"
+ ;;
+- hppa|hppa1_1|ia64|m68k|nios2|rs6000|s390|s390x|sh4|vax)
++ hppa|hppa1_1|ia64|m68k|nios2|riscv32|riscv64|rs6000|s390|s390x|sh4|vax)
+ test -z "[$]2" || eval "[$]2=ArchUnknown"
+ ;;
+ *)
+@@ -1906,6 +1906,12 @@ case "$1" in
+ powerpc*)
+ $2="powerpc"
+ ;;
++ riscv64*)
++ $2="riscv64"
++ ;;
++ riscv|riscv32*)
++ $2="riscv32"
++ ;;
+ rs6000)
+ $2="rs6000"
+ ;;
=====================================
p/ghc/debian/patches/series
=====================================
@@ -11,3 +11,5 @@ add_-latomic_to_ghc-prim
kfreebsd-aclocal.m4
local-mathjax
fix-build-using-unregisterized-v8.4
+risc-support.patch
+PprC-Add-support-for-adjacent-floats
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/compare/94c38ca818f221f15cdc71ef9e3182acfcdf24c9...4bbf400c33857e176a66813f2786854004b5678a
--
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/compare/94c38ca818f221f15cdc71ef9e3182acfcdf24c9...4bbf400c33857e176a66813f2786854004b5678a
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/20190726/53284e66/attachment-0001.html>
More information about the Pkg-haskell-commits
mailing list