Hello! Attached patch introduces -mstack-protector-guard-reg= and -mstack-protector-guard-offset= options to make stack canary location customizable. These are the same options powerpc has. 2017-08-08 Uros Bizjak PR target/81708 * config/i386/i386.opt (mstack-protector-guard-reg=): New option (mstack-protector-guard-offset=): Ditto. * config/i386/i386.c (ix86_option_override): Handle -mstack-protector-guard-reg= and -mstack-protector-guard-offset= options. (ix86_stack_protect_guard): Use ix86_stack_protect_guard_reg and ix86_stack_protect_guard_offset variables. (TARGET_STACK_PROTECT_GUARD): Always define. * doc/invoke.texi (x86 Options): Document -mstack-protector-guard-reg= and -mstack-protector-guard-offset= options. testsuite/ChangeLog: 2017-08-08 Uros Bizjak PR target/81708 * gcc.target/i386/stack-prot-guard.c: New test. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Committed to mainline SVN. I will mention new options in gcc-8 changes webpage later. Uros.