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/opts.c | |
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/opts.c')
-rw-r--r-- | gcc/opts.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -754,6 +754,11 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set, opts->x_flag_opts_finished = true; } + /* We initialize opts->x_flag_stack_protect to -1 so that targets + can set a default value. */ + if (opts->x_flag_stack_protect == -1) + opts->x_flag_stack_protect = DEFAULT_FLAG_SSP; + if (opts->x_optimize == 0) { /* Inlining does not work if not optimizing, |