From 60a661259b2a56e4cc689b9d5a374cd9c1d15728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 22 Nov 2009 00:22:47 +0000 Subject: [PATCH] glibc 2.11: Try to fix link errors for `nscd'. svn path=/nixpkgs/branches/stdenv-updates/; revision=18513 --- pkgs/development/libraries/glibc-2.11/default.nix | 7 +++---- .../libraries/glibc-2.11/stack-protector-link.patch | 12 ++++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 pkgs/development/libraries/glibc-2.11/stack-protector-link.patch diff --git a/pkgs/development/libraries/glibc-2.11/default.nix b/pkgs/development/libraries/glibc-2.11/default.nix index 4a5f651f19b..1eac67fea65 100644 --- a/pkgs/development/libraries/glibc-2.11/default.nix +++ b/pkgs/development/libraries/glibc-2.11/default.nix @@ -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}" diff --git a/pkgs/development/libraries/glibc-2.11/stack-protector-link.patch b/pkgs/development/libraries/glibc-2.11/stack-protector-link.patch new file mode 100644 index 00000000000..7ef329a0980 --- /dev/null +++ b/pkgs/development/libraries/glibc-2.11/stack-protector-link.patch @@ -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