From cecbc7967f0bcac718b6f8f8942b58403c0e917c Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Mon, 26 Dec 2016 10:09:10 +0100 Subject: Enable -fstack-protector=* when requested by configure [BZ #7065] --- Makeconfig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Makeconfig') diff --git a/Makeconfig b/Makeconfig index 2d316ac..0158eaa 100644 --- a/Makeconfig +++ b/Makeconfig @@ -807,6 +807,11 @@ endif # disable any optimization that assume default rounding mode. +math-flags = -frounding-math +# We might want to compile with some stack-protection flag. +ifneq ($(stack-protector),) ++stack-protector=$(stack-protector) +endif + # This is the program that generates makefile dependencies from C source files. # The -MP flag tells GCC >= 3.2 (which we now require) to produce dummy # targets for headers so that removed headers don't break the build. @@ -866,7 +871,8 @@ ifeq "$(strip $(+cflags))" "" +cflags := $(default_cflags) endif # $(+cflags) == "" -+cflags += $(cflags-cpu) $(+gccwarn) $(+merge-constants) $(+math-flags) ++cflags += $(cflags-cpu) $(+gccwarn) $(+merge-constants) $(+math-flags) \ + $(+stack-protector) +gcc-nowarn := -w # Don't duplicate options if we inherited variables from the parent. -- cgit v1.1