* [PATCH] Build libresolv with stack protector
@ 2011-08-15 13:37 Andreas Schwab
0 siblings, 0 replies; only message in thread
From: Andreas Schwab @ 2011-08-15 13:37 UTC (permalink / raw)
To: libc-hacker
2011-08-15 Andreas Schwab <schwab@redhat.com>
* resolv/Makefile (libresolv-cflags): Define and add it to CFLAGS
for libresolv modules.
---
resolv/Makefile | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/resolv/Makefile b/resolv/Makefile
index 42e3505..3ab9d5a 100644
--- a/resolv/Makefile
+++ b/resolv/Makefile
@@ -1,4 +1,4 @@
-# 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
@@ -76,6 +76,29 @@ CPPFLAGS += -Dgethostbyname=res_gethostbyname \
-Dgetnetbyname=res_getnetbyname \
-Dgetnetbyaddr=res_getnetbyaddr
+ifeq (yes,$(have-ssp))
+libresolv-cflags += -fstack-protector
+endif
+
+CFLAGS-gethnamaddr.c += $(libresolv-cflags)
+CFLAGS-res_comp.c += $(libresolv-cflags)
+CFLAGS-res_debug.c += $(libresolv-cflags)
+CFLAGS-res_data.c += $(libresolv-cflags)
+CFLAGS-res_mkquery.c += $(libresolv-cflags)
+CFLAGS-res_query.c += $(libresolv-cflags)
+CFLAGS-res_send.c += $(libresolv-cflags)
+CFLAGS-inet_net_ntop.c += $(libresolv-cflags)
+CFLAGS-inet_net_pton.c += $(libresolv-cflags)
+CFLAGS-inet_neta.c += $(libresolv-cflags)
+CFLAGS-base64.c += $(libresolv-cflags)
+CFLAGS-ns_parse.c += $(libresolv-cflags)
+CFLAGS-ns_name.c += $(libresolv-cflags)
+CFLAGS-ns_netint.c += $(libresolv-cflags)
+CFLAGS-ns_ttl.c += $(libresolv-cflags)
+CFLAGS-ns_print.c += $(libresolv-cflags)
+CFLAGS-ns_samedomain.c += $(libresolv-cflags)
+CFLAGS-ns_date.c += $(libresolv-cflags)
+
CFLAGS-res_hconf.c = -fexceptions
# The BIND code elicits some harmless warnings.
--
1.7.6
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-08-15 13:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-15 13:37 [PATCH] Build libresolv with stack protector Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).