aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family/c-cppbuiltin.c
diff options
context:
space:
mode:
authorHan Shen <shenhan@gcc.gnu.org>2013-05-07 21:33:01 +0000
committerHan Shen <shenhan@gcc.gnu.org>2013-05-07 21:33:01 +0000
commitf6bc1c4a12af78d96c951547d9693e6e805162da (patch)
tree6334fbdf8bc242f31e69b43f0b15f26ac842169e /gcc/c-family/c-cppbuiltin.c
parent703f140fb8dbe977cf5fabecd60e163267b6e227 (diff)
downloadgcc-f6bc1c4a12af78d96c951547d9693e6e805162da.zip
gcc-f6bc1c4a12af78d96c951547d9693e6e805162da.tar.gz
gcc-f6bc1c4a12af78d96c951547d9693e6e805162da.tar.bz2
cfgexpand.c (record_or_union_type_has_array_p): New function.
2013-05-07 Han Shen <shenhan@google.com> gcc/ * cfgexpand.c (record_or_union_type_has_array_p): New function. (expand_used_vars): Add logic handling '-fstack-protector-strong'. * common.opt (fstack-protector-strong): New option. * doc/cpp.texi (__SSP_STRONG__): New builtin "__SSP_STRONG__". * doc/invoke.texi (Optimization Options): Document "-fstack-protector-strong". * gcc.c (LINK_SSP_SPEC): Add 'fstack-protector-strong'. gcc/testsuite/ * gcc.dg/fstack-protector-strong.c: New. * g++.dg/fstack-protector-strong.C: New. gcc/c-family/ * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3". From-SVN: r198699
Diffstat (limited to 'gcc/c-family/c-cppbuiltin.c')
-rw-r--r--gcc/c-family/c-cppbuiltin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
index 3e210d9..0059626 100644
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -888,6 +888,8 @@ 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 == 3)
+ cpp_define (pfile, "__SSP_STRONG__=3");
if (flag_stack_protect == 2)
cpp_define (pfile, "__SSP_ALL__=2");
else if (flag_stack_protect == 1)