summaryrefslogtreecommitdiff
path: root/gnu/packages/base.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-11-27 08:53:52 +0100
committerLudovic Courtès <ludo@gnu.org>2020-12-01 21:30:28 +0100
commit52564e99862dc80fa801efd45dbeee6a7478a694 (patch)
tree9b4c7bc225c70b8848001c371f02635ecc952319 /gnu/packages/base.scm
parent53fd256e5ba43e516fb9d6eaf085b88fe8bd12b6 (diff)
downloadguix-patches-52564e99862dc80fa801efd45dbeee6a7478a694.tar
guix-patches-52564e99862dc80fa801efd45dbeee6a7478a694.tar.gz
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'.
Diffstat (limited to 'gnu/packages/base.scm')
-rw-r--r--gnu/packages/base.scm16
1 files changed, 6 insertions, 10 deletions
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.*$")