From 6ab674ebff5e60c62b126d0ac2e774e581916afe Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 19 Oct 2015 13:07:28 -0400 Subject: use -fstack-protector-strong when available With gcc-4.9, a new -fstack-protector-strong flag is available that is between -fstack-protector (pretty weak) and -fstack-protector-all (pretty strong) that provides good trade-offs between overhead but still providing good coverage. Update the places in glibc that use ssp to use this flag when it's available. This also kills off the indirection of hardcoding the flag name in the Makefiles and adding it based on a have-ssp boolean. Instead, the build always expands the $(stack-protector) variable to the best ssp setting. This makes the build logic a bit simpler and allows people to easily set to a diff flag like: make stack-protector=-fstack-protector-all --- resolv/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'resolv/Makefile') diff --git a/resolv/Makefile b/resolv/Makefile index 1dcb75f7c7..add74875c6 100644 --- a/resolv/Makefile +++ b/resolv/Makefile @@ -90,9 +90,7 @@ CPPFLAGS += -Dgethostbyname=res_gethostbyname \ -Dgetnetbyname=res_getnetbyname \ -Dgetnetbyaddr=res_getnetbyaddr -ifeq (yes,$(have-ssp)) -CFLAGS-libresolv += -fstack-protector -endif +CFLAGS-libresolv += $(stack-protector) CFLAGS-res_hconf.c = -fexceptions # The BIND code elicits some harmless warnings. -- cgit v1.2.1