Compare commits
32 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| b8861679ea | |||
| 1b684285fe | |||
| 4b168206e3 | |||
| 7033a40076 | |||
| 3f15e2a8a3 | |||
| e3950373b0 | |||
| 83c9f171b8 | |||
| 5bf6f869bf | |||
| b6617eaa1b | |||
| b1fa691d6e | |||
| f9ff265524 | |||
| 5223d29540 | |||
| b3c07b1553 | |||
| 7a85aa58df | |||
| cf90764044 | |||
| 7b9b205464 | |||
| 9864daf47e | |||
| 8a215c0d5c | |||
| d38f7bab51 | |||
| ac0a35134d | |||
| 2a87567309 | |||
| 2410920121 | |||
| 7e9cf1e07f | |||
| 90775cd206 | |||
| 3d2b8efa85 | |||
| c3f4517a59 | |||
| 487ee95d66 | |||
| c64de35b87 | |||
| adf58ba775 | |||
| 2dbc0af71f | |||
| e1d93ba49d | |||
| 3b3a5bcecd |
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3de754bb3e45d4b3980ed238781cfd808f4e7c84ceae73213662f1bf5ea2d8fa
|
||||
size 1526663
|
||||
277
Cabal-absolute-datadir.patch
Normal file
277
Cabal-absolute-datadir.patch
Normal file
@@ -0,0 +1,277 @@
|
||||
From 1f8f9fd08fb90bd94668ac8a81c94e179fc8ab86 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Pickering <matthewtpickering@gmail.com>
|
||||
Date: Fri, 14 Mar 2025 12:55:51 +0000
|
||||
Subject: [PATCH] Set <pkgname_datadir> to an absolute path
|
||||
|
||||
Ticket #10717 points out that the <pkgname>_datadir environment variable
|
||||
should be set to an absolute path since the test executables may
|
||||
change directory during their invocation.
|
||||
|
||||
This is easily fixed by using the absoluteWorkingDirLBI
|
||||
function, which was introduced in 027bddfcdf3ba298376c60be1ccf664ebc394cec,
|
||||
|
||||
Fixes #10717
|
||||
---
|
||||
Cabal/src/Distribution/Simple/Bench.hs | 2 +
|
||||
Cabal/src/Distribution/Simple/Build.hs | 50 ++++++++++---------
|
||||
Cabal/src/Distribution/Simple/Haddock.hs | 3 +-
|
||||
Cabal/src/Distribution/Simple/Test.hs | 2 +
|
||||
cabal-install/src/Distribution/Client/Run.hs | 3 ++
|
||||
.../DataDirSetupTest/cabal.cabal.out | 13 +++++
|
||||
.../PackageTests/DataDirSetupTest/cabal.out | 13 +++++
|
||||
changelog.d/pr-10830.md | 10 ++++
|
||||
8 files changed, 72 insertions(+), 24 deletions(-)
|
||||
create mode 100644 cabal-testsuite/PackageTests/DataDirSetupTest/cabal.cabal.out
|
||||
create mode 100644 cabal-testsuite/PackageTests/DataDirSetupTest/cabal.out
|
||||
create mode 100644 changelog.d/pr-10830.md
|
||||
|
||||
diff --git a/Cabal/src/Distribution/Simple/Bench.hs b/Cabal/src/Distribution/Simple/Bench.hs
|
||||
index 78f169f25..c4b4dbd2f 100644
|
||||
--- a/Cabal/src/Distribution/Simple/Bench.hs
|
||||
+++ b/Cabal/src/Distribution/Simple/Bench.hs
|
||||
@@ -56,6 +56,7 @@ bench
|
||||
-- ^ flags sent to benchmark
|
||||
-> IO ()
|
||||
bench args pkg_descr lbi flags = do
|
||||
+ curDir <- LBI.absoluteWorkingDirLBI lbi
|
||||
let verbosity = fromFlag $ benchmarkVerbosity flags
|
||||
benchmarkNames = args
|
||||
pkgBenchmarks = PD.benchmarks pkg_descr
|
||||
@@ -71,6 +72,7 @@ bench args pkg_descr lbi flags = do
|
||||
{ -- Include any build-tool-depends on build tools internal to the current package.
|
||||
LBI.withPrograms =
|
||||
addInternalBuildTools
|
||||
+ curDir
|
||||
pkg_descr
|
||||
lbi
|
||||
(benchmarkBuildInfo bm)
|
||||
diff --git a/Cabal/src/Distribution/Simple/Build.hs b/Cabal/src/Distribution/Simple/Build.hs
|
||||
index 0ebd51e48..647480d35 100644
|
||||
--- a/Cabal/src/Distribution/Simple/Build.hs
|
||||
+++ b/Cabal/src/Distribution/Simple/Build.hs
|
||||
@@ -187,13 +187,15 @@ build_setupHooks
|
||||
-- dumped.
|
||||
dumpBuildInfo verbosity distPref (configDumpBuildInfo (configFlags lbi)) pkg_descr lbi flags
|
||||
|
||||
+ curDir <- absoluteWorkingDirLBI lbi
|
||||
+
|
||||
-- Now do the actual building
|
||||
(\f -> foldM_ f (installedPkgs lbi) componentsToBuild) $ \index target -> do
|
||||
let comp = targetComponent target
|
||||
clbi = targetCLBI target
|
||||
bi = componentBuildInfo comp
|
||||
-- Include any build-tool-depends on build tools internal to the current package.
|
||||
- progs' = addInternalBuildTools pkg_descr lbi bi (withPrograms lbi)
|
||||
+ progs' = addInternalBuildTools curDir pkg_descr lbi bi (withPrograms lbi)
|
||||
lbi' =
|
||||
lbi
|
||||
{ withPrograms = progs'
|
||||
@@ -375,17 +377,20 @@ repl_setupHooks
|
||||
|
||||
internalPackageDB <- createInternalPackageDB verbosity lbi distPref
|
||||
|
||||
- let lbiForComponent comp lbi' =
|
||||
- lbi'
|
||||
- { withPackageDB = withPackageDB lbi ++ [internalPackageDB]
|
||||
- , withPrograms =
|
||||
- -- Include any build-tool-depends on build tools internal to the current package.
|
||||
- addInternalBuildTools
|
||||
- pkg_descr
|
||||
- lbi'
|
||||
- (componentBuildInfo comp)
|
||||
- (withPrograms lbi')
|
||||
- }
|
||||
+ let lbiForComponent comp lbi' = do
|
||||
+ curDir <- absoluteWorkingDirLBI lbi'
|
||||
+ return $
|
||||
+ lbi'
|
||||
+ { withPackageDB = withPackageDB lbi' ++ [internalPackageDB]
|
||||
+ , withPrograms =
|
||||
+ -- Include any build-tool-depends on build tools internal to the current package.
|
||||
+ addInternalBuildTools
|
||||
+ curDir
|
||||
+ pkg_descr
|
||||
+ lbi'
|
||||
+ (componentBuildInfo comp)
|
||||
+ (withPrograms lbi')
|
||||
+ }
|
||||
runPreBuildHooks :: LocalBuildInfo -> TargetInfo -> IO ()
|
||||
runPreBuildHooks lbi2 tgt =
|
||||
let inputs =
|
||||
@@ -403,7 +408,7 @@ repl_setupHooks
|
||||
[ do
|
||||
let clbi = targetCLBI subtarget
|
||||
comp = targetComponent subtarget
|
||||
- lbi' = lbiForComponent comp lbi
|
||||
+ lbi' <- lbiForComponent comp lbi
|
||||
preBuildComponent runPreBuildHooks verbosity lbi' subtarget
|
||||
buildComponent
|
||||
(mempty{buildCommonFlags = mempty{setupVerbosity = toFlag verbosity}})
|
||||
@@ -420,7 +425,7 @@ repl_setupHooks
|
||||
-- REPL for target components
|
||||
let clbi = targetCLBI target
|
||||
comp = targetComponent target
|
||||
- lbi' = lbiForComponent comp lbi
|
||||
+ lbi' <- lbiForComponent comp lbi
|
||||
preBuildComponent runPreBuildHooks verbosity lbi' target
|
||||
replComponent flags verbosity pkg_descr lbi' suffixHandlers comp clbi distPref
|
||||
|
||||
@@ -925,12 +930,13 @@ createInternalPackageDB verbosity lbi distPref = do
|
||||
-- 'progOverrideEnv', so that any programs configured from now on will be
|
||||
-- able to invoke these build tools.
|
||||
addInternalBuildTools
|
||||
- :: PackageDescription
|
||||
+ :: AbsolutePath (Dir Pkg)
|
||||
+ -> PackageDescription
|
||||
-> LocalBuildInfo
|
||||
-> BuildInfo
|
||||
-> ProgramDb
|
||||
-> ProgramDb
|
||||
-addInternalBuildTools pkg lbi bi progs =
|
||||
+addInternalBuildTools pwd pkg lbi bi progs =
|
||||
prependProgramSearchPathNoLogging
|
||||
internalToolPaths
|
||||
[pkgDataDirVar]
|
||||
@@ -949,13 +955,11 @@ addInternalBuildTools pkg lbi bi progs =
|
||||
buildDir lbi
|
||||
</> makeRelativePathEx (toolName' </> toolName' <.> exeExtension (hostPlatform lbi))
|
||||
]
|
||||
- mbWorkDir = mbWorkDirLBI lbi
|
||||
- rawDataDir = dataDir pkg
|
||||
- dataDirPath
|
||||
- | null $ getSymbolicPath rawDataDir =
|
||||
- interpretSymbolicPath mbWorkDir sameDirectory
|
||||
- | otherwise =
|
||||
- interpretSymbolicPath mbWorkDir rawDataDir
|
||||
+
|
||||
+ -- This is an absolute path, so if a process changes directory, it can still
|
||||
+ -- find the datadir (#10717)
|
||||
+ dataDirPath :: FilePath
|
||||
+ dataDirPath = interpretSymbolicPathAbsolute pwd (dataDir pkg)
|
||||
|
||||
-- TODO: build separate libs in separate dirs so that we can build
|
||||
-- multiple libs, e.g. for 'LibTest' library-style test suites
|
||||
diff --git a/Cabal/src/Distribution/Simple/Haddock.hs b/Cabal/src/Distribution/Simple/Haddock.hs
|
||||
index ee2b88e76..5c534c01d 100644
|
||||
--- a/Cabal/src/Distribution/Simple/Haddock.hs
|
||||
+++ b/Cabal/src/Distribution/Simple/Haddock.hs
|
||||
@@ -331,12 +331,13 @@ haddock_setupHooks
|
||||
createInternalPackageDB verbosity lbi (flag $ setupDistPref . haddockCommonFlags)
|
||||
|
||||
(\f -> foldM_ f (installedPkgs lbi) targets') $ \index target -> do
|
||||
+ curDir <- absoluteWorkingDirLBI lbi
|
||||
let
|
||||
component = targetComponent target
|
||||
clbi = targetCLBI target
|
||||
bi = componentBuildInfo component
|
||||
-- Include any build-tool-depends on build tools internal to the current package.
|
||||
- progs' = addInternalBuildTools pkg_descr lbi bi (withPrograms lbi)
|
||||
+ progs' = addInternalBuildTools curDir pkg_descr lbi bi (withPrograms lbi)
|
||||
lbi' =
|
||||
lbi
|
||||
{ withPrograms = progs'
|
||||
diff --git a/Cabal/src/Distribution/Simple/Test.hs b/Cabal/src/Distribution/Simple/Test.hs
|
||||
index 5b7a6daa7..57107eef6 100644
|
||||
--- a/Cabal/src/Distribution/Simple/Test.hs
|
||||
+++ b/Cabal/src/Distribution/Simple/Test.hs
|
||||
@@ -70,6 +70,7 @@ test
|
||||
-- ^ flags sent to test
|
||||
-> IO ()
|
||||
test args pkg_descr lbi0 flags = do
|
||||
+ curDir <- LBI.absoluteWorkingDirLBI lbi0
|
||||
let common = testCommonFlags flags
|
||||
verbosity = fromFlag $ setupVerbosity common
|
||||
distPref = fromFlag $ setupDistPref common
|
||||
@@ -96,6 +97,7 @@ test args pkg_descr lbi0 flags = do
|
||||
{ withPrograms =
|
||||
-- Include any build-tool-depends on build tools internal to the current package.
|
||||
addInternalBuildTools
|
||||
+ curDir
|
||||
pkg_descr
|
||||
lbi
|
||||
(PD.testBuildInfo suite)
|
||||
diff --git a/cabal-install/src/Distribution/Client/Run.hs b/cabal-install/src/Distribution/Client/Run.hs
|
||||
index 88671a9f5..1dd9db32c 100644
|
||||
--- a/cabal-install/src/Distribution/Client/Run.hs
|
||||
+++ b/cabal-install/src/Distribution/Client/Run.hs
|
||||
@@ -35,6 +35,7 @@ import Distribution.Simple.Flag (fromFlag)
|
||||
import Distribution.Simple.LocalBuildInfo
|
||||
( ComponentName (..)
|
||||
, LocalBuildInfo (..)
|
||||
+ , absoluteWorkingDirLBI
|
||||
, buildDir
|
||||
, depLibraryPaths
|
||||
, interpretSymbolicPathLBI
|
||||
@@ -142,6 +143,7 @@ splitRunArgs verbosity lbi args =
|
||||
-- | Run a given executable.
|
||||
run :: Verbosity -> LocalBuildInfo -> Executable -> [String] -> IO ()
|
||||
run verbosity lbi exe exeArgs = do
|
||||
+ curDir <- absoluteWorkingDirLBI lbi
|
||||
let distPref = fromFlag $ configDistPref $ configFlags lbi
|
||||
buildPref = buildDir lbi
|
||||
pkg_descr = localPkgDescr lbi
|
||||
@@ -154,6 +156,7 @@ run verbosity lbi exe exeArgs = do
|
||||
, -- Include any build-tool-depends on build tools internal to the current package.
|
||||
withPrograms =
|
||||
addInternalBuildTools
|
||||
+ curDir
|
||||
pkg_descr
|
||||
lbi
|
||||
(buildInfo exe)
|
||||
diff --git a/cabal-testsuite/PackageTests/DataDirSetupTest/cabal.cabal.out b/cabal-testsuite/PackageTests/DataDirSetupTest/cabal.cabal.out
|
||||
new file mode 100644
|
||||
index 000000000..f1e923b5c
|
||||
--- /dev/null
|
||||
+++ b/cabal-testsuite/PackageTests/DataDirSetupTest/cabal.cabal.out
|
||||
@@ -0,0 +1,13 @@
|
||||
+# Setup configure
|
||||
+Configuring datadir-test-0.1.0.0...
|
||||
+# Setup build
|
||||
+Preprocessing library for datadir-test-0.1.0.0...
|
||||
+Building library for datadir-test-0.1.0.0...
|
||||
+Preprocessing test suite 'datadir-test' for datadir-test-0.1.0.0...
|
||||
+Building test suite 'datadir-test' for datadir-test-0.1.0.0...
|
||||
+# Setup test
|
||||
+Running 1 test suites...
|
||||
+Test suite datadir-test: RUNNING...
|
||||
+Test suite datadir-test: PASS
|
||||
+Test suite logged to: cabal.cabal.dist/work/dist/test/datadir-test-0.1.0.0-datadir-test.log
|
||||
+1 of 1 test suites (1 of 1 test cases) passed.
|
||||
diff --git a/cabal-testsuite/PackageTests/DataDirSetupTest/cabal.out b/cabal-testsuite/PackageTests/DataDirSetupTest/cabal.out
|
||||
new file mode 100644
|
||||
index 000000000..eadbc3aea
|
||||
--- /dev/null
|
||||
+++ b/cabal-testsuite/PackageTests/DataDirSetupTest/cabal.out
|
||||
@@ -0,0 +1,13 @@
|
||||
+# Setup configure
|
||||
+Configuring datadir-test-0.1.0.0...
|
||||
+# Setup build
|
||||
+Preprocessing library for datadir-test-0.1.0.0...
|
||||
+Building library for datadir-test-0.1.0.0...
|
||||
+Preprocessing test suite 'datadir-test' for datadir-test-0.1.0.0...
|
||||
+Building test suite 'datadir-test' for datadir-test-0.1.0.0...
|
||||
+# Setup test
|
||||
+Running 1 test suites...
|
||||
+Test suite datadir-test: RUNNING...
|
||||
+Test suite datadir-test: PASS
|
||||
+Test suite logged to: cabal.dist/work/dist/test/datadir-test-0.1.0.0-datadir-test.log
|
||||
+1 of 1 test suites (1 of 1 test cases) passed.
|
||||
diff --git a/changelog.d/pr-10830.md b/changelog.d/pr-10830.md
|
||||
new file mode 100644
|
||||
index 000000000..9e7876144
|
||||
--- /dev/null
|
||||
+++ b/changelog.d/pr-10830.md
|
||||
@@ -0,0 +1,10 @@
|
||||
+---
|
||||
+synopsis: Set <pkgname>_datadir to an absolute path when running tests
|
||||
+packages: [Cabal]
|
||||
+prs: 10828
|
||||
+issues: [10717]
|
||||
+---
|
||||
+
|
||||
+Fix a regression where `<pkgname>_datadir` was set to a relative path. This
|
||||
+caused issues when running testsuites which changed the working directory and
|
||||
+accessed datafiles.
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
Index: ghc-9.4.4/libraries/containers/containers/include/containers.h
|
||||
===================================================================
|
||||
--- ghc-9.4.4.orig/libraries/containers/containers/include/containers.h
|
||||
+++ ghc-9.4.4/libraries/containers/containers/include/containers.h
|
||||
@@ -23,7 +23,6 @@
|
||||
* Unboxed arrays are broken on big-endian architectures.
|
||||
* See https://gitlab.haskell.org/ghc/ghc/-/issues/16998
|
||||
*/
|
||||
-# define USE_UNBOXED_ARRAYS 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
25
_constraints
25
_constraints
@@ -1,31 +1,10 @@
|
||||
<constraints>
|
||||
<hardware>
|
||||
<disk>
|
||||
<size unit="G">16</size>
|
||||
<size unit="G">32</size>
|
||||
</disk>
|
||||
<physicalmemory>
|
||||
<size unit="G">4</size>
|
||||
<size unit="G">16</size>
|
||||
</physicalmemory>
|
||||
</hardware>
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<arch>aarch64</arch>
|
||||
<arch>s390x</arch>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<physicalmemory>
|
||||
<size unit="G">10</size>
|
||||
</physicalmemory>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<arch>riscv64</arch>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<disk>
|
||||
<size unit="G">30</size>
|
||||
</disk>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
</constraints>
|
||||
|
||||
165
aarch64_inter_far.patch
Normal file
165
aarch64_inter_far.patch
Normal file
@@ -0,0 +1,165 @@
|
||||
From 8fe9b012907fb5d84eefaa60980f7024b3951fcd Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Klebinger <klebinger.andreas@gmx.at>
|
||||
Date: Thu, 18 Apr 2024 13:25:18 +0200
|
||||
Subject: [PATCH] NCG: AArch64 - Add -finter-module-far-jumps.
|
||||
|
||||
When enabled the arm backend will assume jumps to targets outside of the
|
||||
current module are further than 128MB away.
|
||||
|
||||
This will allow for code to work if:
|
||||
* The current module results in less than 128MB of code.
|
||||
* The whole program is loaded within a 4GB memory region.
|
||||
|
||||
We have seen a few reports of broken linkers (#24648) where this flag might allow
|
||||
a program to compile/run successfully at a very small performance cost.
|
||||
|
||||
-------------------------
|
||||
Metric Increase:
|
||||
T783
|
||||
-------------------------
|
||||
|
||||
(cherry picked from commit f32d6c2b468c67fed619f2fa1fb97eb012afbb6e)
|
||||
---
|
||||
compiler/GHC/CmmToAsm/AArch64/CodeGen.hs | 17 ++++++++++++++---
|
||||
compiler/GHC/CmmToAsm/Config.hs | 1 +
|
||||
compiler/GHC/Driver/Config/CmmToAsm.hs | 1 +
|
||||
compiler/GHC/Driver/DynFlags.hs | 1 -
|
||||
compiler/GHC/Driver/Flags.hs | 2 ++
|
||||
compiler/GHC/Driver/Session.hs | 1 +
|
||||
docs/users_guide/using-optimisation.rst | 17 +++++++++++++++++
|
||||
7 files changed, 36 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs b/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
|
||||
index f58e507f110f..4ed3c90c7644 100644
|
||||
--- a/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
|
||||
+++ b/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
|
||||
@@ -23,7 +23,7 @@ import GHC.Cmm.DebugBlock
|
||||
import GHC.CmmToAsm.Monad
|
||||
( NatM, getNewRegNat
|
||||
, getPicBaseMaybeNat, getPlatform, getConfig
|
||||
- , getDebugBlock, getFileId
|
||||
+ , getDebugBlock, getFileId, getThisModuleNat
|
||||
)
|
||||
-- import GHC.CmmToAsm.Instr
|
||||
import GHC.CmmToAsm.PIC
|
||||
@@ -1471,8 +1471,19 @@ assignReg_FltCode = assignReg_IntCode
|
||||
-- Jumps
|
||||
|
||||
genJump :: CmmExpr{-the branch target-} -> NatM InstrBlock
|
||||
-genJump expr@(CmmLit (CmmLabel lbl))
|
||||
- = return $ unitOL (annExpr expr (J (TLabel lbl)))
|
||||
+genJump expr@(CmmLit (CmmLabel lbl)) = do
|
||||
+ cur_mod <- getThisModuleNat
|
||||
+ !useFarJumps <- ncgEnableInterModuleFarJumps <$> getConfig
|
||||
+ let is_local = isLocalCLabel cur_mod lbl
|
||||
+
|
||||
+ -- We prefer to generate a near jump using a simble `B` instruction
|
||||
+ -- with a range (+/-128MB). But if the target is outside the current module
|
||||
+ -- we might have to account for large code offsets. (#24648)
|
||||
+ if not useFarJumps || is_local
|
||||
+ then return $ unitOL (annExpr expr (J (TLabel lbl)))
|
||||
+ else do
|
||||
+ (target, _format, code) <- getSomeReg expr
|
||||
+ return (code `appOL` unitOL (annExpr expr (J (TReg target))))
|
||||
|
||||
genJump expr = do
|
||||
(target, _format, code) <- getSomeReg expr
|
||||
diff --git a/compiler/GHC/CmmToAsm/Config.hs b/compiler/GHC/CmmToAsm/Config.hs
|
||||
index f4c39ac83c6a..422efa36ab74 100644
|
||||
--- a/compiler/GHC/CmmToAsm/Config.hs
|
||||
+++ b/compiler/GHC/CmmToAsm/Config.hs
|
||||
@@ -47,6 +47,7 @@ data NCGConfig = NCGConfig
|
||||
, ncgDwarfSourceNotes :: !Bool -- ^ Enable GHC-specific source note DIEs
|
||||
, ncgCmmStaticPred :: !Bool -- ^ Enable static control-flow prediction
|
||||
, ncgEnableShortcutting :: !Bool -- ^ Enable shortcutting (don't jump to blocks only containing a jump)
|
||||
+ , ncgEnableInterModuleFarJumps:: !Bool -- ^ Use far-jumps for cross-module jumps.
|
||||
, ncgComputeUnwinding :: !Bool -- ^ Compute block unwinding tables
|
||||
, ncgEnableDeadCodeElimination :: !Bool -- ^ Whether to enable the dead-code elimination
|
||||
}
|
||||
diff --git a/compiler/GHC/Driver/Config/CmmToAsm.hs b/compiler/GHC/Driver/Config/CmmToAsm.hs
|
||||
index 762108b8b23e..1475c40b8219 100644
|
||||
--- a/compiler/GHC/Driver/Config/CmmToAsm.hs
|
||||
+++ b/compiler/GHC/Driver/Config/CmmToAsm.hs
|
||||
@@ -70,6 +70,7 @@ initNCGConfig dflags this_mod = NCGConfig
|
||||
, ncgExposeInternalSymbols = gopt Opt_ExposeInternalSymbols dflags
|
||||
, ncgCmmStaticPred = gopt Opt_CmmStaticPred dflags
|
||||
, ncgEnableShortcutting = gopt Opt_AsmShortcutting dflags
|
||||
+ , ncgEnableInterModuleFarJumps = gopt Opt_InterModuleFarJumps dflags
|
||||
, ncgComputeUnwinding = debugLevel dflags > 0
|
||||
, ncgEnableDeadCodeElimination = not (gopt Opt_InfoTableMap dflags)
|
||||
-- Disable when -finfo-table-map is on (#20428)
|
||||
diff --git a/compiler/GHC/Driver/DynFlags.hs b/compiler/GHC/Driver/DynFlags.hs
|
||||
index a24ea13e5caa..469537b7caa2 100644
|
||||
--- a/compiler/GHC/Driver/DynFlags.hs
|
||||
+++ b/compiler/GHC/Driver/DynFlags.hs
|
||||
@@ -1194,7 +1194,6 @@ defaultFlags settings
|
||||
|
||||
++ validHoleFitDefaults
|
||||
|
||||
-
|
||||
where platform = sTargetPlatform settings
|
||||
|
||||
-- | These are the default settings for the display and sorting of valid hole
|
||||
diff --git a/compiler/GHC/Driver/Flags.hs b/compiler/GHC/Driver/Flags.hs
|
||||
index 583a8530eca7..fc8d75ed13fe 100644
|
||||
--- a/compiler/GHC/Driver/Flags.hs
|
||||
+++ b/compiler/GHC/Driver/Flags.hs
|
||||
@@ -647,6 +647,7 @@ data GeneralFlag
|
||||
| Opt_CmmElimCommonBlocks
|
||||
| Opt_CmmControlFlow
|
||||
| Opt_AsmShortcutting
|
||||
+ | Opt_InterModuleFarJumps
|
||||
| Opt_OmitYields
|
||||
| Opt_FunToThunk -- deprecated
|
||||
| Opt_DictsStrict -- be strict in argument dictionaries
|
||||
@@ -896,6 +897,7 @@ optimisationFlags = EnumSet.fromList
|
||||
, Opt_CmmSink
|
||||
, Opt_CmmElimCommonBlocks
|
||||
, Opt_AsmShortcutting
|
||||
+ , Opt_InterModuleFarJumps
|
||||
, Opt_FunToThunk
|
||||
, Opt_DmdTxDictSel
|
||||
, Opt_Loopification
|
||||
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs
|
||||
index 74490ba91f9b..804e11b28d90 100644
|
||||
--- a/compiler/GHC/Driver/Session.hs
|
||||
+++ b/compiler/GHC/Driver/Session.hs
|
||||
@@ -2453,6 +2453,7 @@ fFlagsDeps = [
|
||||
flagSpec "gen-manifest" Opt_GenManifest,
|
||||
flagSpec "ghci-history" Opt_GhciHistory,
|
||||
flagSpec "ghci-leak-check" Opt_GhciLeakCheck,
|
||||
+ flagSpec "inter-module-far-jumps" Opt_InterModuleFarJumps,
|
||||
flagSpec "validate-ide-info" Opt_ValidateHie,
|
||||
flagGhciSpec "local-ghci-history" Opt_LocalGhciHistory,
|
||||
flagGhciSpec "no-it" Opt_NoIt,
|
||||
diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst
|
||||
index f57a1ba32278..ffb371150edd 100644
|
||||
--- a/docs/users_guide/using-optimisation.rst
|
||||
+++ b/docs/users_guide/using-optimisation.rst
|
||||
@@ -681,6 +681,23 @@ as such you shouldn't need to set any of them explicitly. A flag
|
||||
``-fno-full-laziness``. If that is inconvenient for you, please leave a
|
||||
comment `on the issue tracker (#21204) <https://gitlab.haskell.org/ghc/ghc/-/issues/21204>`__.
|
||||
|
||||
+.. ghc-flag:: -finter-module-far-jumps
|
||||
+ :shortdesc: Assume code sections can be very large.
|
||||
+ :type: dynamic
|
||||
+ :reverse: -fno-inter-module-far-jumps
|
||||
+ :category:
|
||||
+
|
||||
+ :default: Off
|
||||
+
|
||||
+ This flag forces GHC to use far jumps instead of near jumps for all jumps
|
||||
+ which cross module boundries. This removes the need for jump islands/linker
|
||||
+ jump fixups which some linkers struggle to deal with. (:ghc-ticket:`24648`)
|
||||
+
|
||||
+ This comes at a very modest code size (~2%) and runtime (~0.6%) overhead.
|
||||
+
|
||||
+ Note that this flag currently only affects the NCG AArch64 backend.
|
||||
+
|
||||
+
|
||||
.. ghc-flag:: -fignore-asserts
|
||||
:shortdesc: Ignore assertions in the source. Implied by :ghc-flag:`-O`.
|
||||
:type: dynamic
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
Index: ghc-9.4.5/libraries/Cabal/Cabal-syntax/src/Distribution/System.hs
|
||||
===================================================================
|
||||
--- ghc-9.4.5.orig/libraries/Cabal/Cabal-syntax/src/Distribution/System.hs
|
||||
+++ ghc-9.4.5/libraries/Cabal/Cabal-syntax/src/Distribution/System.hs
|
||||
@@ -159,7 +159,7 @@ buildOS = classifyOS Permissive System.I
|
||||
|
||||
-- | These are the known Arches: I386, X86_64, PPC, PPC64, Sparc,
|
||||
-- Arm, AArch64, Mips, SH, IA64, S390, S390X, Alpha, Hppa, Rs6000,
|
||||
--- M68k, Vax, JavaScript and Wasm32.
|
||||
+-- M68k, Vax, RISCV64, JavaScript and Wasm32.
|
||||
--
|
||||
-- The following aliases can also be used:
|
||||
-- * PPC alias: powerpc
|
||||
@@ -174,6 +174,7 @@ data Arch = I386 | X86_64 | PPC | PPC
|
||||
| IA64 | S390 | S390X
|
||||
| Alpha | Hppa | Rs6000
|
||||
| M68k | Vax
|
||||
+ | RISCV64
|
||||
| JavaScript
|
||||
| Wasm32
|
||||
| OtherArch String
|
||||
@@ -189,6 +190,7 @@ knownArches = [I386, X86_64, PPC, PPC64,
|
||||
,IA64, S390, S390X
|
||||
,Alpha, Hppa, Rs6000
|
||||
,M68k, Vax
|
||||
+ ,RISCV64
|
||||
,JavaScript
|
||||
,Wasm32]
|
||||
|
||||
Index: ghc-9.4.5/libraries/Cabal/Cabal/src/Distribution/Simple/PreProcess.hs
|
||||
===================================================================
|
||||
--- ghc-9.4.5.orig/libraries/Cabal/Cabal/src/Distribution/Simple/PreProcess.hs
|
||||
+++ ghc-9.4.5/libraries/Cabal/Cabal/src/Distribution/Simple/PreProcess.hs
|
||||
@@ -729,6 +729,7 @@ platformDefines lbi =
|
||||
Rs6000 -> ["rs6000"]
|
||||
M68k -> ["m68k"]
|
||||
Vax -> ["vax"]
|
||||
+ RISCV64 -> ["riscv64"]
|
||||
JavaScript -> ["javascript"]
|
||||
Wasm32 -> ["wasm32"]
|
||||
OtherArch _ -> []
|
||||
3
ghc-9.12.2-src.tar.xz
Normal file
3
ghc-9.12.2-src.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0e49cd5dde43f348c5716e5de9a5d7a0f8d68d945dc41cf75dfdefe65084f933
|
||||
size 33394536
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:99e40d729ec8831a633b75fd85d65dd10e31a0133dec9d198d686a273679ab70
|
||||
size 32565948
|
||||
@@ -1,14 +1,18 @@
|
||||
Index: ghc-9.2.0.20210331/libraries/Cabal/Cabal/src/Distribution/Simple/Install.hs
|
||||
Index: ghc-9.12.2/libraries/Cabal/Cabal/src/Distribution/Simple/Install.hs
|
||||
===================================================================
|
||||
--- ghc-9.2.0.20210331.orig/libraries/Cabal/Cabal/src/Distribution/Simple/Install.hs
|
||||
+++ ghc-9.2.0.20210331/libraries/Cabal/Cabal/src/Distribution/Simple/Install.hs
|
||||
@@ -206,8 +206,7 @@ copyComponent verbosity pkg_descr lbi (C
|
||||
++ " in " ++ binPref)
|
||||
inPath <- isInSearchPath binPref
|
||||
when (not inPath) $
|
||||
- warn verbosity ("The directory " ++ binPref
|
||||
- ++ " is not in the system search path.")
|
||||
+ warn verbosity ("Executable installed in " ++ binPref)
|
||||
case compilerFlavor (compiler lbi) of
|
||||
GHC -> GHC.installExe verbosity lbi binPref buildPref progFix pkg_descr exe
|
||||
GHCJS -> GHCJS.installExe verbosity lbi binPref buildPref progFix pkg_descr exe
|
||||
--- ghc-9.12.2.orig/libraries/Cabal/Cabal/src/Distribution/Simple/Install.hs
|
||||
+++ ghc-9.12.2/libraries/Cabal/Cabal/src/Distribution/Simple/Install.hs
|
||||
@@ -297,12 +297,7 @@ copyComponent verbosity pkg_descr lbi (C
|
||||
)
|
||||
inPath <- isInSearchPath binPref
|
||||
when (not inPath) $
|
||||
- warn
|
||||
- verbosity
|
||||
- ( "The directory "
|
||||
- ++ binPref
|
||||
- ++ " is not in the system search path."
|
||||
- )
|
||||
+ warn verbosity ("Executable installed in " ++ binPref)
|
||||
case compilerFlavor (compiler lbi) of
|
||||
GHC -> GHC.installExe verbosity lbi binPref buildPref progFix pkg_descr exe
|
||||
GHCJS -> GHCJS.installExe verbosity lbi binPref buildPref progFix pkg_descr exe
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
Index: ghc-9.4.5/hadrian/src/Oracles/Setting.hs
|
||||
===================================================================
|
||||
--- ghc-9.4.5.orig/hadrian/src/Oracles/Setting.hs
|
||||
+++ ghc-9.4.5/hadrian/src/Oracles/Setting.hs
|
||||
@@ -292,7 +292,8 @@ ghcWithInterpreter = do
|
||||
, "darwin", "kfreebsdgnu" ]
|
||||
goodArch <- anyTargetArch [ "i386", "x86_64", "powerpc"
|
||||
, "arm", "aarch64", "s390x"
|
||||
- , "powerpc64", "powerpc64le" ]
|
||||
+ , "powerpc64", "powerpc64le"
|
||||
+ , "riscv64" ]
|
||||
return $ goodOs && goodArch
|
||||
|
||||
-- | Variants of the ARM architecture.
|
||||
98
ghc.changes
98
ghc.changes
@@ -1,3 +1,101 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 3 18:34:07 UTC 2025 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- remove 9_10_1-bootstrap-sources.tar.gz
|
||||
- use hadrian as BuildRequires to remove hadrian bootstraping part
|
||||
from ghc build itself
|
||||
- use quick flavor on s390x
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 28 12:34:11 UTC 2025 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- use new bootstrap 9.10.1 compiler
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 15 13:59:39 UTC 2025 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- cleanup _constraints and use higher values for ram and disk
|
||||
- add aarch64_inter_far.patch to add new ghc-option on aarch64 ncg
|
||||
- use workaround to bypass linker problems on aarch64
|
||||
- cleanup deps
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 4 20:57:07 UTC 2025 - Andreas Schwab <schwab@suse.de>
|
||||
|
||||
- Cabal-absolute-datadir.patch: Set <pkgname_datadir> to an absolute path
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 30 07:38:27 UTC 2025 - Andreas Schwab <schwab@suse.de>
|
||||
|
||||
- Require llvm only on ghc_llvm_archs
|
||||
- Adjust memory limits, removing special case for qemu emulation
|
||||
- Don't apply ghc-hadrian-s390x-rts--qg.patch on riscv64
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 28 16:04:53 UTC 2025 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- update to 9.12.2
|
||||
- dropped patches:
|
||||
+ Disable-unboxed-arrays.patch
|
||||
+ hadrian-9.10-deps.patch
|
||||
+ riscv64-ncg.patch
|
||||
- refreshed patches
|
||||
+ ghc-gen_contents_index-haddock-path.patch
|
||||
+ gnu23-hp2ps.patch
|
||||
+ ghc-Cabal-install-PATH-warning.patch
|
||||
- full changelog at:
|
||||
+ https://downloads.haskell.org/~ghc/9.12.2/docs/users_guide/9.12.2-notes.html
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 24 14:50:47 UTC 2025 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- add gnu23-hp2ps.patch for build hp2ps with gcc15+
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 3 18:49:03 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Apply ghc-hadrian-s390x-rts--qg.patch on loongarch64 as well
|
||||
- Set physicalmemory for loongarch64 in _constraints to 16 GB
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 15 21:10:31 UTC 2025 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- more work on riscv64-ncg.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 9 09:23:53 UTC 2025 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- update to version 9.10.2:
|
||||
- refreshed patches: hadrian-9.10-deps.patch
|
||||
riscv64-ncg.patch
|
||||
- dropped patches: os-string-be.patch
|
||||
ppc64le-miscompilation.patch
|
||||
- full chagelog:
|
||||
https://downloads.haskell.org/~ghc/9.10.2/docs/users_guide/9.10.2-notes.html
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 25 14:46:09 UTC 2024 - Andreas Schwab <schwab@suse.de>
|
||||
|
||||
- riscv64-ncg.patch: Backport of MR 13105, NCG for RISCV64
|
||||
- Don't require on llvm on riscv64
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 22 14:54:22 UTC 2024 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- Update to version 9.10.1. The change log for this release is at:
|
||||
https://downloads.haskell.org/~ghc/9.10.1/docs/users_guide/9.10.1-notes.html
|
||||
- use ghc-bootstrap 9.8.2
|
||||
- enable numa on all architectures
|
||||
- cleanup dead parts of specfile
|
||||
- patch changes:
|
||||
* added:
|
||||
- hadrian-9.10-deps.patch
|
||||
- os-string-be.patch
|
||||
- ppc64le-miscompilation.patch
|
||||
* dropped:
|
||||
- cabal-riscv64.patch
|
||||
- ghc-with-interpreter.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 21 10:36:19 UTC 2024 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
|
||||
234
ghc.spec
234
ghc.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package ghc
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -11,37 +11,26 @@
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
%define full_version 9.12.2
|
||||
%define short_version 9.12.2
|
||||
|
||||
%define full_version 9.8.3
|
||||
%define short_version 9.8.3
|
||||
|
||||
%ifnarch s390x
|
||||
%define with_libnuma 1
|
||||
%if 0%{suse_version} == 1600
|
||||
%global llvm_major 15
|
||||
%else
|
||||
%define with_libnuma 0
|
||||
%global llvm_major 19
|
||||
%endif
|
||||
|
||||
%global llvm_major 14
|
||||
|
||||
# conditionals
|
||||
|
||||
# disable prof, docs, perf build
|
||||
# bcond_with for production builds: disable quick build
|
||||
%bcond_with quickbuild
|
||||
|
||||
# make sure ghc libraries' ABI hashes unchanged (ghcX.Y not supported yet)
|
||||
%bcond_with abicheck
|
||||
|
||||
# bcond_without for production builds: use Hadrian buildsystem
|
||||
%bcond_without hadrian
|
||||
|
||||
# bcond_without for production builds: build hadrian
|
||||
%bcond_without build_hadrian
|
||||
|
||||
# bcond_without for production builds: enable debuginfo
|
||||
%bcond_without ghc_debuginfo
|
||||
|
||||
@@ -70,14 +59,18 @@
|
||||
%{?with_haddock:%bcond_without manual}
|
||||
%endif
|
||||
|
||||
%global ghc_llvm_archs s390x riscv64
|
||||
%global ghc_unregisterized_arches noarch
|
||||
%global ghc_llvm_archs s390x
|
||||
%global ghc_unregisterized_arches noarch loongarch64
|
||||
|
||||
%global base_ver 4.19.2.0
|
||||
%global base_ver 4.21.0.0
|
||||
%global cabal_ver 3.14.1.0
|
||||
%global ghc_compact_ver 0.1.0.0
|
||||
%global hpc_ver 0.7.0.0
|
||||
%global hsc2hs_ver 0.68.8
|
||||
%global hpc_ver 0.7.0.2
|
||||
%global hsc2hs_ver 0.68.10
|
||||
%global ghc_bignum_ver 1.3
|
||||
%global xhtml_ver 3000.2.2.1
|
||||
%global ghc_ver_for_lib 9.1202.0
|
||||
%global haddock_api_ver 2.30.0
|
||||
|
||||
Name: ghc
|
||||
Version: %{short_version}
|
||||
@@ -87,37 +80,31 @@ License: BSD-3-Clause
|
||||
URL: https://www.haskell.org/ghc/
|
||||
Source: https://downloads.haskell.org/~ghc/%{full_version}/ghc-%{version}-src.tar.xz
|
||||
Source2: ghc-rpmlintrc
|
||||
Source4: 9_4_4-bootstrap-sources.tar.gz
|
||||
Source5: ghc-pkg.man
|
||||
Source6: haddock.man
|
||||
Source7: runghc.man
|
||||
|
||||
Patch1: ghc-gen_contents_index-haddock-path.patch
|
||||
# https://ghc.haskell.org/trac/ghc/ticket/15689
|
||||
Patch2: ghc-Cabal-install-PATH-warning.patch
|
||||
# PATCH-FIX-UPSTREAM Disable-unboxed-arrays.patch ptrommler@icloud.com -- Do not use unboxed arrays on big-endian platforms. See Haskell Trac #15411.
|
||||
Patch3: Disable-unboxed-arrays.patch
|
||||
# PATCH-FIX-UPSTREAM Hadrian: enable GHCi support on riscv64 (dd38aca95a)
|
||||
Patch100: ghc-with-interpreter.patch
|
||||
# PATCH-FIX-UPSTREAM libraries/Cabal: Add support for the 64-bit RISC-V architecture (d89526f98)
|
||||
Patch101: cabal-riscv64.patch
|
||||
Patch3: Cabal-absolute-datadir.patch
|
||||
Patch200: ghc-hadrian-s390x-rts--qg.patch
|
||||
BuildRequires: binutils-devel
|
||||
BuildRequires: gcc-PIE
|
||||
Patch400: gnu23-hp2ps.patch
|
||||
Patch500: aarch64_inter_far.patch
|
||||
|
||||
BuildRequires: binutils
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: ghc-bootstrap >= 9.4
|
||||
BuildRequires: ghc-bootstrap >= 9.8
|
||||
BuildRequires: ghc-bootstrap-helpers >= 1.3
|
||||
BuildRequires: ghc-rpm-macros-extra => 2.6.1
|
||||
BuildRequires: ghc-rpm-macros-extra => 2.9.1
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: gmp-devel
|
||||
BuildRequires: libdw-devel
|
||||
BuildRequires: hadrian
|
||||
BuildRequires: libelf-devel
|
||||
BuildRequires: libffi-devel
|
||||
BuildRequires: libtool
|
||||
%ifarch %{ghc_llvm_archs}
|
||||
BuildRequires: clang%{llvm_major}
|
||||
BuildRequires: llvm%{llvm_major}
|
||||
BuildRequires: llvm%{llvm_major}-devel
|
||||
%endif
|
||||
BuildRequires: memory-constraints
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: pkgconfig
|
||||
@@ -131,16 +118,13 @@ Requires: %{name}-ghc-devel = %{version}-%{release}
|
||||
Requires: %{name}-ghc-heap-devel = %{version}-%{release}
|
||||
Requires: %{name}-ghci-devel = %{version}-%{release}
|
||||
Requires: %{name}-hpc-devel = %{hpc_ver}-%{release}
|
||||
Recommends: %{name}-compiler-default = %{version}-%{release}
|
||||
%if %{without ghc_debuginfo}
|
||||
%undefine _enable_debug_packages
|
||||
%endif
|
||||
%if %{with manual}
|
||||
BuildRequires: python3-Sphinx
|
||||
%endif
|
||||
%if %{with_libnuma}
|
||||
BuildRequires: libnuma-devel
|
||||
%endif
|
||||
%if %{with haddock}
|
||||
Suggests: %{name}-doc = %{version}-%{release}
|
||||
Suggests: %{name}-doc-index = %{version}-%{release}
|
||||
@@ -172,13 +156,20 @@ Haskell home page at <http://www.haskell.org/>.
|
||||
%package compiler
|
||||
Summary: GHC compiler and utilities
|
||||
License: BSD-3-Clause
|
||||
Requires: %{name}-filesystem = %{version}-%{release}
|
||||
Requires: gcc
|
||||
Requires: ghc-base-devel = %{base_ver}-%{release}
|
||||
Requires: %{name}-filesystem = %{version}-%{release}
|
||||
Provides: hsc2hs = %{hsc2hs_ver}-%{release}
|
||||
%ifarch riscv64 s390x
|
||||
Obsoletes: %{name}-ghc-internal < 9.1202.0-%{release}
|
||||
Obsoletes: %{name}-ghc-internal-devel < 9.1202.0-%{release}
|
||||
Obsoletes: %{name}-ghc-internal-doc < 9.1202.0-%{release}
|
||||
Obsoletes: %{name}-ghc-internal-prof < 9.1202.0-%{release}
|
||||
%ifarch %{ghc_llvm_archs}
|
||||
Requires: clang%{llvm_major}
|
||||
Requires: llvm%{llvm_major}
|
||||
%else
|
||||
Suggests: clang%{llvm_major}
|
||||
Suggests: llvm%{llvm_major}
|
||||
%endif
|
||||
|
||||
%description compiler
|
||||
@@ -192,6 +183,7 @@ To install all of GHC install package ghc.
|
||||
%package doc
|
||||
Summary: Haskell library documentation meta package
|
||||
License: BSD-3-Clause
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
Installing this package causes %{name}-*-doc packages corresponding to
|
||||
@@ -216,6 +208,7 @@ This package provides some common directories used for
|
||||
Haskell libraries documentation.
|
||||
%endif
|
||||
|
||||
|
||||
%if %{with manual}
|
||||
%package manual
|
||||
Summary: GHC manual
|
||||
@@ -227,48 +220,54 @@ BuildArch: noarch
|
||||
This package provides the User Guide and Haddock manual.
|
||||
%endif
|
||||
|
||||
|
||||
%global ghc_version_override %{version}
|
||||
%global ghc_pkg_c_deps ghc-compiler = %{ghc_version_override}-%{release}
|
||||
%global version %{ghc_version_override}
|
||||
%if %{with_libnuma}
|
||||
%define libnuma_dep ,libnuma-devel
|
||||
%else
|
||||
%define libnuma_dep %{nil}
|
||||
%endif
|
||||
#!ForceMultiversion
|
||||
%ghc_lib_subpackage -d Cabal-3.10.3.0
|
||||
%ghc_lib_subpackage -d Cabal-syntax-3.10.3.0
|
||||
%ghc_lib_subpackage -d Cabal-%{cabal_ver}
|
||||
%ghc_lib_subpackage -d Cabal-syntax-%{cabal_ver}
|
||||
%ghc_lib_subpackage -d array-0.5.8.0
|
||||
%ghc_lib_subpackage -d -c gmp-devel,libffi-devel,libdw-devel,libelf-devel%{libnuma_dep} base-%{base_ver}
|
||||
%ghc_lib_subpackage -d binary-0.8.9.1
|
||||
%ghc_lib_subpackage -d -x ghc-bignum-%{ghc_bignum_ver}
|
||||
%ghc_lib_subpackage -d bytestring-0.12.1.0
|
||||
%ghc_lib_subpackage -d containers-0.6.8
|
||||
%ghc_lib_subpackage -d -c gmp-devel,libffi-devel,libdw-devel,libelf-devel,libnuma-devel base-%{base_ver}
|
||||
%ghc_lib_subpackage -d binary-0.8.9.3
|
||||
%ghc_lib_subpackage -d bytestring-0.12.2.0
|
||||
%ghc_lib_subpackage -d containers-0.7
|
||||
%ghc_lib_subpackage -d deepseq-1.5.1.0
|
||||
%ghc_lib_subpackage -d directory-1.3.8.5
|
||||
%ghc_lib_subpackage -d exceptions-0.10.7
|
||||
%ghc_lib_subpackage -d filepath-1.4.200.1
|
||||
%ghc_lib_subpackage -d directory-1.3.9.0
|
||||
%ghc_lib_subpackage -d exceptions-0.10.9
|
||||
%ghc_lib_subpackage -d filepath-1.5.4.0
|
||||
%ghc_lib_subpackage -d -x ghc-%{ghc_version_override}
|
||||
%ghc_lib_subpackage -d -x ghc-bignum-%{ghc_bignum_ver}
|
||||
%ghc_lib_subpackage -d -x ghc-boot-%{ghc_version_override}
|
||||
%ghc_lib_subpackage -d ghc-boot-th-%{ghc_version_override}
|
||||
%ghc_lib_subpackage -d -x ghc-compact-%{ghc_compact_ver}
|
||||
%ghc_lib_subpackage -d ghc-experimental-%{ghc_ver_for_lib}
|
||||
%ghc_lib_subpackage -d ghc-internal-%{ghc_ver_for_lib}
|
||||
%ghc_lib_subpackage -d -x ghc-heap-%{ghc_version_override}
|
||||
%ghc_lib_subpackage -d -x ghci-%{ghc_version_override}
|
||||
%ghc_lib_subpackage -d haskeline-0.8.2.1
|
||||
%ghc_lib_subpackage -d -x hpc-%{hpc_ver}
|
||||
%ghc_lib_subpackage -d mtl-2.3.1
|
||||
%ghc_lib_subpackage -d parsec-3.1.17.0
|
||||
%ghc_lib_subpackage -d parsec-3.1.18.0
|
||||
%ghc_lib_subpackage -d pretty-1.1.3.6
|
||||
%ghc_lib_subpackage -d process-1.6.25.0
|
||||
%ghc_lib_subpackage -d semaphore-compat-1.0.0
|
||||
%ghc_lib_subpackage -d stm-2.5.3.1
|
||||
%ghc_lib_subpackage -d template-haskell-2.21.0.0
|
||||
%ghc_lib_subpackage -d -c ncurses-devel terminfo-0.4.1.6
|
||||
%ghc_lib_subpackage -d text-2.1.1
|
||||
%ghc_lib_subpackage -d time-1.12.2
|
||||
%ghc_lib_subpackage -d transformers-0.6.1.0
|
||||
%ghc_lib_subpackage -d unix-2.8.4.0
|
||||
%ghc_lib_subpackage -d xhtml-3000.2.2.1
|
||||
%ghc_lib_subpackage -d semaphore-compat-1.0.0
|
||||
%ghc_lib_subpackage -d template-haskell-2.23.0.0
|
||||
%ghc_lib_subpackage -d -c ncurses-devel terminfo-0.4.1.7
|
||||
%ghc_lib_subpackage -d text-2.1.2
|
||||
%ghc_lib_subpackage -d time-1.14
|
||||
%ghc_lib_subpackage -d transformers-0.6.1.2
|
||||
%ghc_lib_subpackage -d unix-2.8.6.0
|
||||
%ghc_lib_subpackage -d xhtml-%{xhtml_ver}
|
||||
# new in 9.10
|
||||
%ghc_lib_subpackage -d os-string-2.0.7
|
||||
%ghc_lib_subpackage -d ghc-toolchain-0.1.0.0
|
||||
%ghc_lib_subpackage -d ghc-platform-0.1.0.0
|
||||
# new in 9.12
|
||||
%ghc_lib_subpackage -d haddock-library-1.11.0
|
||||
%ghc_lib_subpackage -d haddock-api-%{haddock_api_ver}
|
||||
%ghc_lib_subpackage -d file-io-0.1.5
|
||||
|
||||
%global version %{ghc_version_override}
|
||||
|
||||
@@ -298,28 +297,27 @@ Installing this package causes %{name}-*-prof packages corresponding to
|
||||
%setup -q
|
||||
%patch -P 1 -p1
|
||||
%patch -P 2 -p1
|
||||
%ifarch s390x
|
||||
cd libraries/Cabal
|
||||
%patch -P 3 -p1
|
||||
%endif
|
||||
%patch -P 100 -p1
|
||||
%patch -P 101 -p1
|
||||
%ifarch ppc64le s390x riscv64
|
||||
cd ../..
|
||||
|
||||
%ifarch ppc64le s390x
|
||||
%patch -P 200 -p1
|
||||
%endif
|
||||
|
||||
%patch -P 400 -p1
|
||||
%patch -P 500 -p1
|
||||
|
||||
rm libffi-tarballs/libffi-*.tar.gz
|
||||
|
||||
%build
|
||||
cp %{SOURCE4} ./
|
||||
hadrian/bootstrap/bootstrap.py --bootstrap-sources 9_4_4-bootstrap-sources.tar.gz
|
||||
|
||||
%global hadrian _build/bin/hadrian
|
||||
|
||||
%ghc_set_gcc_flags
|
||||
|
||||
export CC=%{_bindir}/gcc
|
||||
export LD=%{_bindir}/ld
|
||||
export LANG=C.utf8
|
||||
export CC=%{_bindir}/gcc
|
||||
export LLC=%{_bindir}/llc-%{llvm_major}
|
||||
export OPT=%{_bindir}/opt-%{llvm_major}
|
||||
export LD=%{_bindir}/ld
|
||||
|
||||
autoupdate
|
||||
|
||||
@@ -331,7 +329,7 @@ python3 boot.source --hadrian
|
||||
--libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} \
|
||||
--sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \
|
||||
--docdir=%{_docdir}/%{name}-%{version} \
|
||||
--with-system-libffi \
|
||||
--with-system-libffi --disable-ld-override \
|
||||
%ifarch %{ghc_unregisterized_arches}
|
||||
--enable-unregisterised \
|
||||
%endif
|
||||
@@ -344,17 +342,21 @@ python3 boot.source --hadrian
|
||||
%endif
|
||||
%define hadrian_docs %{!?with_haddock:--docs=no-haddocks} %{!?with_manual:--docs=no-sphinx}%{?with_manual:--docs=no-sphinx-pdfs --docs=no-sphinx-man}
|
||||
|
||||
%if 0%{?suse_version} >= 1500
|
||||
%ifarch %{unregisterised_archs}
|
||||
%limit_build -m 8000
|
||||
%else
|
||||
%limit_build -m 2000
|
||||
%ifarch aarch64
|
||||
%global hadrian_workaround "stage1.*.ghc.*.opts += -finter-module-far-jumps"
|
||||
%endif
|
||||
%global jobs_nr %{?_smp_mflags}
|
||||
|
||||
%if %{with quickbuild}
|
||||
%global hadrian_flavor quick+no_profiled_libs
|
||||
%else
|
||||
%global jobs_nr -j1
|
||||
%ifarch s390x
|
||||
%global hadrian_flavor quick
|
||||
%else
|
||||
%global hadrian_flavor release
|
||||
%endif
|
||||
%{hadrian} %{jobs_nr} --flavour=%{?with_quickbuild:quick+no_profiled_libs}%{!?with_quickbuild:perf%{!?with_ghc_prof:+no_profiled_libs}}%{?hadrian_llvm} %{hadrian_docs} binary-dist-dir --hash-unit-ids
|
||||
%endif
|
||||
|
||||
hadrian %{?_smp_mflags} --flavour=%{hadrian_flavor}%{!?with_ghc_prof:+no_profiled_libs}%{?hadrian_llvm} %{hadrian_docs} %{?hadrian_workaround} binary-dist-dir --hash-unit-ids
|
||||
|
||||
%install
|
||||
|
||||
@@ -363,48 +365,60 @@ cd _build/bindist/ghc-%{version}-*
|
||||
./configure --prefix=%{buildroot}%{ghclibdir} --bindir=%{buildroot}%{_bindir} --libdir=%{buildroot}%{_libdir} --mandir=%{buildroot}%{_mandir} --docdir=%{buildroot}%{_docdir}/%{name}-%{version}
|
||||
make install
|
||||
)
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
|
||||
echo "%{ghclibplatform}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf
|
||||
|
||||
export LD_PATH=$(realpath %{buildroot}%{ghclibplatform} | sed "s|^%{buildroot}||")
|
||||
echo "${LD_PATH}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf
|
||||
|
||||
# avoid 'E: binary-or-shlib-defines-rpath'
|
||||
for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \; -print); do
|
||||
chrpath -d $i
|
||||
done
|
||||
|
||||
|
||||
%if %{with haddock}
|
||||
# remove short hashes
|
||||
for d in %{buildroot}%{ghc_html_libraries_dir}/*/; do
|
||||
mv $d $(echo $d | sed -e "s/\(.*\)-.*/\\1/")
|
||||
mv $d $(echo $d | sed -e "s/\(.*\)-.*/\\1/")
|
||||
done
|
||||
%endif
|
||||
|
||||
|
||||
# containers src moved to a subdir
|
||||
cp -p libraries/containers/containers/LICENSE libraries/containers/LICENSE
|
||||
# hack for Cabal-syntax/LICENSE
|
||||
mkdir -p libraries/Cabal-syntax
|
||||
cp -p libraries/Cabal/Cabal-syntax/LICENSE libraries/Cabal-syntax
|
||||
# hack for ghc-toolchain
|
||||
mkdir -p libraries/ghc-toolchain
|
||||
cp -p LICENSE libraries/ghc-toolchain
|
||||
# hacks for haddock libs
|
||||
mkdir -p libraries/haddock-api libraries/haddock-library
|
||||
cp -p utils/haddock/haddock-api/LICENSE libraries/haddock-api
|
||||
cp -p utils/haddock/haddock-library/LICENSE libraries/haddock-library
|
||||
|
||||
rm -f %{name}-*.files
|
||||
|
||||
|
||||
# FIXME replace with ghc_subpackages_list
|
||||
for i in %{ghc_packages_list}; do
|
||||
name=$(echo $i | sed -e "s/\(.*\)-.*/\1/")
|
||||
ver=$(echo $i | sed -e "s/.*-\(.*\)/\1/")
|
||||
%ghc_gen_filelists $name $ver
|
||||
echo "%%license libraries/$name/LICENSE" >> %{name}-$name.files
|
||||
name=$(echo $i | sed -e "s/\(.*\)-.*/\1/")
|
||||
ver=$(echo $i | sed -e "s/.*-\(.*\)/\1/")
|
||||
%ghc_gen_filelists $name $ver
|
||||
echo "%%license libraries/$name/LICENSE" >> %{name}-$name.files
|
||||
done
|
||||
|
||||
echo "%%dir %{ghclibdir}" >> %{name}-base%{?_ghcdynlibdir:-devel}.files
|
||||
|
||||
%ghc_gen_filelists ghc %{ghc_version_override}
|
||||
%ghc_gen_filelists ghc-boot %{ghc_version_override}
|
||||
%ghc_gen_filelists ghc-bignum %{ghc_bignum_ver}
|
||||
%ghc_gen_filelists ghc-boot %{ghc_version_override}
|
||||
%ghc_gen_filelists ghc-compact %{ghc_compact_ver}
|
||||
%ghc_gen_filelists ghc-heap %{ghc_version_override}
|
||||
%ghc_gen_filelists ghci %{ghc_version_override}
|
||||
%ghc_gen_filelists hpc %{hpc_ver}
|
||||
|
||||
%ghc_gen_filelists ghc-prim 0.11.0
|
||||
%ghc_gen_filelists ghc-prim 0.13.0
|
||||
%ghc_gen_filelists integer-gmp 1.1
|
||||
%ghc_gen_filelists rts 1.0.2
|
||||
|
||||
@@ -423,13 +437,13 @@ fi
|
||||
|
||||
%if %{with ghc_prof}
|
||||
ls %{buildroot}%{ghclibdir}/bin/ghc-iserv-prof* >> %{name}-base-prof.files
|
||||
ls %{buildroot}%{ghclibdir}/lib/bin/ghc-iserv-prof >> %{name}-base-prof.files
|
||||
echo "%%dir %{ghcliblib}/bin"
|
||||
%endif
|
||||
|
||||
sed -i -e "s|^%{buildroot}||g" %{name}-base*.files
|
||||
sed -i -e "s|%{buildroot}||g" %{buildroot}%{_bindir}/*
|
||||
|
||||
|
||||
%if %{with haddock}
|
||||
rm %{buildroot}%{_docdir}/ghc-%{version}/archives/libraries.html.tar.xz
|
||||
%endif
|
||||
@@ -438,32 +452,28 @@ rm %{buildroot}%{_docdir}/ghc-%{version}/archives/Haddock.html.tar.xz
|
||||
rm %{buildroot}%{_docdir}/ghc-%{version}/archives/users_guide.html.tar.xz
|
||||
%endif
|
||||
|
||||
|
||||
mkdir -p %{buildroot}%{_mandir}/man1
|
||||
install -p -m 0644 %{SOURCE5} %{buildroot}%{_mandir}/man1/ghc-pkg.1
|
||||
install -p -m 0644 %{SOURCE6} %{buildroot}%{_mandir}/man1/haddock.1
|
||||
install -p -m 0644 %{SOURCE7} %{buildroot}%{_mandir}/man1/runghc.1
|
||||
|
||||
|
||||
rm %{buildroot}%{ghclibdir}/lib/package.conf.d/.stamp
|
||||
rm %{buildroot}%{ghclibdir}/lib/package.conf.d/*.conf.copy
|
||||
|
||||
# https://gitlab.haskell.org/ghc/ghc/-/issues/24121
|
||||
rm %{buildroot}%{ghclibdir}/share/doc/%{ghcplatform}/*/LICENSE
|
||||
#rm %{buildroot}%{ghclibdir}/share/doc/%{ghcplatform}/*/LICENSE
|
||||
# something ugly in haddock build it's copy of ghc docu in totaly wrong place, similiary to license files
|
||||
rm -Rf %{buildroot}%{ghclibdir}/share
|
||||
|
||||
(
|
||||
cd %{buildroot}%{ghclibdir}/lib/bin
|
||||
for i in *; do
|
||||
if [ -f %{buildroot}%{ghclibdir}/bin/$i ]; then
|
||||
ln -sf ../../bin/$i
|
||||
fi
|
||||
done
|
||||
)
|
||||
|
||||
%check
|
||||
# Actually, I took this from Jens Petersen's Fedora package
|
||||
# stolen from ghc6/debian/rules:
|
||||
#Do some very simple tests that the compiler actually works
|
||||
export LANG=C.utf8
|
||||
export LD_LIBRARY_PATH=%{buildroot}%{ghclibplatform}:
|
||||
export LD_LIBRARY_PATH=$(realpath %{buildroot}%{ghclibplatform}):
|
||||
GHC=%{buildroot}%{ghclibdir}/bin/ghc
|
||||
# Do some very simple tests that the compiler actually works
|
||||
rm -rf testghc
|
||||
@@ -491,6 +501,7 @@ $GHC --info
|
||||
%ghc_pkg_recache
|
||||
%end
|
||||
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
|
||||
@@ -518,17 +529,18 @@ $GHC --info
|
||||
%dir %{ghcliblib}
|
||||
%dir %{ghcliblib}/%{ghcplatform}
|
||||
%dir %{ghclibdir}/bin
|
||||
%dir %{ghcliblib}/bin
|
||||
%{ghclibdir}/bin/ghc
|
||||
%{ghclibdir}/bin/ghc-iserv
|
||||
%{ghclibdir}/bin/ghc-iserv-dyn
|
||||
%{ghclibdir}/bin/ghc-pkg
|
||||
%{ghclibdir}/bin/ghc-toolchain-bin
|
||||
%{ghclibdir}/bin/hpc
|
||||
%{ghclibdir}/bin/hsc2hs
|
||||
%{ghclibdir}/bin/runghc
|
||||
%{ghclibdir}/bin/hp2ps
|
||||
%{ghclibdir}/bin/unlit
|
||||
%{ghclibdir}/bin/ghc-%{version}
|
||||
%{ghclibdir}/bin/ghc-toolchain-bin-ghc-%{version}
|
||||
%{ghclibdir}/bin/ghc-iserv-ghc-%{version}
|
||||
%{ghclibdir}/bin/ghc-iserv-dyn-ghc-%{version}
|
||||
%{ghclibdir}/bin/ghc-pkg-%{version}
|
||||
@@ -541,14 +553,14 @@ $GHC --info
|
||||
%{ghclibdir}/bin/runhaskell
|
||||
%{ghclibdir}/bin/runhaskell-%{version}
|
||||
%{ghclibdir}/bin/unlit-ghc-%{version}
|
||||
%{ghclibdir}/lib/bin/ghc-iserv
|
||||
%{ghclibdir}/lib/bin/ghc-iserv-dyn
|
||||
%{ghclibdir}/lib/bin/unlit
|
||||
%{ghcliblib}/ghc-interp.js
|
||||
%{ghcliblib}/ghc-usage.txt
|
||||
%{ghcliblib}/ghci-usage.txt
|
||||
%{ghcliblib}/llvm-passes
|
||||
%{ghcliblib}/llvm-targets
|
||||
%{ghcliblib}/post-link.mjs
|
||||
%{ghcliblib}/prelude.mjs
|
||||
%{ghcliblib}/dyld.mjs
|
||||
%dir %{ghcliblib}/package.conf.d
|
||||
%ghost %{ghcliblib}/package.conf.d/package.cache
|
||||
%{ghcliblib}/package.conf.d/package.cache.lock
|
||||
|
||||
24
gnu23-hp2ps.patch
Normal file
24
gnu23-hp2ps.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
Index: ghc-9.12.2/utils/hp2ps/Utilities.c
|
||||
===================================================================
|
||||
--- ghc-9.12.2.orig/utils/hp2ps/Utilities.c
|
||||
+++ ghc-9.12.2/utils/hp2ps/Utilities.c
|
||||
@@ -1,10 +1,9 @@
|
||||
#include "Main.h"
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "Error.h"
|
||||
|
||||
-extern void* malloc();
|
||||
-
|
||||
char*
|
||||
Basename(char *name)
|
||||
{
|
||||
@@ -89,7 +88,6 @@ void *
|
||||
xrealloc(void *p, size_t n)
|
||||
{
|
||||
void *r;
|
||||
- extern void *realloc();
|
||||
|
||||
r = realloc(p, n);
|
||||
if (!r) {
|
||||
Reference in New Issue
Block a user