mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: ghc-9.2: Remove unneeded glibc 2.33 patch.
* gnu/packages/patches/ghc-9.2-glibc-2.33-link-order.patch: Remove. * gnu/local.mk (dist_patch_DATA): Unregister. * gnu/packages/haskell.scm (ghc-9.2): Remove patch use. Change-Id: I7d305dadb627f6af55e4a5faabfc835e4a78a05b
This commit is contained in:
parent
a0c1787816
commit
4840707013
3 changed files with 1 additions and 38 deletions
|
@ -1355,7 +1355,6 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/gettext-libunicode-update.patch \
|
||||
%D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \
|
||||
%D%/packages/patches/ghc-9.2-cabal-support-package-path.patch \
|
||||
%D%/packages/patches/ghc-9.2-glibc-2.33-link-order.patch \
|
||||
%D%/packages/patches/ghc-9.2-grep-warnings.patch \
|
||||
%D%/packages/patches/ghc-testsuite-dlopen-pie.patch \
|
||||
%D%/packages/patches/ghc-testsuite-grep-compat.patch \
|
||||
|
|
|
@ -1444,8 +1444,7 @@ (define-public ghc-9.2
|
|||
(sha256
|
||||
(base32
|
||||
"18b7ln4gx2vy62jpv3z5slv3zfxmxnmkgajznks15zglddwd24sz"))
|
||||
(patches (search-patches "ghc-9.2-glibc-2.33-link-order.patch"
|
||||
"ghc-9.2-cabal-support-package-path.patch"))))
|
||||
(patches (search-patches "ghc-9.2-cabal-support-package-path.patch"))))
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments base)
|
||||
((#:phases phases '%standard-phases)
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
Slightly modified version of
|
||||
https://gitlab.haskell.org/ghc/ghc/-/issues/19029#note_447989, required
|
||||
for older, buggy glibc versions < 2.34.
|
||||
|
||||
diff -Naur ghc-9.2.5/compiler/GHC/Linker/Unit.hs ghc-9.2.5.patched/compiler/GHC/Linker/Unit.hs
|
||||
--- ghc-9.2.5/compiler/GHC/Linker/Unit.hs 2022-11-06 20:40:29.000000000 +0100
|
||||
+++ ghc-9.2.5.patched/compiler/GHC/Linker/Unit.hs 2023-01-15 14:52:57.511275338 +0100
|
||||
@@ -31,11 +31,26 @@
|
||||
ps <- mayThrowUnitErr $ preloadUnitsInfo' unit_env pkgs
|
||||
return (collectLinkOpts dflags ps)
|
||||
|
||||
+fixOrderLinkOpts :: [String] -> [String]
|
||||
+fixOrderLinkOpts opts
|
||||
+ | have_bad_glibc_version -- glibc version strictly less than 2.34
|
||||
+ , let (before, rest) = break (== libc) opts
|
||||
+ , not (pthread `elem` before)
|
||||
+ , pthread `elem` rest -- optional if we know pthread is definitely present
|
||||
+ = before ++ pthread_and_deps ++ rest
|
||||
+ | otherwise
|
||||
+ = opts
|
||||
+ where
|
||||
+ pthread = "-lpthread"
|
||||
+ libc = "-lc"
|
||||
+ pthread_and_deps = [ "-lrt", pthread ] -- should depend on the environment
|
||||
+ have_bad_glibc_version = True
|
||||
+
|
||||
collectLinkOpts :: DynFlags -> [UnitInfo] -> ([String], [String], [String])
|
||||
collectLinkOpts dflags ps =
|
||||
(
|
||||
concatMap (map ("-l" ++) . unitHsLibs (ghcNameVersion dflags) (ways dflags)) ps,
|
||||
- concatMap (map ("-l" ++) . map ST.unpack . unitExtDepLibsSys) ps,
|
||||
+ fixOrderLinkOpts $ concatMap (map ("-l" ++) . map ST.unpack . unitExtDepLibsSys) ps,
|
||||
concatMap (map ST.unpack . unitLinkerOptions) ps
|
||||
)
|
||||
|
Loading…
Reference in a new issue