diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-11-16 23:14:28 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-11-16 23:14:28 +0100 |
commit | 13990c7343b93190716edb967ecd0159ddc1b6d9 (patch) | |
tree | 0f0469ec5ba749cfdabdd191bad0b987f06b879a | |
parent | 127ed6a9ddcaaec56e88b717892e74e3840584ef (diff) | |
download | gnu-guix-13990c7343b93190716edb967ecd0159ddc1b6d9.tar gnu-guix-13990c7343b93190716edb967ecd0159ddc1b6d9.tar.gz |
gnu: glibc: Really disable 'ldconfig' and /etc/ld.so.cache.
* gnu/packages/base.scm (glibc): Add 'snippet' to set use_ldconfig=no.
Remove "glibc-no-ld-so-cache.patch"; that patch would still build
'ldconfig', and ld.so would still contain ld.so.cache-related code,
and would look for info in /etc/etc/ld.so.cache (sic).
* gnu/packages/patches/glibc-no-ld-so-cache.patch: Remove.
* gnu-system.am (dist_patch_DATA): Adjust accordingly.
-rw-r--r-- | gnu-system.am | 1 | ||||
-rw-r--r-- | gnu/packages/base.scm | 12 | ||||
-rw-r--r-- | gnu/packages/patches/glibc-no-ld-so-cache.patch | 53 |
3 files changed, 10 insertions, 56 deletions
diff --git a/gnu-system.am b/gnu-system.am index ffb18e8573..20d3e67662 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -232,7 +232,6 @@ dist_patch_DATA = \ gnu/packages/patches/glibc-bootstrap-system.patch \ gnu/packages/patches/glibc-ldd-x86_64.patch \ gnu/packages/patches/glibc-make-4.0.patch \ - gnu/packages/patches/glibc-no-ld-so-cache.patch \ gnu/packages/patches/grub-gets-undeclared.patch \ gnu/packages/patches/gstreamer-0.10-bison3.patch \ gnu/packages/patches/gstreamer-0.10-silly-test.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 0fa7b3f137..d32f617ceb 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -365,9 +365,17 @@ archives.") (sha256 (base32 "18spla703zav8dq9fw7rbzkyv9qfisxb26p7amg1x3wjh7iy3d1c")) + (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. + '(substitute* "sysdeps/unix/sysv/linux/configure" + (("use_ldconfig=yes") + "use_ldconfig=no"))) + (modules '((guix build utils))) + (imported-modules modules) (patches (map search-patch - '("glibc-no-ld-so-cache.patch" - "glibc-ldd-x86_64.patch" + '("glibc-ldd-x86_64.patch" "glibc-make-4.0.patch"))))) (build-system gnu-build-system) diff --git a/gnu/packages/patches/glibc-no-ld-so-cache.patch b/gnu/packages/patches/glibc-no-ld-so-cache.patch deleted file mode 100644 index 75fff50b47..0000000000 --- a/gnu/packages/patches/glibc-no-ld-so-cache.patch +++ /dev/null @@ -1,53 +0,0 @@ -Disable attempts to use the system-wide /etc/ld.so.cache. This is -required on LFS distros to avoid loading the distro's libc.so instead -of ours. - -Patch from Nixpkgs. Idea by Eelco Dolstra, initial patch by Jack -Cummings, minor fixups by Shea Levy. - -diff -Naur glibc-2.13-orig/elf/ldconfig.c glibc-2.13/elf/ldconfig.c ---- glibc-2.13-orig/elf/ldconfig.c 2011-01-17 23:34:07.000000000 -0500 -+++ glibc-2.13/elf/ldconfig.c 2012-04-10 23:28:45.957492340 -0400 -@@ -51,7 +51,7 @@ - #endif - - #ifndef LD_SO_CONF --# define LD_SO_CONF SYSCONFDIR "/ld.so.conf" -+# define LD_SO_CONF PREFIX "/etc/ld.so.conf" - #endif - - /* Get libc version number. */ - ---- glibc-2.16.0/elf/Makefile 2012-06-30 21:12:34.000000000 +0200 -+++ glibc-2.16.0/elf/Makefile 2012-11-12 23:52:21.000000000 +0100 -@@ -415,12 +415,12 @@ $(objpfx)ldconfig: $(ldconfig-modules:%= - - $(objpfx)pldd: $(pldd-modules:%=$(objpfx)%.o) - --SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"' --CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \ -+PREFIX-FLAGS := -D'PREFIX="$(sysconfdir)"' -+CFLAGS-ldconfig.c = $(PREFIX-FLAGS) -D'LIBDIR="$(libdir)"' \ - -D'SLIBDIR="$(slibdir)"' -DIS_IN_ldconfig=1 --CFLAGS-dl-cache.c = $(SYSCONF-FLAGS) --CFLAGS-cache.c = $(SYSCONF-FLAGS) --CFLAGS-rtld.c = $(SYSCONF-FLAGS) -+CFLAGS-dl-cache.c = $(PREFIX-FLAGS) -+CFLAGS-cache.c = $(PREFIX-FLAGS) -+CFLAGS-rtld.c = $(PREFIX-FLAGS) - - CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\ - -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld) - -diff -Naur glibc-2.13-orig/sysdeps/generic/dl-cache.h glibc-2.13/sysdeps/generic/dl-cache.h ---- glibc-2.13-orig/sysdeps/generic/dl-cache.h 2011-01-17 23:34:07.000000000 -0500 -+++ glibc-2.13/sysdeps/generic/dl-cache.h 2012-04-10 23:28:20.077488815 -0400 -@@ -29,7 +29,7 @@ - #endif - - #ifndef LD_SO_CACHE --# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache" -+# define LD_SO_CACHE PREFIX "/etc/ld.so.cache" - #endif - - #ifndef add_system_dir |