Author: shlevy
Date: Wed Apr 11 04:42:23 2012
New Revision: 33741
URL: https://nixos.org/websvn/nix/?rev=33741&sc=1
Log:
glibc: Don't check /etc/ld.so.cache
Idea by Eelco, initial patch by Jack Cummings, minor fixups by me
Added:
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.13/dont_use_system_ld_so_cache.patch
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.14/dont_use_system_ld_so_cache.patch
Modified:
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.13/builder.sh
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.13/common.nix
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.14/builder.sh
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.14/common.nix
Modified:
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.13/builder.sh
==============================================================================
---
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.13/builder.sh
Tue Apr 10 22:48:27 2012 (r33740)
+++
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.13/builder.sh
Wed Apr 11 04:42:23 2012 (r33741)
@@ -51,11 +51,4 @@
rm -f $out/lib/libgcc_s.so.1
}
-postFixup() {
- # libelf uses gencat, so we need to fix it's rpath so that it doesn't pick
up the system rpath.
- patchelf --set-rpath $out/lib $out/bin/gencat
- # librt (used by acl, used by coreutils) links against pthread, try *not*
to pick up the system one.
- patchelf --set-rpath $out/lib $out/lib/librt-*.so
-}
-
genericBuild
Modified:
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.13/common.nix
==============================================================================
---
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.13/common.nix
Tue Apr 10 22:48:27 2012 (r33740)
+++
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.13/common.nix
Wed Apr 11 04:42:23 2012 (r33741)
@@ -75,6 +75,9 @@
/* Allow nixos and nix handle the locale-archive. */
./nix-locale-archive.patch
+ /* don't use /etc/ld.so.cache, for non-nixos systems */
+ ./dont_use_system_ld_so_cache.patch
+
/* Without this patch many KDE binaries crash. */
./glibc-elf-localscope.patch
] ++ stdenv.lib.optional installLocales ./catalan-firstdays.patch;
Added:
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.13/dont_use_system_ld_so_cache.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.13/dont_use_system_ld_so_cache.patch
Wed Apr 11 04:42:23 2012 (r33741)
@@ -0,0 +1,43 @@
+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. */
+diff -Naur glibc-2.13-orig/elf/Makefile glibc-2.13/elf/Makefile
+--- glibc-2.13-orig/elf/Makefile 2011-01-17 23:34:07.000000000 -0500
++++ glibc-2.13/elf/Makefile 2012-04-10 23:27:05.666477442 -0400
+@@ -459,11 +459,11 @@
+ $(objpfx)sprof: $(libdl)
+
+ $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
+-SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
+-CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
++PREFIX-FLAGS := -D'PREFIX="$(prefix)"'
++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-dl-cache.c = $(PREFIX-FLAGS)
++CFLAGS-cache.c = $(PREFIX-FLAGS)
+
+ CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst
%,%.os,$(all-rtld-routines))),-DNOT_IN_libc=1 -DIS_IN_rtld=1)
+
+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
Modified:
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.14/builder.sh
==============================================================================
---
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.14/builder.sh
Tue Apr 10 22:48:27 2012 (r33740)
+++
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.14/builder.sh
Wed Apr 11 04:42:23 2012 (r33741)
@@ -51,12 +51,4 @@
rm -f $out/lib/libgcc_s.so.1
}
-postFixup() {
- # libelf uses gencat, so we need to fix it's rpath so that it doesn't pick
up the system rpath.
- patchelf --set-rpath $out/lib $out/bin/gencat
- # librt (used by acl, used by coreutils) links against pthread, try *not*
to pick up the system one.
- patchelf --set-rpath $out/lib $out/lib/librt-*.so
-}
-
-
genericBuild
Modified:
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.14/common.nix
==============================================================================
---
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.14/common.nix
Tue Apr 10 22:48:27 2012 (r33740)
+++
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.14/common.nix
Wed Apr 11 04:42:23 2012 (r33741)
@@ -75,6 +75,9 @@
/* Allow nixos and nix handle the locale-archive. */
./nix-locale-archive.patch
+ /* don't use /etc/ld.so.cache, for non-nixos systems */
+ ./dont_use_system_ld_so_cache.patch
+
/* Without this patch many KDE binaries crash. */
./glibc-elf-localscope.patch
];
Added:
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.14/dont_use_system_ld_so_cache.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/glibc/2.14/dont_use_system_ld_so_cache.patch
Wed Apr 11 04:42:23 2012 (r33741)
@@ -0,0 +1,43 @@
+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. */
+diff -Naur glibc-2.13-orig/elf/Makefile glibc-2.13/elf/Makefile
+--- glibc-2.13-orig/elf/Makefile 2011-01-17 23:34:07.000000000 -0500
++++ glibc-2.13/elf/Makefile 2012-04-10 23:27:05.666477442 -0400
+@@ -459,11 +459,11 @@
+ $(objpfx)sprof: $(libdl)
+
+ $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
+-SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
+-CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
++PREFIX-FLAGS := -D'PREFIX="$(prefix)"'
++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-dl-cache.c = $(PREFIX-FLAGS)
++CFLAGS-cache.c = $(PREFIX-FLAGS)
+
+ CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst
%,%.os,$(all-rtld-routines))),-DNOT_IN_libc=1 -DIS_IN_rtld=1)
+
+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
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits