[Bug bootstrap/96203] [11 Regression] LTO bootstrap with --enable-cet is broken

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Jul 17 12:37:41 GMT 2020


--- 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.

More information about the Gcc-bugs mailing list