On 11/24/2016 07:11 AM, Jiong Wang wrote:
gcc/
2016-11-11  Jiong Wang  <jiong.w...@arm.com>
        * function.c (expand_function_end): Guard stack_protect_epilogue
with
        ENABLE_DEFAULT_SSP_RUNTIME.
        * cfgexpand.c (pass_expand::execute): Likewise guard for
        stack_protect_prologue.
        * defaults.h (ENABLE_DEFAULT_SSP_RUNTIME): New macro.  Default
set to 1.
        * doc/tm.texi.in (Misc): Documents ENABLE_DEFAULT_SSP_RUNTIME.
        * doc/tm.texi: Regenerate.

Like Joseph, I think this should be a hook rather than a new target
macro.  I do think it's closer to the right track though (separation
of access to the guard from the rest of the SSP runtime bits).

Hi Josephy, Jeff:

  Thanks for the review.

  I was planning to update the patch after resolving the pending DWARF
issue (https://gcc.gnu.org/ml/gcc-patches/2016-11/msg01156.html),
  While as this patch itself it quite independent, so OK to commit the
attached patch?  x86-64 boostrap and regression OK.


gcc/
2016-11-24  Jiong Wang  <jiong.w...@arm.com>
        * 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.
OK.  Thanks for your patience.

Jeff

Reply via email to