Compare commits

...

62 Commits
master ... main

Author SHA1 Message Date
Jens Petersen aa1f6bd3d7 drop the ppc64le threaded hadrian workaround 2023-02-28 12:59:52 +08:00
Jens Petersen b5d643a65e ppc64le: disable parallel GC in hadrian temporarily (before !5725) 2023-02-17 18:56:48 +08:00
Jens Petersen 1026d3dcb9 upstream patch to enable SMP rts for ppc64le 2023-02-17 18:32:54 +08:00
Jens Petersen 12e492c7ee rebuild to fix prof deps 2023-02-16 00:22:50 +08:00
Jens Petersen fc6aef5532 restore RPATHs to allow correct dependency generation 2023-02-11 17:20:21 +08:00
Jens Petersen 5d91d09b6f update to 9.2.6 2023-02-11 17:20:10 +08:00
Jens Petersen f0b4448eb6 happy is also needed when not building hadrian 2023-02-11 00:13:31 +08:00
Jens Petersen 6ad54b8225 restore ld.so.conf.d to workaround mock issue (rhbz#2166028) 2023-02-11 00:03:14 +08:00
Jens Petersen 1c6ff01623 remove the RUNPATHs again since they are covered by the ld.so.conf.d file 2023-02-05 00:42:53 +08:00
Jens Petersen 9b70e66d38 obsolete manual if disabled 2023-02-04 22:03:20 +08:00
Jens Petersen 0b223c6fe8 restore the ld.so.conf.d file to workaround mock issue (#2166028) 2023-02-04 22:03:09 +08:00
Jens Petersen e9399b13bb also arch filesystem subpackage since content depends on haddock 2023-01-31 20:48:19 +08:00
Jens Petersen eea1f6cad7 make ghc-doc-index arch since haddock disabled on i686
BuildError: The following noarch package built differently on different architectures: ghc-doc-index-9.2.5-125.fc38.noarch.rpm
rpmdiff output was:
added       /usr/share/doc/ghc/html/libraries/doc-index-124.html
added       /usr/share/doc/ghc/html/libraries/doc-index-126.html
added       /usr/share/doc/ghc/html/libraries/doc-index-33.html
:
:
2023-01-31 16:27:40 +08:00
Jens Petersen 608b9ae719 correct manpage location from docdir 2023-01-31 11:16:41 +08:00
Jens Petersen e3d6c97334 hadrian: put ghc manpage in the right place 2023-01-30 23:48:23 +08:00
Jens Petersen ce8a0ee17f include the manpage now built with hadrian 2023-01-30 22:50:17 +08:00
Jens Petersen 5cbb28b98c also disable haddock for i686: runs out of memory now like armv7hl
Warning: GHC.IfaceToCore: could not find link destinations for:
	- GHC.IfaceToCore.mergeIfaceDecl
Warning: GHC.Iface.Rename: could not find link destinations for:
	- GHC.Iface.Rename.ShIfM
Warning: GHC.Types.Name.Shape: could not find link destinations for:
	- GHC.Types.Name.Shape.uAvailInfos
haddock: out of memory (requested 1048576 bytes)
Warning: GHC.Tc.Gen.Splice: could not find link
2023-01-30 22:03:44 +08:00
Jens Petersen a028d88f6f replace ghc-configure-c99.patch with upstream patch
https://fedoraproject.org/wiki/Changes/PortingToModernC
2023-01-30 20:23:07 +08:00
Jens Petersen 2a8e5b4268 actually update configure for ghc-configure-c99.patch 2023-01-30 20:22:45 +08:00
Jens Petersen c7637d9d11 add 9.2.5 tarballs 2023-01-30 20:16:37 +08:00
Jens Petersen eef765975c ghc_devel_prof deprecated 2023-01-30 20:16:37 +08:00
Jens Petersen 639b07bccd build manpage with sphinx 2023-01-30 20:16:37 +08:00
Jens Petersen d8c7935735 subpackage ghc-bignum
some hackages now depend on it
2023-01-30 20:16:37 +08:00
Jens Petersen 46f60c5540 install bash-completion file 2023-01-30 20:16:37 +08:00
Jens Petersen 0c150de12d introduce %ghc_obsoletes_name so that ghc-* obsoletes ghc9.2-* 2023-01-30 20:16:37 +08:00
Jens Petersen 04d947cd74 consolidate ld.so.conf.d and chrpath for _ghcdynlibdir 2023-01-30 20:16:37 +08:00
Jens Petersen 24f60eba3d add xhtml_ver and obsoletes 2023-01-30 20:16:37 +08:00
Jens Petersen 206ca11ac0 use %ghcliblib as much as possible 2023-01-30 20:16:37 +08:00
Jens Petersen a33ef3fd51 do not disable debuginfo
avoids build-id conflicts
2023-01-30 20:16:37 +08:00
Jens Petersen feb7f7069e disable ld.so.conf.d/ghc.conf 2023-01-30 20:16:37 +08:00
Jens Petersen c315c79429 define rts_ver to avoid double listing libHSrts-1.0.2-ghc*.so 2023-01-30 20:16:37 +08:00
Jens Petersen f92afecbee override global %with_ghc_prof and %with_haddock 2023-01-30 20:16:37 +08:00
Jens Petersen a15483db6e rebase to 9.2.5 from ghc9.2 2023-01-30 20:16:30 +08:00
Jens Petersen 2cf80b12e6 update to 9.0.2 from ghc9.0 2023-01-30 20:13:58 +08:00
Florian Weimer fbe8f0f8e3 Port configure script to C99
Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
2023-01-12 13:23:26 +01:00
Jens Petersen ba0880ec2a update a few issue urls to gitlab
taken from ghc8.10
2023-01-07 10:37:46 +08:00
Jens Petersen d85561818a obsoletes ghc8.10 2022-09-28 16:41:51 +08:00
Jens Petersen 682df27912 bump llvm from 11 to 12 2022-09-28 16:40:58 +08:00
Jens Petersen 5dfb2bd4d6 ghc-compiler actually conflicts with ghcMAJOR-compiler-VERSION
add %ghc_major
2022-08-06 21:21:07 +08:00
Jens Petersen d695d12eb5 conflicts with ghc8.10-compiler-8.10.7 2022-08-06 13:12:21 +08:00
Jens Petersen 4a785f1067 add ghc-filesystem obsoletes to help dnf 2022-08-06 13:11:16 +08:00
Fedora Release Engineering 08f84177dc Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 04:33:03 +00:00
Jens Petersen 88eb3f9143 add simple ci test 2022-06-15 21:59:53 +08:00
Jens Petersen aafa21cdc2 rebase to 8.10.7 from ghc8.10; adding filesystem subpkg 2022-06-14 22:28:23 +08:00
Fedora Release Engineering 43ca3c7195 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 04:22:41 +00:00
Miro Hrončok 379a3830ce Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34 2022-01-08 11:11:19 +01:00
Jens Petersen 9d34518bd2 move zlib-devel Recommends to cabal-install 2021-09-17 18:50:11 +08:00
Jens Petersen 09b2d1dfd3 Revert "opt-out of F35 mass rebuild with noautobuild"
This reverts commit 0c5dec5b3c.
2021-08-04 23:50:04 +08:00
Jens Petersen d010494668 revert back to 8.10.5 with rts patch and without s390x llvm
reduce cpus for post %install scripts for armv7hl
2021-07-23 10:44:05 +08:00
Jens Petersen 0c5dec5b3c opt-out of F35 mass rebuild with noautobuild 2021-07-21 20:22:00 +08:00
Jens Petersen 2c08099dac turn off llvm for s390x again
https://gitlab.haskell.org/ghc/ghc/-/issues/20120
2021-07-19 19:53:53 +08:00
Jens Petersen 872f1cef00 enable llvm backend for s390x and perf build 2021-07-16 00:01:59 +08:00
Jens Petersen a4101c0be4 remove old unused patches 2021-07-15 20:17:29 +08:00
Jens Petersen 499775baf0 revert to ghc-8.10.4 (since ghc-8.10.5 fails to rebuild on s390x) 2021-07-15 20:16:05 +08:00
Jens Petersen f2172368be enable llvm for s390x 2021-07-12 10:26:19 +08:00
Jens Petersen 055d1f9b29 enable quick build for s390x llvm bootstrap 2021-07-12 01:11:07 +08:00
Jens Petersen cc98c023ef remove the debian x32 patch 2021-07-11 23:24:28 +08:00
Jens Petersen a1a8a89e7c rebase to 8.10.5 from ghc:8.10 2021-07-11 21:27:39 +08:00
Jens Petersen bad2a2b5a9 fix build with sphinx4 (#1977317)
use rawstring in conf.py (already in ghc-9)
2021-07-01 00:37:53 +08:00
Jens Petersen 71ccb69965 ghc-compiler now requires ghc-filesystem for html docdirs 2021-05-25 11:44:26 +08:00
Fedora Release Engineering e1bee79cdc - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 06:44:33 +00:00
Jens Petersen 58f71ccc9b Add riscv64 to ghc_unregisterized_arches (David Abdurachmanov) 2020-12-12 23:42:02 +08:00
20 changed files with 942 additions and 680 deletions

11
.gitignore vendored
View File

@ -31,3 +31,14 @@ testsuite-6.12.3.tar.bz2
/ghc-8.8.3-src.tar.xz.sig
/ghc-8.8.4-src.tar.xz.sig
/ghc-8.8.4-src.tar.xz
/ghc-8.10.5-src.tar.xz.sig
/ghc-8.10.5-src.tar.xz
/ghc-8.10.4-src.tar.xz.sig
/ghc-8.10.7-src.tar.xz
/ghc-8.10.7-src.tar.xz.sig
/ghc-9.0.2-src.tar.xz
/ghc-9.0.2-src.tar.xz.sig
/ghc-9.2.5-src.tar.xz
/ghc-9.2.5-src.tar.xz.sig
/ghc-9.2.6-src.tar.xz
/ghc-9.2.6-src.tar.xz.sig

35
5725.patch Normal file
View File

@ -0,0 +1,35 @@
From 7cfa6f3114168797cf1fa7faa4ffe6c06b73f149 Mon Sep 17 00:00:00 2001
From: Peter Trommler <ptrommler@acm.org>
Date: Tue, 11 May 2021 20:52:01 +0200
Subject: [PATCH] Hadrian: Enable SMP on powerpc64{le}
Fixes #19825
---
hadrian/src/Oracles/Flag.hs | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/hadrian/src/Oracles/Flag.hs b/hadrian/src/Oracles/Flag.hs
index 86521e4aa8a..1b3aff693eb 100644
--- a/hadrian/src/Oracles/Flag.hs
+++ b/hadrian/src/Oracles/Flag.hs
@@ -70,7 +70,16 @@ targetSupportsSMP :: Action Bool
targetSupportsSMP = do
unreg <- flag GhcUnregisterised
armVer <- targetArmVersion
- goodArch <- anyTargetArch ["i386", "x86_64", "sparc", "powerpc", "arm", "aarch64", "s390x", "riscv64"]
+ goodArch <- anyTargetArch ["i386"
+ , "x86_64"
+ , "sparc"
+ , "powerpc"
+ , "powerpc64"
+ , "powerpc64le"
+ , "arm"
+ , "aarch64"
+ , "s390x"
+ , "riscv64"]
if -- The THREADED_RTS requires `BaseReg` to be in a register and the
-- Unregisterised mode doesn't allow that.
| unreg -> return False
--
GitLab

View File

@ -1,277 +0,0 @@
From 6e361d895dda4600a85e01c72ff219474b5c7190 Mon Sep 17 00:00:00 2001
From: Kavon Farvardin <kavon@farvard.in>
Date: Thu, 4 Oct 2018 13:44:55 -0400
Subject: [PATCH] Multiple fixes / improvements for LLVM backend
- Fix for #13904 -- stop "trashing" callee-saved registers, since it is
not actually doing anything useful.
- Fix for #14251 -- fixes the calling convention for functions passing
raw SSE-register values by adding padding as needed to get the values
in the right registers. This problem cropped up when some args were
unused an dropped from the live list.
- Fixed a typo in 'readnone' attribute
- Added 'lower-expect' pass to level 0 LLVM optimization passes to
improve block layout in LLVM for stack checks, etc.
Test Plan: `make test WAYS=optllvm` and `make test WAYS=llvm`
Reviewers: bgamari, simonmar, angerman
Reviewed By: angerman
Subscribers: rwbarton, carter
GHC Trac Issues: #13904, #14251
Differential Revision: https://phabricator.haskell.org/D5190
(cherry picked from commit adcb5fb47c0942671d409b940d8884daa9359ca4)
---
compiler/llvmGen/Llvm/Types.hs | 2 +-
compiler/llvmGen/LlvmCodeGen/Base.hs | 62 ++++++++++++++++++++----
compiler/llvmGen/LlvmCodeGen/CodeGen.hs | 59 +++++-----------------
compiler/main/DriverPipeline.hs | 2 +-
testsuite/tests/codeGen/should_run/all.T | 4 +-
5 files changed, 67 insertions(+), 62 deletions(-)
diff --git a/compiler/llvmGen/Llvm/Types.hs b/compiler/llvmGen/Llvm/Types.hs
index 87111499fc0..c1c51afcf0f 100644
--- a/compiler/llvmGen/Llvm/Types.hs
+++ b/compiler/llvmGen/Llvm/Types.hs
@@ -560,7 +560,7 @@ instance Outputable LlvmFuncAttr where
ppr OptSize = text "optsize"
ppr NoReturn = text "noreturn"
ppr NoUnwind = text "nounwind"
- ppr ReadNone = text "readnon"
+ ppr ReadNone = text "readnone"
ppr ReadOnly = text "readonly"
ppr Ssp = text "ssp"
ppr SspReq = text "ssqreq"
diff --git a/compiler/llvmGen/LlvmCodeGen/Base.hs b/compiler/llvmGen/LlvmCodeGen/Base.hs
index 6e20da48c1b..ec91bacc4c8 100644
--- a/compiler/llvmGen/LlvmCodeGen/Base.hs
+++ b/compiler/llvmGen/LlvmCodeGen/Base.hs
@@ -26,7 +26,7 @@ module LlvmCodeGen.Base (
cmmToLlvmType, widthToLlvmFloat, widthToLlvmInt, llvmFunTy,
llvmFunSig, llvmFunArgs, llvmStdFunAttrs, llvmFunAlign, llvmInfAlign,
- llvmPtrBits, tysToParams, llvmFunSection,
+ llvmPtrBits, tysToParams, llvmFunSection, padLiveArgs, isSSE,
strCLabel_llvm, strDisplayName_llvm, strProcedureName_llvm,
getGlobalPtr, generateExternDecls,
@@ -58,6 +58,8 @@ import ErrUtils
import qualified Stream
import Control.Monad (ap)
+import Data.List (sort)
+import Data.Maybe (mapMaybe)
-- ----------------------------------------------------------------------------
-- * Some Data Types
@@ -147,16 +149,58 @@ llvmFunSection dflags lbl
-- | A Function's arguments
llvmFunArgs :: DynFlags -> LiveGlobalRegs -> [LlvmVar]
llvmFunArgs dflags live =
- map (lmGlobalRegArg dflags) (filter isPassed (activeStgRegs platform))
+ map (lmGlobalRegArg dflags) (filter isPassed allRegs)
where platform = targetPlatform dflags
- isLive r = not (isSSE r) || r `elem` alwaysLive || r `elem` live
+ allRegs = activeStgRegs platform
+ paddedLive = map (\(_,r) -> r) $ padLiveArgs live
+ isLive r = r `elem` alwaysLive || r `elem` paddedLive
isPassed r = not (isSSE r) || isLive r
- isSSE (FloatReg _) = True
- isSSE (DoubleReg _) = True
- isSSE (XmmReg _) = True
- isSSE (YmmReg _) = True
- isSSE (ZmmReg _) = True
- isSSE _ = False
+
+
+isSSE :: GlobalReg -> Bool
+isSSE (FloatReg _) = True
+isSSE (DoubleReg _) = True
+isSSE (XmmReg _) = True
+isSSE (YmmReg _) = True
+isSSE (ZmmReg _) = True
+isSSE _ = False
+
+sseRegNum :: GlobalReg -> Maybe Int
+sseRegNum (FloatReg i) = Just i
+sseRegNum (DoubleReg i) = Just i
+sseRegNum (XmmReg i) = Just i
+sseRegNum (YmmReg i) = Just i
+sseRegNum (ZmmReg i) = Just i
+sseRegNum _ = Nothing
+
+-- the bool indicates whether the global reg was added as padding.
+-- the returned list is not sorted in any particular order,
+-- but does indicate the set of live registers needed, with SSE padding.
+padLiveArgs :: LiveGlobalRegs -> [(Bool, GlobalReg)]
+padLiveArgs live = allRegs
+ where
+ sseRegNums = sort $ mapMaybe sseRegNum live
+ (_, padding) = foldl assignSlots (1, []) $ sseRegNums
+ allRegs = padding ++ map (\r -> (False, r)) live
+
+ assignSlots (i, acc) regNum
+ | i == regNum = -- don't need padding here
+ (i+1, acc)
+ | i < regNum = let -- add padding for slots i .. regNum-1
+ numNeeded = regNum-i
+ acc' = genPad i numNeeded ++ acc
+ in
+ (regNum+1, acc')
+ | otherwise = error "padLiveArgs -- i > regNum ??"
+
+ genPad start n =
+ take n $ flip map (iterate (+1) start) (\i ->
+ (True, FloatReg i))
+ -- NOTE: Picking float should be fine for the following reasons:
+ -- (1) Float aliases with all the other SSE register types on
+ -- the given platform.
+ -- (2) The argument is not live anyways.
+
-- | Llvm standard fun attributes
llvmStdFunAttrs :: [LlvmFuncAttr]
diff --git a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
index e812dd445f1..a7121b7909a 100644
--- a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
+++ b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
@@ -14,7 +14,7 @@ import LlvmCodeGen.Base
import LlvmCodeGen.Regs
import BlockId
-import CodeGen.Platform ( activeStgRegs, callerSaves )
+import CodeGen.Platform ( activeStgRegs )
import CLabel
import Cmm
import PprCmm
@@ -211,7 +211,6 @@ genCall t@(PrimTarget (MO_Prefetch_Data localityInt)) [] args
fptr <- liftExprData $ getFunPtr funTy t
argVars' <- castVarsW Signed $ zip argVars argTy
- doTrashStmts
let argSuffix = [mkIntLit i32 0, mkIntLit i32 localityInt, mkIntLit i32 1]
statement $ Expr $ Call StdCall fptr (argVars' ++ argSuffix) []
| otherwise = panic $ "prefetch locality level integer must be between 0 and 3, given: " ++ (show localityInt)
@@ -294,7 +293,6 @@ genCall t@(PrimTarget op) [] args
fptr <- getFunPtrW funTy t
argVars' <- castVarsW Signed $ zip argVars argTy
- doTrashStmts
let alignVal = mkIntLit i32 align
arguments = argVars' ++ (alignVal:isVolVal)
statement $ Expr $ Call StdCall fptr arguments []
@@ -446,7 +444,6 @@ genCall target res args = runStmtsDecls $ do
| never_returns = statement $ Unreachable
| otherwise = return ()
- doTrashStmts
-- make the actual call
case retTy of
@@ -1759,12 +1756,9 @@ genLit _ CmmHighStackMark
funPrologue :: LiveGlobalRegs -> [CmmBlock] -> LlvmM StmtData
funPrologue live cmmBlocks = do
- trash <- getTrashRegs
let getAssignedRegs :: CmmNode O O -> [CmmReg]
getAssignedRegs (CmmAssign reg _) = [reg]
- -- Calls will trash all registers. Unfortunately, this needs them to
- -- be stack-allocated in the first place.
- getAssignedRegs (CmmUnsafeForeignCall _ rs _) = map CmmGlobal trash ++ map CmmLocal rs
+ getAssignedRegs (CmmUnsafeForeignCall _ rs _) = map CmmLocal rs
getAssignedRegs _ = []
getRegsBlock (_, body, _) = concatMap getAssignedRegs $ blockToList body
assignedRegs = nub $ concatMap (getRegsBlock . blockSplit) cmmBlocks
@@ -1794,14 +1788,9 @@ funPrologue live cmmBlocks = do
funEpilogue :: LiveGlobalRegs -> LlvmM ([LlvmVar], LlvmStatements)
funEpilogue live = do
- -- Have information and liveness optimisation is enabled?
- let liveRegs = alwaysLive ++ live
- isSSE (FloatReg _) = True
- isSSE (DoubleReg _) = True
- isSSE (XmmReg _) = True
- isSSE (YmmReg _) = True
- isSSE (ZmmReg _) = True
- isSSE _ = False
+ -- the bool indicates whether the register is padding.
+ let alwaysNeeded = map (\r -> (False, r)) alwaysLive
+ livePadded = alwaysNeeded ++ padLiveArgs live
-- Set to value or "undef" depending on whether the register is
-- actually live
@@ -1813,39 +1802,17 @@ funEpilogue live = do
let ty = (pLower . getVarType $ lmGlobalRegVar dflags r)
return (Just $ LMLitVar $ LMUndefLit ty, nilOL)
platform <- getDynFlag targetPlatform
- loads <- flip mapM (activeStgRegs platform) $ \r -> case () of
- _ | r `elem` liveRegs -> loadExpr r
- | not (isSSE r) -> loadUndef r
+ let allRegs = activeStgRegs platform
+ loads <- flip mapM allRegs $ \r -> case () of
+ _ | (False, r) `elem` livePadded
+ -> loadExpr r -- if r is not padding, load it
+ | not (isSSE r) || (True, r) `elem` livePadded
+ -> loadUndef r
| otherwise -> return (Nothing, nilOL)
let (vars, stmts) = unzip loads
return (catMaybes vars, concatOL stmts)
-
--- | A series of statements to trash all the STG registers.
---
--- In LLVM we pass the STG registers around everywhere in function calls.
--- So this means LLVM considers them live across the entire function, when
--- in reality they usually aren't. For Caller save registers across C calls
--- the saving and restoring of them is done by the Cmm code generator,
--- using Cmm local vars. So to stop LLVM saving them as well (and saving
--- all of them since it thinks they're always live, we trash them just
--- before the call by assigning the 'undef' value to them. The ones we
--- need are restored from the Cmm local var and the ones we don't need
--- are fine to be trashed.
-getTrashStmts :: LlvmM LlvmStatements
-getTrashStmts = do
- regs <- getTrashRegs
- stmts <- flip mapM regs $ \ r -> do
- reg <- getCmmReg (CmmGlobal r)
- let ty = (pLower . getVarType) reg
- return $ Store (LMLitVar $ LMUndefLit ty) reg
- return $ toOL stmts
-
-getTrashRegs :: LlvmM [GlobalReg]
-getTrashRegs = do plat <- getLlvmPlatform
- return $ filter (callerSaves plat) (activeStgRegs plat)
-
-- | Get a function pointer to the CLabel specified.
--
-- This is for Haskell functions, function type is assumed, so doesn't work
@@ -1967,7 +1934,3 @@ getCmmRegW = lift . getCmmReg
genLoadW :: Atomic -> CmmExpr -> CmmType -> WriterT LlvmAccum LlvmM LlvmVar
genLoadW atomic e ty = liftExprData $ genLoad atomic e ty
-doTrashStmts :: WriterT LlvmAccum LlvmM ()
-doTrashStmts = do
- stmts <- lift getTrashStmts
- tell $ LlvmAccum stmts mempty
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 86dd913461c..f4d5e7f553c 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1465,7 +1465,7 @@ runPhase (RealPhase LlvmOpt) input_fn dflags
-- we always (unless -optlo specified) run Opt since we rely on it to
-- fix up some pretty big deficiencies in the code we generate
llvmOpts = case optLevel dflags of
- 0 -> "-mem2reg -globalopt"
+ 0 -> "-mem2reg -globalopt -lower-expect"
1 -> "-O1 -globalopt"
_ -> "-O2"

43
9394.patch Normal file
View File

@ -0,0 +1,43 @@
From 480b5d6440bbbd0b89dabdb2dc957333056aa2a7 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Tue, 22 Nov 2022 15:23:50 +0100
Subject: [PATCH] m4/fp_leading_underscore.m4: Avoid implicit exit function
declaration
And switch to a new-style function definition.
Fixes build issues with compilers that do not accept implicit function
declarations.
---
m4/fp_leading_underscore.m4 | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/m4/fp_leading_underscore.m4 b/m4/fp_leading_underscore.m4
index fde57c7625d..939cee3b69f 100644
--- a/m4/fp_leading_underscore.m4
+++ b/m4/fp_leading_underscore.m4
@@ -32,17 +32,15 @@ struct nlist xYzzY1[] = {{"xYzzY1", 0},{0}};
struct nlist xYzzY2[] = {{"_xYzzY2", 0},{0}};
#endif
-int main(argc, argv)
-int argc;
-char **argv;
+int main(int argc, char **argv)
{
#if defined(HAVE_NLIST_H)
if(nlist(argv[0], xYzzY1) == 0 && xYzzY1[0].n_value != 0)
- exit(1);
+ return 1;
if(nlist(argv[0], xYzzY2) == 0 && xYzzY2[0].n_value != 0)
- exit(0);
+ return 0;
#endif
- exit(1);
+ return 1;
}]])],[fptools_cv_leading_underscore=yes],[fptools_cv_leading_underscore=no],[fptools_cv_leading_underscore=no])
;;
esac]);
--
GitLab

View File

@ -0,0 +1,93 @@
From 9aace0eaf6279f17368a1753b65afbdc466e8291 Mon Sep 17 00:00:00 2001
From: Sylvain Henry <sylvain@haskus.fr>
Date: Sat, 10 Apr 2021 14:48:16 +0200
Subject: [PATCH] Produce constant file atomically (#19684)
---
utils/deriveConstants/Main.hs | 21 ++++++++++++++++-----
utils/deriveConstants/deriveConstants.cabal | 3 ++-
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/utils/deriveConstants/Main.hs b/utils/deriveConstants/Main.hs
index 8bf8ae7b44d..9db673a9852 100644
--- a/utils/deriveConstants/Main.hs
+++ b/utils/deriveConstants/Main.hs
@@ -34,9 +34,10 @@ import Data.Maybe (catMaybes, mapMaybe, fromMaybe)
import Numeric (readHex)
import System.Environment (getArgs)
import System.Exit (ExitCode(ExitSuccess), exitFailure)
-import System.FilePath ((</>))
+import System.FilePath ((</>),(<.>))
import System.IO (stderr, hPutStrLn)
import System.Process (showCommandForUser, readProcess, rawSystem)
+import System.Directory (renameFile)
main :: IO ()
main = do opts <- parseArgs
@@ -79,6 +80,16 @@ data Options = Options {
o_targetOS :: Maybe String
}
+-- | Write a file atomically
+--
+-- This avoids other processes seeing the file while it is being written into.
+atomicWriteFile :: FilePath -> String -> IO ()
+atomicWriteFile fn s = do
+ let tmp = fn <.> "tmp"
+ writeFile tmp s
+ renameFile tmp fn
+
+
parseArgs :: IO Options
parseArgs = do args <- getArgs
opts <- f emptyOptions args
@@ -670,7 +681,7 @@ getWanted verbose os tmpdir gccProgram gccFlags nmProgram mobjdumpProgram
= do let cStuff = unlines (headers ++ concatMap (doWanted . snd) (wanteds os))
cFile = tmpdir </> "tmp.c"
oFile = tmpdir </> "tmp.o"
- writeFile cFile cStuff
+ atomicWriteFile cFile cStuff
execute verbose gccProgram (gccFlags ++ ["-c", cFile, "-o", oFile])
xs <- case os of
"openbsd" -> readProcess objdumpProgam ["--syms", oFile] ""
@@ -855,7 +866,7 @@ getWanted verbose os tmpdir gccProgram gccFlags nmProgram mobjdumpProgram
= return (w, FieldTypeGcptrMacro name)
writeHaskellType :: FilePath -> [What Fst] -> IO ()
-writeHaskellType fn ws = writeFile fn xs
+writeHaskellType fn ws = atomicWriteFile fn xs
where xs = unlines [header, body, footer, parser]
header = "module GHC.Platform.Constants where\n\n\
\import Prelude\n\
@@ -920,7 +931,7 @@ writeHaskellType fn ws = writeFile fn xs
writeHaskellValue :: FilePath -> [What Snd] -> IO ()
-writeHaskellValue fn rs = writeFile fn xs
+writeHaskellValue fn rs = atomicWriteFile fn xs
where xs = unlines [header, body, footer]
header = "PlatformConstants {"
footer = " }"
@@ -937,7 +948,7 @@ writeHaskellValue fn rs = writeFile fn xs
doWhat (FieldTypeGcptrMacro {}) = []
writeHeader :: FilePath -> [(Where, What Snd)] -> IO ()
-writeHeader fn rs = writeFile fn xs
+writeHeader fn rs = atomicWriteFile fn xs
where xs = headers ++ hs ++ unlines body
headers = "/* This file is created automatically. Do not edit by hand.*/\n\n"
haskellRs = fmap snd $ filter (\r -> fst r `elem` [Haskell,Both]) rs
diff --git a/utils/deriveConstants/deriveConstants.cabal b/utils/deriveConstants/deriveConstants.cabal
index 50b5b695c30..36ba7ebe1f7 100644
--- a/utils/deriveConstants/deriveConstants.cabal
+++ b/utils/deriveConstants/deriveConstants.cabal
@@ -20,4 +20,5 @@ Executable deriveConstants
Build-Depends: base >= 4 && < 5,
containers,
process,
- filepath
+ filepath,
+ directory
--
GitLab

View File

@ -0,0 +1,87 @@
Description: Don't include BufPos in interface files
Author: Matthew Pickering
Origin: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8972
Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/22162
Index: b/compiler/GHC/Iface/Ext/Types.hs
===================================================================
--- a/compiler/GHC/Iface/Ext/Types.hs
+++ b/compiler/GHC/Iface/Ext/Types.hs
@@ -746,5 +746,5 @@ toHieName name
| isKnownKeyName name = KnownKeyName (nameUnique name)
| isExternalName name = ExternalName (nameModule name)
(nameOccName name)
- (nameSrcSpan name)
- | otherwise = LocalName (nameOccName name) (nameSrcSpan name)
+ (removeBufSpan $ nameSrcSpan name)
+ | otherwise = LocalName (nameOccName name) (removeBufSpan $ nameSrcSpan name)
Index: b/compiler/GHC/Types/SrcLoc.hs
===================================================================
--- a/compiler/GHC/Types/SrcLoc.hs
+++ b/compiler/GHC/Types/SrcLoc.hs
@@ -72,6 +72,7 @@ module GHC.Types.SrcLoc (
getBufPos,
BufSpan(..),
getBufSpan,
+ removeBufSpan,
-- * Located
Located,
@@ -397,6 +398,10 @@ data UnhelpfulSpanReason
| UnhelpfulOther !FastString
deriving (Eq, Show)
+removeBufSpan :: SrcSpan -> SrcSpan
+removeBufSpan (RealSrcSpan s _) = RealSrcSpan s Nothing
+removeBufSpan s = s
+
{- Note [Why Maybe BufPos]
~~~~~~~~~~~~~~~~~~~~~~~~~~
In SrcLoc we store (Maybe BufPos); in SrcSpan we store (Maybe BufSpan).
Index: b/compiler/GHC/Utils/Binary.hs
===================================================================
--- a/compiler/GHC/Utils/Binary.hs
+++ b/compiler/GHC/Utils/Binary.hs
@@ -1444,19 +1444,6 @@ instance Binary RealSrcSpan where
return (mkRealSrcSpan (mkRealSrcLoc f sl sc)
(mkRealSrcLoc f el ec))
-instance Binary BufPos where
- put_ bh (BufPos i) = put_ bh i
- get bh = BufPos <$> get bh
-
-instance Binary BufSpan where
- put_ bh (BufSpan start end) = do
- put_ bh start
- put_ bh end
- get bh = do
- start <- get bh
- end <- get bh
- return (BufSpan start end)
-
instance Binary UnhelpfulSpanReason where
put_ bh r = case r of
UnhelpfulNoLocationInfo -> putByte bh 0
@@ -1475,10 +1462,11 @@ instance Binary UnhelpfulSpanReason wher
_ -> UnhelpfulOther <$> get bh
instance Binary SrcSpan where
- put_ bh (RealSrcSpan ss sb) = do
+ put_ bh (RealSrcSpan ss _sb) = do
putByte bh 0
+ -- BufSpan doesn't ever get serialised because the positions depend
+ -- on build location.
put_ bh ss
- put_ bh sb
put_ bh (UnhelpfulSpan s) = do
putByte bh 1
@@ -1488,8 +1476,7 @@ instance Binary SrcSpan where
h <- getByte bh
case h of
0 -> do ss <- get bh
- sb <- get bh
- return (RealSrcSpan ss sb)
+ return (RealSrcSpan ss Nothing)
_ -> do s <- get bh
return (UnhelpfulSpan s)

View File

@ -1,8 +1,10 @@
Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424
--- a/compiler/iface/MkIface.hs
+++ b/compiler/iface/MkIface.hs
@@ -681,7 +681,7 @@ addFingerprints hsc_env mb_old_fingerpri
Index: b/compiler/GHC/Iface/Recomp.hs
===================================================================
--- a/compiler/GHC/Iface/Recomp.hs
+++ b/compiler/GHC/Iface/Recomp.hs
@@ -1071,7 +1071,7 @@ addFingerprints hsc_env iface0
iface_hash <- computeFingerprint putNameLiterally
(mod_hash,
ann_fn (mkVarOcc "module"), -- See mkIfaceAnnCache
@ -11,13 +13,12 @@ Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424
sorted_deps,
mi_hpc iface0)
@@ -714,6 +714,9 @@ addFingerprints hsc_env mb_old_fingerpri
@@ -1106,6 +1106,8 @@ addFingerprints hsc_env iface0
(non_orph_rules, orph_rules) = mkOrphMap ifRuleOrph (mi_rules iface0)
(non_orph_fis, orph_fis) = mkOrphMap ifFamInstOrph (mi_fam_insts iface0)
fix_fn = mi_fix_fn iface0
ann_fn = mkIfaceAnnCache (mi_anns iface0)
+ -- Do not allow filenames to affect the interface
+ usages = [ case u of UsageFile _ fp -> UsageFile "" fp; _ -> u | u <- mi_usages iface0 ]
+
-- | Retrieve the orphan hashes 'mi_orphan_hash' for a list of modules
-- (in particular, the orphan modules which are transitively imported by the

View File

@ -1,31 +0,0 @@
Description: Allow unregisterised ghc-8.6 to build newer GHC
Commit af9b744bbf1 introduced a regression stopping existing unregisterised
compilers from being able to compile newer versions of GHC. The problem is
that the bootstrap compiler uses the newer `includes/stg/MiscClosures.h` file
where some defines have been renamed, resulting in the following error:
.
error: stg_atomicModifyMutVarzh undeclared (first use in this function); did you mean stg_atomicModifyMutVar2zh?
.
For more information, see https://gitlab.haskell.org/ghc/ghc/issues/17111.
.
This patch can be removed, once ghc-8.6 is no longer the bootstrap compiler.
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Bug: https://gitlab.haskell.org/ghc/ghc/issues/17111
Index: b/includes/stg/MiscClosures.h
===================================================================
--- a/includes/stg/MiscClosures.h
+++ b/includes/stg/MiscClosures.h
@@ -390,8 +390,12 @@ RTS_FUN_DECL(stg_copySmallMutableArrayzh
RTS_FUN_DECL(stg_casSmallArrayzh);
RTS_FUN_DECL(stg_newMutVarzh);
+#if __GLASGOW_HASKELL__ < 808
+RTS_FUN_DECL(stg_atomicModifyMutVarzh);
+#else
RTS_FUN_DECL(stg_atomicModifyMutVar2zh);
RTS_FUN_DECL(stg_atomicModifyMutVarzuzh);
+#endif
RTS_FUN_DECL(stg_casMutVarzh);
RTS_FUN_DECL(stg_isEmptyMVarzh);

View File

@ -1,51 +0,0 @@
Description: Allow unregisterised ghc-8.2 to build newer GHC
Commit b68697e579d38ca29c2b84377dc2affa04659a28 introduced a regression
stopping existing unregisteristed compilers from being used to compile a newer
version of GHC. The problem is that the bootstrap compiler uses the newer Stg.h
where EB_, IB_, etc, definitions have changed resulting in the following error:
.
error: conflicting types for 'ghc_GhcPrelude_zdtrModule4_bytes'
note: in definition of macro 'EB_'
#define EB_(X) extern const char X[]
note: previous definition of 'ghc_GhcPrelude_zdtrModule4_bytes' was here
char ghc_GhcPrelude_zdtrModule4_bytes[] = "ghc";
.
For more information about the problem, see https://phabricator.haskell.org/D4114.
.
This patch is a rework of https://phabricator.haskell.org/D3741.
It modifies Stg.h to include the old definitions, if a compiler older than
8.4 is being used.
.
This patch can be removed, once ghc-8.2 is no longer the bootstrap compiler.
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Bug: https://ghc.haskell.org/trac/ghc/ticket/15201
Index: b/includes/Stg.h
===================================================================
--- a/includes/Stg.h
+++ b/includes/Stg.h
@@ -232,6 +232,16 @@ typedef StgInt I_;
typedef StgWord StgWordArray[];
typedef StgFunPtr F_;
+#if __GLASGOW_HASKELL__ < 804
+#define EB_(X) extern char X[]
+#define IB_(X) static char X[]
+#define EI_(X) extern StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
+#define II_(X) static StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
+#define IF_(f) static StgFunPtr GNUC3_ATTRIBUTE(used) f(void)
+#define FN_(f) StgFunPtr f(void)
+#define EF_(f) StgFunPtr f(void) /* External Cmm functions */
+#define EFF_(f) void f() /* See Note [External function prototypes] */
+#else
/* byte arrays (and strings): */
#define EB_(X) extern const char X[]
#define IB_(X) static const char X[]
@@ -250,6 +260,7 @@ typedef StgFunPtr F_;
#define EF_(f) StgFunPtr f(void) /* External Cmm functions */
/* foreign functions: */
#define EFF_(f) void f() /* See Note [External function prototypes] */
+#endif /* __GLASGOW_HASKELL__ < 804 */
/* Note [External function prototypes] See Trac #8965, #11395
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -1,58 +0,0 @@
Description: Allow unregisterised ghc-8.4 to build newer GHC
Commit 4075656e8bb introduced a regression stopping existing unregisteristed
compilers from being able to compile newer versions of GHC. The problem is
that the bootstrap compiler uses the newer `rts/storage/ClosureTypes.h` file
where some defines have been renamed, resulting in the following error:
.
error: stg_MUT_ARR_PTRS_FROZEN0_info undeclared (first use in this function); did you mean stg_MUT_ARR_PTRS_FROZEN_DIRTY_info?
.
For more information, see https://gitlab.haskell.org/ghc/ghc/issues/15913.
.
This patch can be removed, once ghc-8.4 is no longer the bootstrap compiler.
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Bug: https://gitlab.haskell.org/ghc/ghc/issues/15913
Bug-Debian: https://bugs.debian.org/932941
Index: b/includes/rts/storage/ClosureTypes.h
===================================================================
--- a/includes/rts/storage/ClosureTypes.h
+++ b/includes/rts/storage/ClosureTypes.h
@@ -82,5 +82,11 @@
#define SMALL_MUT_ARR_PTRS_DIRTY 60
#define SMALL_MUT_ARR_PTRS_FROZEN_DIRTY 61
#define SMALL_MUT_ARR_PTRS_FROZEN_CLEAN 62
+#if __GLASGOW_HASKELL__ < 806
+#define SMALL_MUT_ARR_PTRS_FROZEN0 SMALL_MUT_ARR_PTRS_FROZEN_DIRTY
+#define SMALL_MUT_ARR_PTRS_FROZEN SMALL_MUT_ARR_PTRS_FROZEN_CLEAN
+#define MUT_ARR_PTRS_FROZEN0 MUT_ARR_PTRS_FROZEN_DIRTY
+#define MUT_ARR_PTRS_FROZEN MUT_ARR_PTRS_FROZEN_CLEAN
+#endif
#define COMPACT_NFDATA 63
#define N_CLOSURE_TYPES 64
Index: b/includes/stg/MiscClosures.h
===================================================================
--- a/includes/stg/MiscClosures.h
+++ b/includes/stg/MiscClosures.h
@@ -116,12 +116,22 @@ RTS_ENTRY(stg_ARR_WORDS);
RTS_ENTRY(stg_MUT_ARR_WORDS);
RTS_ENTRY(stg_MUT_ARR_PTRS_CLEAN);
RTS_ENTRY(stg_MUT_ARR_PTRS_DIRTY);
+#if __GLASGOW_HASKELL__ < 806
+RTS_ENTRY(stg_MUT_ARR_PTRS_FROZEN);
+RTS_ENTRY(stg_MUT_ARR_PTRS_FROZEN0);
+#else
RTS_ENTRY(stg_MUT_ARR_PTRS_FROZEN_CLEAN);
RTS_ENTRY(stg_MUT_ARR_PTRS_FROZEN_DIRTY);
+#endif
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_CLEAN);
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_DIRTY);
+#if __GLASGOW_HASKELL__ < 806
+RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_FROZEN);
+RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_FROZEN0);
+#else
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_FROZEN_CLEAN);
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_FROZEN_DIRTY);
+#endif
RTS_ENTRY(stg_MUT_VAR_CLEAN);
RTS_ENTRY(stg_MUT_VAR_DIRTY);
RTS_ENTRY(stg_END_TSO_QUEUE);

View File

@ -1,35 +0,0 @@
--- ghc-8.6.3/docs/users_guide/flags.py~ 2018-09-21 06:18:23.000000000 +0800
+++ ghc-8.6.3/docs/users_guide/flags.py 2019-03-05 10:20:38.639782096 +0800
@@ -49,6 +49,8 @@
import sphinx
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 distutils.version import LooseVersion
from utils import build_table_from_list
@@ -603,14 +605,21 @@
sphinx_version = LooseVersion(sphinx.__version__)
override_arg = {'override': True} if sphinx_version >= LooseVersion('1.8') else {}
+ # 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, **override_arg)
+ 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,
**override_arg)
+ 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

View File

@ -0,0 +1,9 @@
--- ghc-9.2.1/hadrian/hadrian.cabal~ 2021-10-29 04:41:34.000000000 +0800
+++ ghc-9.2.1/hadrian/hadrian.cabal 2021-11-01 15:02:49.625656704 +0800
@@ -162,5 +162,5 @@
-- waiting for external processes
-- * -qg: Don't use parallel GC as the synchronization
-- time tends to eat any benefit.
- "-with-rtsopts=-I0 -qg"
+ "-with-rtsopts=-I0"
-threaded

View File

@ -1,5 +1,5 @@
--- ghc-8.2.2/libraries/Cabal/Cabal/Distribution/Simple/Install.hs~ 2017-05-05 23:51:43.000000000 +0900
+++ ghc-8.2.2/libraries/Cabal/Cabal/Distribution/Simple/Install.hs 2018-02-27 12:22:13.159432104 +0900
--- ghc/libraries/Cabal/Cabal/src/Distribution/Simple/Install.hs~ 2017-05-05 23:51:43.000000000 +0900
+++ ghc/libraries/Cabal/Cabal/src/Distribution/Simple/Install.hs 2018-02-27 12:22:13.159432104 +0900
@@ -215,8 +215,7 @@
++ " in " ++ binPref)
inPath <- isInSearchPath binPref

799
ghc.spec

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
Description: Remove hard-coded googleapis font URL
Bug: https://github.com/haskell/haddock/issues/1211
Bug-Debian: https://bugs.debian.org/963690
Index: b/utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs
===================================================================
--- a/utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs
+++ b/utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs
@@ -137,7 +137,7 @@ headHtml docTitle themes mathjax_url bas
, thetype "text/css"
, href (withBaseURL base_url quickJumpCssFile) ]
<< noHtml
- , thelink ! [ rel "stylesheet", thetype "text/css", href fontUrl] << noHtml
+ -- , thelink ! [ rel "stylesheet", thetype "text/css", href fontUrl] << noHtml
, script ! [ src (withBaseURL base_url haddockJsFile)
, emptyAttr "async"
, thetype "text/javascript" ]
@@ -146,7 +146,7 @@ headHtml docTitle themes mathjax_url bas
, script ! [src mjUrl, thetype "text/javascript"] << noHtml
]
where
- fontUrl = "https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700"
+ -- fontUrl = "https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700"
mjUrl = fromMaybe "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML" mathjax_url
mjConf = unwords [ "MathJax.Hub.Config({"
, "tex2jax: {"

View File

@ -7,4 +7,4 @@ fi
cd libraries
grep -i ^version: Cabal/Cabal/Cabal.cabal */*.cabal | grep -v -e "\(Win32\|gmp.old\|gmp2\|integer-simple\)" | sed -e "s!/.*: \+!-!"
grep -i ^version: Cabal/Cabal/Cabal.cabal containers/containers/containers.cabal template-haskell/template-haskell.cabal.in */*.cabal | grep -v -e "\(Win32\|gmp.old\|gmp2\|integer-simple\)" | sed -e "s!/.*: \+!-!" | sort

View File

@ -1,2 +1,2 @@
SHA512 (ghc-8.8.4-src.tar.xz.sig) = 1ed2e64e8b75a147d7c66b0018119f54ac740131b6f74612aa975c9120d8f7a8a2286829cef22ef2cd16262af0604659daa41c09ef3bdec6c22b8d086fbc1166
SHA512 (ghc-8.8.4-src.tar.xz) = efd23bd819f7429486696a3a929a040471db7ea8a2d1f1d832e4cf0825b9e1e0c5e6ecad0ab8376f58b74e9c28c1d2f773bd126596d6d853c9e57d57e5ceb090
SHA512 (ghc-9.2.6-src.tar.xz) = 187e00780b97ef784a01e1caa278d2c5b22d350de7d18d0b4c8c522c2d9e7895f5720ffbf589352ed601c81eee6f10a39cb4a3060e6639cda45494aeaa4f94a0
SHA512 (ghc-9.2.6-src.tar.xz.sig) = df13365e2dabd2459e1df3f624d0f39213a1fdda597274ba96dcf2de44d9bd56106f7438bab3622f55757d12f3b1fec4fdeb865bb34b0bfe0713133aa8799f74

6
tests/smoke/runtest.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
set -e
echo 'main = return ()' > test.hs
ghc test.hs && ./test

11
tests/tests.yml Normal file
View File

@ -0,0 +1,11 @@
---
- hosts: localhost
tags:
- classic
roles:
- role: standard-test-basic
required_packages:
- ghc
tests:
- smoke
...

View File

@ -1,27 +0,0 @@
Description: Use native x86_64 instructions on x32
This patch enables a few native 64-bit integer instructions
on x32 which are available on this architecture despite using
32-bit pointers. These instructions are present on x86_64 but
not on x86 and ghc checks the size of (void *) to determine
that. This method fails on x32 since despite using 32-bit
pointers and hence sizeof(void *) == 4, it still uses the
full x86_64 instruction set and software-emulated variants
of the aforementioned 64-bit integer instructions are
therefore not present in the toolchain which will make ghc
fail to build on x32.
See: https://ghc.haskell.org/trac/ghc/ticket/11571
.
Index: ghc-8.0.2/rts/RtsSymbols.c
===================================================================
--- ghc-8.0.2.orig/rts/RtsSymbols.c
+++ ghc-8.0.2/rts/RtsSymbols.c
@@ -857,7 +857,7 @@
// 64-bit support functions in libgcc.a
-#if defined(__GNUC__) && SIZEOF_VOID_P <= 4 && !defined(_ABIN32)
+#if defined(__GNUC__) && SIZEOF_VOID_P <= 4 && !defined(_ABIN32) && !(defined(__x86_64__) && defined(__ILP32__))
#define RTS_LIBGCC_SYMBOLS \
SymI_NeedsProto(__divdi3) \
SymI_NeedsProto(__udivdi3) \