summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/c-cppbuiltin.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-08-13 01:02:57 +0000
committerpfg <pfg@FreeBSD.org>2015-08-13 01:02:57 +0000
commitc32f5a21dce4ad7d32a4573c7a99bf50e384075c (patch)
tree6d4cb070f92d84a3dcfe158d8171b1a43cda5aaf /contrib/gcc/c-cppbuiltin.c
parent3e1f1ceab6f729496c14d5168e17d7aa4cb13f12 (diff)
downloadFreeBSD-src-c32f5a21dce4ad7d32a4573c7a99bf50e384075c.zip
FreeBSD-src-c32f5a21dce4ad7d32a4573c7a99bf50e384075c.tar.gz
MFC r286074:
GCC: Add a new option "-fstack-protector-strong" This includes additional functions to be protected: those that have local array definitions, or have references to local frame addresses. This is a new option in GCC-4.9 that was relicensed by Han Shen from Google under GPLv2. Obtained from: OpenBSD (2014-01-14)
Diffstat (limited to 'contrib/gcc/c-cppbuiltin.c')
-rw-r--r--contrib/gcc/c-cppbuiltin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/gcc/c-cppbuiltin.c b/contrib/gcc/c-cppbuiltin.c
index 6b65cdf..511104f 100644
--- a/contrib/gcc/c-cppbuiltin.c
+++ b/contrib/gcc/c-cppbuiltin.c
@@ -553,7 +553,9 @@ c_cpp_builtins (cpp_reader *pfile)
/* Make the choice of the stack protector runtime visible to source code.
The macro names and values here were chosen for compatibility with an
earlier implementation, i.e. ProPolice. */
- if (flag_stack_protect == 2)
+ if (flag_stack_protect == 3)
+ cpp_define (pfile, "__SSP_STRONG__=3");
+ else if (flag_stack_protect == 2)
cpp_define (pfile, "__SSP_ALL__=2");
else if (flag_stack_protect == 1)
cpp_define (pfile, "__SSP__=1");
OpenPOWER on IntegriCloud