From 87a5dc2da0ae66285afa894b4dca847c87c0302b Mon Sep 17 00:00:00 2001 From: Jiong Wang Date: Tue, 29 Nov 2016 11:47:48 +0000 Subject: [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 --- gcc/function.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/function.c') diff --git a/gcc/function.c b/gcc/function.c index c5a538f..0829fbe 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -5635,7 +5635,7 @@ expand_function_end (void) emit_insn (gen_blockage ()); /* If stack protection is enabled for this function, check the guard. */ - if (crtl->stack_protect_guard) + if (crtl->stack_protect_guard && targetm.stack_protect_runtime_enabled_p ()) stack_protect_epilogue (); /* If we had calls to alloca, and this machine needs -- cgit v1.1