diff --git a/35a897782b6b0a252da7fdcf4921198ad4e1d96c.patch b/35a897782b6b0a252da7fdcf4921198ad4e1d96c.patch new file mode 100644 index 0000000..3a297c7 --- /dev/null +++ b/35a897782b6b0a252da7fdcf4921198ad4e1d96c.patch @@ -0,0 +1,69 @@ +From 35a897782b6b0a252da7fdcf4921198ad4e1d96c Mon Sep 17 00:00:00 2001 +From: James Clarke +Date: Thu, 22 Nov 2018 11:55:17 -0500 +Subject: [PATCH] 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 +--- + compiler/cmm/PprC.hs | 24 +++++++++++++++++++++++- + 1 file changed, 23 insertions(+), 1 deletion(-) + +diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs +index 17fef7fc97..6ebfd20291 100644 +--- 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 +@@ -1270,6 +1273,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 +-- +2.19.2 + diff --git a/ghc-sphinx-1.8-4eebc8016.patch b/ghc-sphinx-1.8-4eebc8016.patch new file mode 100644 index 0000000..155be14 --- /dev/null +++ b/ghc-sphinx-1.8-4eebc8016.patch @@ -0,0 +1,46 @@ +commit 4eebc8016f68719e1ccdf460754a97d1f4d6ef05 +Author: Ben Gamari +Date: Thu Sep 20 08:27:37 2018 -0400 + + users-guide: Fix build with sphinx 1.8 + + It seems that both add_object_type and add_directive_to_domain both register a + directive. Previously sphinx didn't seem to mind this but as of Sphinx 1.8 it + crashes with an exception. + +diff --git a/docs/users_guide/flags.py b/docs/users_guide/flags.py +index a70f7fef1e..284b5e06cc 100644 +--- a/docs/users_guide/flags.py ++++ b/docs/users_guide/flags.py +@@ -48,6 +48,8 @@ from docutils import nodes + from docutils.parsers.rst import Directive, directives + from sphinx import addnodes + from sphinx.domains.std import GenericObject ++from sphinx.domains import ObjType ++from sphinx.roles import XRefRole + from sphinx.errors import SphinxError + from utils import build_table_from_list + +@@ -599,14 +601,20 @@ def purge_flags(app, env, docname): + ### Initialization + + def setup(app): ++ # Yuck: We can't use app.add_object_type since we need to provide the ++ # Directive instance ourselves. ++ std_object_types = app.registry.domain_object_types.setdefault('std', {}) + + # Add ghc-flag directive, and override the class with our own +- app.add_object_type('ghc-flag', 'ghc-flag') + app.add_directive_to_domain('std', 'ghc-flag', Flag) ++ app.add_role_to_domain('std', 'ghc-flag', XRefRole()) ++ std_object_types['ghc-flag'] = ObjType('ghc-flag', 'ghc-flag') + + # Add extension directive, and override the class with our own +- app.add_object_type('extension', 'extension') + app.add_directive_to_domain('std', 'extension', LanguageExtension) ++ app.add_role_to_domain('std', 'extension', XRefRole()) ++ std_object_types['extension'] = ObjType('ghc-flag', 'ghc-flag') ++ + # NB: language-extension would be misinterpreted by sphinx, and produce + # lang="extensions" XML attributes + diff --git a/ghc.spec b/ghc.spec index ebd134b..545c600 100644 --- a/ghc.spec +++ b/ghc.spec @@ -39,7 +39,7 @@ Version: 8.6.3 # - release can only be reset if *all* library versions get bumped simultaneously # (sometimes after a major release) # - minor release numbers for a branch should be incremented monotonically -Release: 74%{?dist} +Release: 75%{?dist} Summary: Glasgow Haskell Compiler License: BSD and HaskellReport @@ -63,12 +63,18 @@ ExcludeArch: ppc64 # absolute haddock path (was for html/libraries -> libraries) Patch1: ghc-gen_contents_index-haddock-path.patch Patch2: ghc-Cabal-install-PATH-warning.patch +# https://phabricator.haskell.org/rGHC4eebc8016f68719e1ccdf460754a97d1f4d6ef05 +Patch6: ghc-sphinx-1.8-4eebc8016.patch +# Arch dependent packages Patch12: ghc-armv7-VFPv3D16--NEON.patch # for s390x # https://ghc.haskell.org/trac/ghc/ticket/15689 Patch15: ghc-warnings.mk-CC-Wall.patch +# https://ghc.haskell.org/trac/ghc/ticket/15853 +# https://phabricator.haskell.org/D5306 (in 8.8) +Patch17: https://gitlab.haskell.org/ghc/ghc/commit/35a897782b6b0a252da7fdcf4921198ad4e1d96c.patch # Debian patches: Patch24: buildpath-abi-stability.patch @@ -166,9 +172,9 @@ Obsoletes: ghc-doc-index < %{version}-%{release} %endif %ifarch %{ghc_llvm_archs} %if 0%{?fedora} >= 29 -BuildRequires: llvm%{llvm_major} +Requires: llvm%{llvm_major} %else -BuildRequires: llvm >= %{llvm_major} +Requires: llvm >= %{llvm_major} %endif %endif @@ -284,6 +290,7 @@ except the ghc library, which is installed by the toplevel ghc metapackage. %patch1 -p1 -b .orig %patch2 -p1 -b .orig +%patch6 -p1 -b .orig %if 0%{?fedora} || 0%{?rhel} > 6 rm -r libffi-tarballs @@ -295,6 +302,7 @@ rm -r libffi-tarballs %ifarch s390x %patch15 -p1 -b .orig +%patch17 -p1 -b .orig %endif %patch24 -p1 -b .orig @@ -453,8 +461,6 @@ for i in hsc2hs runhaskell; do touch %{buildroot}%{_bindir}/$i done -%ghc_strip_dynlinked - %if %{with docs} mkdir -p %{buildroot}%{_sysconfdir}/cron.hourly install -p --mode=0755 %SOURCE3 %{buildroot}%{_sysconfdir}/cron.hourly/ghc-doc-index @@ -655,6 +661,12 @@ fi %changelog +* Tue Mar 5 2019 Jens Petersen - 8.6.3-75 +- unregisterized: fix 32bit adjacent floats issue + (https://ghc.haskell.org/trac/ghc/ticket/15853) +- sphinx-1.8 no longer supports pngmath +- Recommends zlib-devel + * Sat Dec 8 2018 Jens Petersen - 8.6.3-74 - update to 8.6.3 release - https://downloads.haskell.org/~ghc/8.6.3/docs/html/users_guide/8.6.3-notes.html