From 52564e99862dc80fa801efd45dbeee6a7478a694 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 27 Nov 2020 08:53:52 +0100 Subject: gnu: glibc: Load 'etc/ld.so.cache' in $ORIGIN's store item when available. * gnu/packages/patches/glibc-dl-cache.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/base.scm (glibc)[source]: Remove 'snippet' and 'modules'. [arguments]: In 'pre-configure' phase, substitute @STORE_DIRECTORY@ in 'elf/dl-cache.c'. --- gnu/packages/base.scm | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index afd772488e..ab90dbd816 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -675,17 +675,8 @@ the store.") (sha256 (base32 "0di848ibffrnwq7g2dvgqrnn4xqhj3h96csn69q4da51ymafl9qn")) - (snippet - ;; Disable 'ldconfig' and /etc/ld.so.cache. The latter is - ;; required on LFS distros to avoid loading the distro's libc.so - ;; instead of ours. - '(begin - (substitute* "sysdeps/unix/sysv/linux/configure" - (("use_ldconfig=yes") - "use_ldconfig=no")) - #t)) - (modules '((guix build utils))) (patches (search-patches "glibc-ldd-x86_64.patch" + "glibc-dl-cache.patch" "glibc-hidden-visibility-ldconfig.patch" "glibc-versioned-locpath.patch" "glibc-allow-kernel-2.6.32.patch" @@ -800,6 +791,11 @@ the store.") ;; 4.7.1. ((" -lgcc_s") "")) + ;; Tell the ld.so cache code where the store is. + (substitute* "elf/dl-cache.c" + (("@STORE_DIRECTORY@") + (string-append "\"" (%store-directory) "\""))) + ;; Have `system' use that Bash. (substitute* "sysdeps/posix/system.c" (("#define[[:blank:]]+SHELL_PATH.*$") -- cgit v1.2.3