public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken
@ 2020-07-15  7:21 rguenth at gcc dot gnu.org
  2020-07-15  7:23 ` [Bug bootstrap/96203] " rguenth at gcc dot gnu.org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-15  7:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96203
           Summary: LTO bootstrap with --enable-cet is broken
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

/tmp/obj/./prev-gcc/xg++ -B/tmp/obj/./prev-gcc/
-B/usr/local/x86_64-pc-linux-gnu/bin/ -nostdinc++
-B/tmp/obj/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-B/tmp/obj/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs 
-I/tmp/obj/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu 
-I/tmp/obj/prev-x86_64-pc-linux-gnu/libstdc++-v3/include 
-I/home/rguenther/src/gcc-10-branch/libstdc++-v3/libsupc++
-L/tmp/obj/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-L/tmp/obj/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs   -g -O2
-fno-checking -flto=jobserver -frandom-seed=1 -DIN_GCC     -fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings   -DHAVE_CONFIG_H  -DGENERATOR_FILE -fno-PIE
-static-libstdc++ -static-libgcc  -no-pie -o build/genchecksum \
    build/genchecksum.o .././libiberty/libiberty.a
lto-wrapper: fatal error: option -fcf-protection with mismatching values (none,
full)
compilation terminated.
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld:
error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:2921: build/genchecksum] Error 1

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
@ 2020-07-15  7:23 ` rguenth at gcc dot gnu.org
  2020-07-15  7:28 ` cvs-commit at gcc dot gnu.org
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-15  7:23 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doko at gcc dot gnu.org,
                   |                            |hjl at gcc dot gnu.org

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
So we link CET enabled libiberty but do not build GCC itself (and thus gen*)
CET enabled which blows up with

commit 6a48d12475cdb7375b98277f8bc089715feeeafe
Author: Matthias Klose <doko@ubuntu.com>
Date:   Tue Jul 14 10:12:08 2020 +0200

    LTO: pick up -fcf-protection flag for the link step

    2020-07-14  Matthias Klose  <doko@ubuntu.com>

            PR lto/95604
            * lto-wrapper.c (merge_and_complain): Add decoded options as
parameter,
            error on different values for -fcf-protection.
            (append_compiler_options): Pass -fcf-protection option.
            (find_and_merge_options): Add decoded options as parameter,
            pass decoded_options to merge_and_complain.
            (run_gcc): Pass decoded options to find_and_merge_options.
            * lto-opts.c (lto_write_options): Pass -fcf-protection option.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
  2020-07-15  7:23 ` [Bug bootstrap/96203] " rguenth at gcc dot gnu.org
@ 2020-07-15  7:28 ` cvs-commit at gcc dot gnu.org
  2020-07-15  9:05 ` doko at debian dot org
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-07-15  7:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:76641cd8b53128e1a962f1313ba75acf0855fd00

commit r10-8499-g76641cd8b53128e1a962f1313ba75acf0855fd00
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Jul 15 09:26:08 2020 +0200

    Revert "LTO: pick up -fcf-protection flag for the link step"

    This reverts commit 8147c741df97ee02aa64c099c6b360e6a93384e1.

    2020-07-15  Richard Biener  <rguenther@suse.de>

            PR bootstrap/96203
            * lto-opts.c: Revert changes.
            * lto-wrapper.c: Likewise.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
  2020-07-15  7:23 ` [Bug bootstrap/96203] " rguenth at gcc dot gnu.org
  2020-07-15  7:28 ` cvs-commit at gcc dot gnu.org
@ 2020-07-15  9:05 ` doko at debian dot org
  2020-07-15  9:12 ` [Bug bootstrap/96203] [11 Regression] " rguenth at gcc dot gnu.org
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: doko at debian dot org @ 2020-07-15  9:05 UTC (permalink / raw)
  To: gcc-bugs

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

Matthias Klose <doko at debian dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doko at debian dot org

--- Comment #3 from Matthias Klose <doko at debian dot org> ---
what is the proposed solution? Richard mentioned on IRC to make the error a
warning, or build GCC with CET_FLAGS passed to the LDFLAGS used to build the
build tools and the compiler itself? which LDFLAGS would that be?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] [11 Regression] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-07-15  9:05 ` doko at debian dot org
@ 2020-07-15  9:12 ` rguenth at gcc dot gnu.org
  2020-07-15 11:35 ` hjl.tools at gmail dot com
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-15  9:12 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|LTO bootstrap with          |[11 Regression] LTO
                   |--enable-cet is broken      |bootstrap with --enable-cet
                   |                            |is broken
   Target Milestone|---                         |11.0

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Arguably the simplest solution is to demote the error to a warning,
--enable-cet
is supposed to only enable CET instrumentation of (part of) the runtime.  If
we want to keep the error we'd need to build several variants of libiberty
(in this case).  Not sure why libiberty was CET enabled in the first place - is
it used in target libraries?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] [11 Regression] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-07-15  9:12 ` [Bug bootstrap/96203] [11 Regression] " rguenth at gcc dot gnu.org
@ 2020-07-15 11:35 ` hjl.tools at gmail dot com
  2020-07-15 11:40 ` hjl.tools at gmail dot com
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: hjl.tools at gmail dot com @ 2020-07-15 11:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Richard Biener from comment #4)
> Arguably the simplest solution is to demote the error to a warning,
> --enable-cet
> is supposed to only enable CET instrumentation of (part of) the runtime.  If
> we want to keep the error we'd need to build several variants of libiberty
> (in this case).  Not sure why libiberty was CET enabled in the first place -
> is it used in target libraries?

No.  It is for liblto_plugin.so.  See PR 94739.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] [11 Regression] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-07-15 11:35 ` hjl.tools at gmail dot com
@ 2020-07-15 11:40 ` hjl.tools at gmail dot com
  2020-07-16  9:28 ` doko at debian dot org
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: hjl.tools at gmail dot com @ 2020-07-15 11:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
By design, mixing CET and non-CET objects must be allowed.  We should
revisit PR 95604.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] [11 Regression] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-07-15 11:40 ` hjl.tools at gmail dot com
@ 2020-07-16  9:28 ` doko at debian dot org
  2020-07-16 14:05 ` hjl.tools at gmail dot com
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: doko at debian dot org @ 2020-07-16  9:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Matthias Klose <doko at debian dot org> ---
Please could you elaborate how this should be revisited?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] [11 Regression] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2020-07-16  9:28 ` doko at debian dot org
@ 2020-07-16 14:05 ` hjl.tools at gmail dot com
  2020-07-16 14:28 ` doko at debian dot org
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: hjl.tools at gmail dot com @ 2020-07-16 14:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 48881
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48881&action=edit
Something like this

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] [11 Regression] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2020-07-16 14:05 ` hjl.tools at gmail dot com
@ 2020-07-16 14:28 ` doko at debian dot org
  2020-07-16 14:32 ` hjl.tools at gmail dot com
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: doko at debian dot org @ 2020-07-16 14:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Matthias Klose <doko at debian dot org> ---
Comment on attachment 48881
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48881
Something like this

please could you update gcc/doc/invoke.texi?

is error only supposed to be passed in LDFLAGS, not in CFLAGS? What would be
the semantics if error passed in CFLAGS?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] [11 Regression] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2020-07-16 14:28 ` doko at debian dot org
@ 2020-07-16 14:32 ` hjl.tools at gmail dot com
  2020-07-16 21:19 ` hjl.tools at gmail dot com
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: hjl.tools at gmail dot com @ 2020-07-16 14:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Matthias Klose from comment #9)
> Comment on attachment 48881 [details]
> Something like this
> 
> please could you update gcc/doc/invoke.texi?

It needs more than documentation.

> is error only supposed to be passed in LDFLAGS, not in CFLAGS? What would be
> the semantics if error passed in CFLAGS?

CF_ERROR should be treated like CF_NONE outside of lto-wrapper.c.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] [11 Regression] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2020-07-16 14:32 ` hjl.tools at gmail dot com
@ 2020-07-16 21:19 ` hjl.tools at gmail dot com
  2020-07-16 21:20 ` hjl.tools at gmail dot com
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: hjl.tools at gmail dot com @ 2020-07-16 21:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 48885
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48885&action=edit
A patch

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] [11 Regression] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2020-07-16 21:19 ` hjl.tools at gmail dot com
@ 2020-07-16 21:20 ` hjl.tools at gmail dot com
  2020-07-17  7:18 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: hjl.tools at gmail dot com @ 2020-07-16 21:20 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-07-16
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |WAITING

--- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> ---
Please this patch.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] [11 Regression] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2020-07-16 21:20 ` hjl.tools at gmail dot com
@ 2020-07-17  7:18 ` rguenth at gcc dot gnu.org
  2020-07-17 12:37 ` hjl.tools at gmail dot com
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-17  7:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #12)
> Please this patch.

/* Merge and update the -fcf-protection option.  */

but here you take the setting from the last file rather than merging it,
I'd have expected a |= operation and also handling of CF_FULL for the
string update.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] [11 Regression] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2020-07-17  7:18 ` rguenth at gcc dot gnu.org
@ 2020-07-17 12:37 ` hjl.tools at gmail dot com
  2020-07-17 13:23 ` rguenther at suse dot de
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: hjl.tools at gmail dot com @ 2020-07-17 12:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Richard Biener from comment #13)
> (In reply to H.J. Lu from comment #12)
> > Please this patch.
> 
> /* Merge and update the -fcf-protection option.  */
> 
> but here you take the setting from the last file rather than merging it,
> I'd have expected a |= operation and also handling of CF_FULL for the
> string update.

The code has

           /* Merge and update the -fcf-protection option.  */
+           (*decoded_options)[j].value &= (foption->value
+                       & CF_FULL);

It must be "&=" not "|=" since CET features are enabled only if they are
enabled in ALL LTO inputs.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] [11 Regression] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2020-07-17 12:37 ` hjl.tools at gmail dot com
@ 2020-07-17 13:23 ` rguenther at suse dot de
  2020-07-17 13:47 ` hjl.tools at gmail dot com
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: rguenther at suse dot de @ 2020-07-17 13:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from rguenther at suse dot de <rguenther at suse dot de> ---
On Fri, 17 Jul 2020, hjl.tools at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96203
> 
> --- Comment #14 from H.J. Lu <hjl.tools at gmail dot com> ---
> (In reply to Richard Biener from comment #13)
> > (In reply to H.J. Lu from comment #12)
> > > Please this patch.
> > 
> > /* Merge and update the -fcf-protection option.  */
> > 
> > but here you take the setting from the last file rather than merging it,
> > I'd have expected a |= operation and also handling of CF_FULL for the
> > string update.
> 
> The code has
> 
>            /* Merge and update the -fcf-protection option.  */
> +           (*decoded_options)[j].value &= (foption->value
> +                       & CF_FULL);
> 
> It must be "&=" not "|=" since CET features are enabled only if they are
> enabled in ALL LTO inputs.

OK, so it mimics what the dynamic loader would do (and also the
link editor?).

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] [11 Regression] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2020-07-17 13:23 ` rguenther at suse dot de
@ 2020-07-17 13:47 ` hjl.tools at gmail dot com
  2020-07-27 11:43 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: hjl.tools at gmail dot com @ 2020-07-17 13:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to rguenther@suse.de from comment #15)
> On Fri, 17 Jul 2020, hjl.tools at gmail dot com wrote:
> 
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96203
> > 
> > --- Comment #14 from H.J. Lu <hjl.tools at gmail dot com> ---
> > (In reply to Richard Biener from comment #13)
> > > (In reply to H.J. Lu from comment #12)
> > > > Please this patch.
> > > 
> > > /* Merge and update the -fcf-protection option.  */
> > > 
> > > but here you take the setting from the last file rather than merging it,
> > > I'd have expected a |= operation and also handling of CF_FULL for the
> > > string update.
> > 
> > The code has
> > 
> >            /* Merge and update the -fcf-protection option.  */
> > +           (*decoded_options)[j].value &= (foption->value
> > +                       & CF_FULL);
> > 
> > It must be "&=" not "|=" since CET features are enabled only if they are
> > enabled in ALL LTO inputs.
> 
> OK, so it mimics what the dynamic loader would do (and also the
> link editor?).

Yes.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] [11 Regression] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2020-07-17 13:47 ` hjl.tools at gmail dot com
@ 2020-07-27 11:43 ` cvs-commit at gcc dot gnu.org
  2020-07-27 11:45 ` hjl.tools at gmail dot com
  2020-09-11 10:21 ` cvs-commit at gcc dot gnu.org
  18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-07-27 11:43 UTC (permalink / raw)
  To: gcc-bugs

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 <hjl@gcc.gnu.org>:

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

commit r11-2361-gc4c22e830251e1961c6ebec78d28d039eb2e6017
Author: H.J. Lu <hjl.tools@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.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] [11 Regression] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  2020-07-27 11:43 ` cvs-commit at gcc dot gnu.org
@ 2020-07-27 11:45 ` hjl.tools at gmail dot com
  2020-09-11 10:21 ` cvs-commit at gcc dot gnu.org
  18 siblings, 0 replies; 20+ messages in thread
From: hjl.tools at gmail dot com @ 2020-07-27 11:45 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|WAITING                     |RESOLVED

--- Comment #18 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug bootstrap/96203] [11 Regression] LTO bootstrap with --enable-cet is broken
  2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
                   ` (17 preceding siblings ...)
  2020-07-27 11:45 ` hjl.tools at gmail dot com
@ 2020-09-11 10:21 ` cvs-commit at gcc dot gnu.org
  18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-11 10:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Matthias Klose
<doko@gcc.gnu.org>:

https://gcc.gnu.org/g:80ff137368412a1628cd56b76a860a76a08fd8ea

commit r10-8743-g80ff137368412a1628cd56b76a860a76a08fd8ea
Author: Matthias Klose <doko@ubuntu.com>
Date:   Fri Sep 11 12:21:25 2020 +0200

    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.

    (cherry picked from commit c4c22e830251e1961c6ebec78d28d039eb2e6017)

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2020-09-11 10:21 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-15  7:21 [Bug bootstrap/96203] New: LTO bootstrap with --enable-cet is broken rguenth at gcc dot gnu.org
2020-07-15  7:23 ` [Bug bootstrap/96203] " rguenth at gcc dot gnu.org
2020-07-15  7:28 ` cvs-commit at gcc dot gnu.org
2020-07-15  9:05 ` doko at debian dot org
2020-07-15  9:12 ` [Bug bootstrap/96203] [11 Regression] " rguenth at gcc dot gnu.org
2020-07-15 11:35 ` hjl.tools at gmail dot com
2020-07-15 11:40 ` hjl.tools at gmail dot com
2020-07-16  9:28 ` doko at debian dot org
2020-07-16 14:05 ` hjl.tools at gmail dot com
2020-07-16 14:28 ` doko at debian dot org
2020-07-16 14:32 ` hjl.tools at gmail dot com
2020-07-16 21:19 ` hjl.tools at gmail dot com
2020-07-16 21:20 ` hjl.tools at gmail dot com
2020-07-17  7:18 ` rguenth at gcc dot gnu.org
2020-07-17 12:37 ` hjl.tools at gmail dot com
2020-07-17 13:23 ` rguenther at suse dot de
2020-07-17 13:47 ` hjl.tools at gmail dot com
2020-07-27 11:43 ` cvs-commit at gcc dot gnu.org
2020-07-27 11:45 ` hjl.tools at gmail dot com
2020-09-11 10:21 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).