about summary refs log tree commit diff
path: root/resolv/Makefile
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2011-09-21 13:27:50 -0700
committerRoland McGrath <mcgrathr@chromium.org>2011-09-21 13:27:50 -0700
commite057a1b5930ec538c2b8abbba700a436ef2c81d5 (patch)
tree8792ce79da59c83ffddecbf5a2e4a5fd5ce69c01 /resolv/Makefile
parentecb1482ffd85fd3279642b1dc045aa867ad4d415 (diff)
downloadglibc-e057a1b5930ec538c2b8abbba700a436ef2c81d5.tar.gz
glibc-e057a1b5930ec538c2b8abbba700a436ef2c81d5.tar.xz
glibc-e057a1b5930ec538c2b8abbba700a436ef2c81d5.zip
Link libresolv.so with ld.so for __stack_chk_guard.
Diffstat (limited to 'resolv/Makefile')
-rw-r--r--resolv/Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/resolv/Makefile b/resolv/Makefile
index ec3788faeb..b4287dec0b 100644
--- a/resolv/Makefile
+++ b/resolv/Makefile
@@ -1,4 +1,5 @@
-# Copyright (C) 1994-2001,2003,2004,2007,2008 Free Software Foundation, Inc.
+# Copyright (C) 1994-2001,2003,2004,2007,2008,2011
+#	Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -88,6 +89,11 @@ CFLAGS-res_hconf.c = -fexceptions
 # This ensures they will load libc.so for needed symbols if loaded by
 # a statically-linked program that hasn't already loaded it.
 $(objpfx)libresolv.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
+# Some hosts need '__stack_chk_guard', so pull in the definition from
+# ld.so if required.
+ifeq (yesyes,$(have-ssp)$(elf))
+LDLIBS-resolv.so += $(as-needed) $(elfobjdir)/ld.so $(no-as-needed)
+endif
 
 # The DNS NSS modules needs the resolver.
 $(objpfx)libnss_dns.so: $(objpfx)libresolv.so $(common-objpfx)libc.so \