https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96203

--- Comment #17 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <h...@gcc.gnu.org>:

https://gcc.gnu.org/g:c4c22e830251e1961c6ebec78d28d039eb2e6017

commit r11-2361-gc4c22e830251e1961c6ebec78d28d039eb2e6017
Author: H.J. Lu <hjl.to...@gmail.com>
Date:   Thu Jul 16 07:03:27 2020 -0700

    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.

Reply via email to