common.opt: New option -fstack-protector-explicit.
authorMarcos Diaz <marcos.diaz@tallertechnologies.com>
Thu, 15 Jan 2015 05:29:12 +0000 (05:29 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 15 Jan 2015 05:29:12 +0000 (22:29 -0700)
commit5434dc0730795cf6a2ef8a9fe20e4dcc9cd077be
tree491382b1163238c05c384ce06c8581bc06d76bfb
parent1a0c69834516bf7731d34aa47febea6850ed773f
common.opt: New option -fstack-protector-explicit.

2015-01-14  Marcos Diaz <marcos.diaz@tallertechnologies.com>

* common.opt: New option -fstack-protector-explicit.
* cfgexpand.c (SPCT_FLAG_EXPLICIT): New enum.
(stack_protect_decl_phase): Handle stack_protect attribute for
explicit stack protection requests.
(expand_used_vars): Similarly.
* doc/cpp.texi (__SSP_EXPLICIT__): Document predefined macro.
* doc/extend.texi: Add documentation for "stack_protect" attribute.
* doc/invoke.texi: Add documentation for -fstack-protector-explicit.

* c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
for the new option fstack-protector_explicit.
* c-common.c (c_common_attribute_table): Add stack_protect attribute.
(handle_stack_protect_attribute): New function.

* gcc.dg/stackprotectexplicit1.c: New test.
* g++.dg/stackprotectexplicit2.c: New test.

From-SVN: r219633
12 files changed:
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-cppbuiltin.c
gcc/cfgexpand.c
gcc/common.opt
gcc/doc/cpp.texi
gcc/doc/extend.texi
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/stackprotectexplicit2.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/stackprotectexplicit1.c [new file with mode: 0644]