diff options
author | Magnus Granberg <zorry@gentoo.org> | 2015-08-19 22:07:06 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2015-08-19 16:07:06 -0600 |
commit | e0f6cba004eb94ef9a06c68d09160d8601503085 (patch) | |
tree | 3ca7ccb634b618bf1984f21463abb0f4d2de83ff /gcc/defaults.h | |
parent | c24f5688adae2f885279e8fdce74a030e6944b7b (diff) | |
download | gcc-e0f6cba004eb94ef9a06c68d09160d8601503085.zip gcc-e0f6cba004eb94ef9a06c68d09160d8601503085.tar.gz gcc-e0f6cba004eb94ef9a06c68d09160d8601503085.tar.bz2 |
common.opt (fstack-protector): Initialize to -1.
* common.opt (fstack-protector): Initialize to -1.
(fstack-protector-all): Likewise.
(fstack-protector-strong): Likewise.
(fstack-protector-explicit): Likewise.
* configure.ac: Add --enable-default-ssp.
* defaults.h (DEFAULT_FLAG_SSP): New. Default SSP to strong.
* opts.c (finish_options): Update opts->x_flag_stack_protect if it is
-1.
* doc/install.texi: Document --enable-default-ssp.
* config.in: Regenerated.
* configure: Likewise.
* lib/target-supports.exp
(check_effective_target_fstack_protector_enabled): New test.
* gcc.target/i386/ssp-default.c: New test.
From-SVN: r227017
Diffstat (limited to 'gcc/defaults.h')
-rw-r--r-- | gcc/defaults.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/defaults.h b/gcc/defaults.h index 713ca07..4fe8eb1 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -1359,6 +1359,18 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define STACK_SIZE_MODE word_mode #endif +/* Default value for flag_stack_protect when flag_stack_protect is initialized to -1: + --enable-default-ssp: Default flag_stack_protect to -fstack-protector-strong. + --disable-default-ssp: Default flag_stack_protect to 0. + */ +#ifdef ENABLE_DEFAULT_SSP +# ifndef DEFAULT_FLAG_SSP +# define DEFAULT_FLAG_SSP 3 +# endif +#else +# define DEFAULT_FLAG_SSP 0 +#endif + /* Provide default values for the macros controlling stack checking. */ /* The default is neither full builtin stack checking... */ |