]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/glibc-resolv-stack_chk_fail.patch
Update libvirt to 2.1
[ipfire-2.x.git] / src / patches / glibc-resolv-stack_chk_fail.patch
CommitLineData
12788f63
MT
1From e057a1b5930ec538c2b8abbba700a436ef2c81d5 Mon Sep 17 00:00:00 2001
2From: Joseph Myers <joseph@codesourcery.com>
3Date: Wed, 21 Sep 2011 13:27:50 -0700
4Subject: [PATCH] Link libresolv.so with ld.so for __stack_chk_guard.
5
6---
7 resolv/Makefile | 8 +++++++-
8 1 files changed, 7 insertions(+), 1 deletions(-)
9
10diff --git a/resolv/Makefile b/resolv/Makefile
11index ec3788f..b4287de 100644
12--- a/resolv/Makefile
13+++ b/resolv/Makefile
14@@ -1,4 +1,5 @@
15-# Copyright (C) 1994-2001,2003,2004,2007,2008 Free Software Foundation, Inc.
16+# Copyright (C) 1994-2001,2003,2004,2007,2008,2011
17+# Free Software Foundation, Inc.
18 # This file is part of the GNU C Library.
19
20 # The GNU C Library is free software; you can redistribute it and/or
21@@ -88,6 +89,11 @@ CFLAGS-res_hconf.c = -fexceptions
22 # This ensures they will load libc.so for needed symbols if loaded by
23 # a statically-linked program that hasn't already loaded it.
24 $(objpfx)libresolv.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
25+# Some hosts need '__stack_chk_guard', so pull in the definition from
26+# ld.so if required.
27+ifeq (yesyes,$(have-ssp)$(elf))
28+LDLIBS-resolv.so += $(as-needed) $(elfobjdir)/ld.so $(no-as-needed)
29+endif
30
31 # The DNS NSS modules needs the resolver.
32 $(objpfx)libnss_dns.so: $(objpfx)libresolv.so $(common-objpfx)libc.so \
33--
341.7.3.4
35