From b156ec373ccf27f4fcce7972de5e043d35acea43 Mon Sep 17 00:00:00 2001 From: shenhan Date: Tue, 7 May 2013 21:33:01 +0000 Subject: 2013-05-07 Han Shen 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". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198699 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/c-family/c-cppbuiltin.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/c-family/c-cppbuiltin.c') diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index 3e210d90e0b..0059626f6e3 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) -- cgit v1.2.1