From patchwork Wed Feb 24 23:28:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nix X-Patchwork-Id: 11063 Received: (qmail 126397 invoked by alias); 24 Feb 2016 23:28:55 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 126333 invoked by uid 89); 24 Feb 2016 23:28:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.3 required=5.0 tests=AWL, BAYES_50, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=Wrap, 8268, sk:2.7.0.1, UD:198.g6dd47b6 X-HELO: mail.esperi.org.uk From: Nix To: libc-alpha@sourceware.org Subject: [PATCH 10/14] Enable -fstack-protector=* when requested by configure. Date: Wed, 24 Feb 2016 23:28:16 +0000 Message-Id: <1456356500-25601-11-git-send-email-nix@esperi.org.uk> In-Reply-To: <1456356500-25601-1-git-send-email-nix@esperi.org.uk> References: <1456356500-25601-1-git-send-email-nix@esperi.org.uk> X-DCC-wuwien-Metrics: spindle 1290; Body=1 Fuz1=1 Fuz2=1 From: Nick Alcock This finally turns on all the machinery added in previous commits. v3: Wrap long lines. --- Makeconfig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makeconfig b/Makeconfig index 87a22e8..efcfdad 100644 --- a/Makeconfig +++ b/Makeconfig @@ -762,6 +762,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. @@ -821,7 +826,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.