]> git.ipfire.org Git - thirdparty/gcc.git/commit
x86: Allow -fcf-protection with external thunk
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 29 Apr 2020 11:52:46 +0000 (04:52 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 29 Apr 2020 12:11:06 +0000 (05:11 -0700)
commita03efb266fcbf4a01285fff871a5bfe5caac4944
treee360adb23534cf92e205b8a570a004825a794d37
parentc285d9792c4a240b321984bf567f2d9592a6209a
x86: Allow -fcf-protection with external thunk

Allow -fcf-protection with external thunk since the external thunk can be
made compatible with -fcf-protection.

gcc/

Backport from master
PR target/93654
* config/i386/i386-options.c (ix86_set_indirect_branch_type):
Allow -fcf-protection with -mindirect-branch=thunk-extern and
-mfunction-return=thunk-extern.
* doc/invoke.texi: Update notes for -fcf-protection=branch with
-mindirect-branch=thunk-extern and -mindirect-return=thunk-extern.

gcc/testsuite/

Backport from master
PR target/93654
* gcc.target/i386/pr93654.c: New test.

(cherry picked from commit 9be3bb2c0a258fd6a7d3d05d232a21930c757d3c)
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr93654.c [new file with mode: 0644]