diff options
author | Jiong Wang <jiong.wang@arm.com> | 2016-11-29 11:47:48 +0000 |
---|---|---|
committer | Jiong Wang <jiwang@gcc.gnu.org> | 2016-11-29 11:47:48 +0000 |
commit | 87a5dc2da0ae66285afa894b4dca847c87c0302b (patch) | |
tree | 58ea11f59eb7d734feba66f5e7ad492c76b250ab /gcc/cfgexpand.c | |
parent | 11edabc2dfb9274445d697eff2bafde3abdefa1f (diff) | |
download | gcc-87a5dc2da0ae66285afa894b4dca847c87c0302b.zip gcc-87a5dc2da0ae66285afa894b4dca847c87c0302b.tar.gz gcc-87a5dc2da0ae66285afa894b4dca847c87c0302b.tar.bz2 |
[Patch] New hook TARGET_STACK_PROTECT_RUNTIME_ENABLED_P to disable SSP runtime
gcc/
* target.def (stack_protect_runtime_enabled_p): New.
* function.c (expand_function_end): Guard stack_protect_epilogue with
targetm.stack_protect_runtime_enabled_p.
* cfgexpand.c (pass_expand::execute): Likewise.
* calls.c (expand_call): Likewise.
* doc/tm.texi.in (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P): Add it.
* doc/tm.texi: Regenerate.
From-SVN: r242955
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 9cca611..c3aca59 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -6334,7 +6334,7 @@ pass_expand::execute (function *fun) /* Initialize the stack_protect_guard field. This must happen after the call to __main (if any) so that the external decl is initialized. */ - if (crtl->stack_protect_guard) + if (crtl->stack_protect_guard && targetm.stack_protect_runtime_enabled_p ()) stack_protect_prologue (); expand_phi_nodes (&SA); |