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 ) f
path: root/gnu/system/locale.scm
AgeCommit message (Expand)Author
2024-04-29locale: Shrink ‘%default-locale-definitions’ from 34 to 10 locales....This reduces the default set of locales from 92 MiB to 28 MiB. * gnu/system/locale.scm (%default-locale-definitions): Reduce to 10 locales. Change-Id: I3c092604301d69db591957bcfd62a062c3ac5ab0 Ludovic Courtès
2024-04-29system: Remove ‘glibc-2.33’ from ‘%default-locale-libcs’....The transition from glibc 2.33 to 2.35 was done in c919bfefd98bf2e29549539b4e28e6dc2a8a6f32 (one year ago), so we can assume that the backward-compatible locales are no longer needed by default. This removes 92 MiB from the system closure. * gnu/system/locale.scm (%default-locale-libcs): Remove GLIBC-2.33. Change-Id: I85948bbe6b2d424f9f158eeafdb5543688c66c6b Ludovic Courtès
2023-09-16locale: Set %default-locale-definitions to glibc/hurd on the Hurd....* gnu/system/locale.scm (%default-locale-libcs): Use only glib/hurd when building on the Hurd. Janneke Nieuwenhuizen
2023-04-19locale: Add glibc 2.33 to '%default-locale-libcs'....Fixes <https://issues.guix.gnu.org/62934>. Reported by Brian Cully <bjc@spork.org>. * gnu/system/locale.scm (%default-locale-libcs): Add GLIBC-2.33. Ludovic Courtès
2022-01-14system: locale: Use only the current glibc....* gnu/system/locale.scm (%default-locale-libcs): Remove glibc-2.31. Mathieu Othacehe