aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-07-16 07:03:27 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-07-27 04:40:13 -0700
commitc4c22e830251e1961c6ebec78d28d039eb2e6017 (patch)
treec8ca64121d22d1d3222b58e85fc477bd68166c6a /gcc/expr.c
parentfd5966e8e044785f51cd7373b59ad9575a5ac96c (diff)
downloadgcc-c4c22e830251e1961c6ebec78d28d039eb2e6017.zip
gcc-c4c22e830251e1961c6ebec78d28d039eb2e6017.tar.gz
gcc-c4c22e830251e1961c6ebec78d28d039eb2e6017.tar.bz2
LTO: Add -fcf-protection=check
Mixing -fcf-protection and -fcf-protection=none objects are allowed. Linker just merges -fcf-protection values from all input objects. Add -fcf-protection=check for the final link with LTO. An error is issued if LTO object files are compiled with different -fcf-protection values. Otherwise, -fcf-protection=check is ignored at the compile time. Without explicit -fcf-protection at link time, -fcf-protection values from LTO object files are merged at the final link. gcc/ PR bootstrap/96203 * common.opt: Add -fcf-protection=check. * flag-types.h (cf_protection_level): Add CF_CHECK. * lto-wrapper.c (merge_and_complain): Issue an error for mismatching -fcf-protection values with -fcf-protection=check. Otherwise, merge -fcf-protection values. * doc/invoke.texi: Document -fcf-protection=check. gcc/testsuite/ PR bootstrap/96203 * gcc.target/i386/pr96203-1.c: New test. * gcc.target/i386/pr96203-2.c: Likewise.
Diffstat (limited to 'gcc/expr.c')
0 files changed, 0 insertions, 0 deletions