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
)
td class='form'>
Age | Commit message (Collapse) | Author |
|
* .mailmap: Add entry to Evgeny Pisemsky.
* gnu/packages/emacs-xyz.scm, gnu/packages/engineering.scm,
gnu/packages/guile-xyz.scm, gnu/packages/hardware.scm,
gnu/packages/perl.scm, gnu/packages/python-xyz.scm,
gnu/packages/sdl.scm, gnu/packages/web.scm: Adjust copyright line.
Change-Id: I9a10be1ee7cc164f18d826b51348ee26eee2ca4b
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
|
|
* .mailmap: Add entry for Tomas Volf.
Change-Id: I0a8b43b3b7f71c3020f96118adcbad8937a290fb
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
|
|
* .mailmap: Add an entry for Juliana.
* gnu/packages/admin.scm, gnu/packages/audio.scm,
gnu/packages/build-tools.scm, gnu/packages/scheme.scm: Update Juliana's email.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
* .mailmap: Add entry for Zheng Junjie.
|
|
Use full names everywhere.
* .mailmap: Use full name for Liliana Marie Prikler.
* gnu/packages/zig.scm: Likewise.
|
|
* .mailmap: Add entry for Liliana Marie Prikler.
|
|
* .mailmap: Alias all my contributions to the same identity.
|
|
* .mailmap: Add entry for Christine Lemmer-Webber.
|
|
* .mailmap: Change name for Matthew James Kraai.
* gnu/packages/lisp-xyz.scm, gnu/packages/python-xyz.scm,
gnu/packages/rust.scm: Likewise.
Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
|
* gnu/packages/algebra.scm (sollya): New variable.
* .mailmap: Adjust "proper email" for `git commit`.
|
|
* .mailmap: Remove obsolete email for Kei.
|