glibc 2.11: Try to fix link errors for `nscd'.

svn path=/nixpkgs/branches/stdenv-updates/; revision=18513
This commit is contained in:
Ludovic Courtès 2009-11-22 00:22:47 +00:00
parent 3548887c27
commit 60a661259b
2 changed files with 15 additions and 4 deletions

View File

@ -53,15 +53,14 @@ stdenv.mkDerivation rec {
/* Have rpcgen(1) look for cpp(1) in $PATH. */
./rpcgen-path.patch
/* Make sure `nscd' et al. are linked against `libssp'. */
./stack-protector-link.patch
];
configureFlags = [
"--enable-add-ons"
"--with-headers=${kernelHeaders}/include"
/* Make sure `nscd' et al. are linked against `libssp'. */
"LDFLAGS=-fstack-protector"
(if profilingLibraries then "--enable-profile" else "--disable-profile")
] ++ stdenv.lib.optionals (cross != null) [
"--host=${cross.config}"

View File

@ -0,0 +1,12 @@
Make sure `nscd' et al. are linked against `libssp'.
--- glibc-2.11/nscd/Makefile 2009-10-30 18:17:08.000000000 +0100
+++ glibc-2.11/nscd/Makefile 2009-11-22 01:19:37.000000000 +0100
@@ -126,6 +126,7 @@ CFLAGS-res_hconf.c += $(nscd-cflags)
ifeq (yesyes,$(have-fpie)$(build-shared))
relro-LDFLAGS += -Wl,-z,now
+$(objpfx)nscd: LDFLAGS += -fstack-protector
$(objpfx)nscd: $(addprefix $(objpfx),$(nscd-modules:=.o))
$(+link-pie)
endif