public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/95604] New: LTO doesn't pick up -fcf-protection flag for the link step
@ 2020-06-09 12:04 doko at debian dot org
  2020-06-09 12:16 ` [Bug lto/95604] " hjl.tools at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: doko at debian dot org @ 2020-06-09 12:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95604
           Summary: LTO doesn't pick up -fcf-protection flag for the link
                    step
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at debian dot org
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Building the example from PR93966 with the -fcf-protection flag in the compile
step, but not in the link step, I get the error triggered by the -z option.

$ cat x.c 
#include <stdio.h>

int
main ()
{
  printf ("hello\n");
  return 0;
}

$ gcc-10 -flto -fcf-protection -c x.c
$ gcc-10 -flto x.o -Wl,-z,cet-report=error
/usr/bin/ld: /tmp/ccM08n28.ltrans0.ltrans.o: error: missing IBT and SHSTK
properties
collect2: error: ld returned 1 exit status

Isn't the lto link step supposed to pick up the compilation options from the
compile step?

An objdump -w -s --section=.gnu.lto_.opts x.o
shows that this option is recorded, however I don't see it printed out in the
link step, even when calling gcc with -v.

An unrelated question: why is the compile step from PR93966 not called with
-fcf-protection?

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

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

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 12:04 [Bug lto/95604] New: LTO doesn't pick up -fcf-protection flag for the link step doko at debian dot org
2020-06-09 12:16 ` [Bug lto/95604] " hjl.tools at gmail dot com
2020-06-09 12:22 ` doko at debian dot org
2020-06-09 12:30 ` hjl.tools at gmail dot com
2020-07-14  8:13 ` cvs-commit at gcc dot gnu.org
2020-07-14  8:24 ` cvs-commit at gcc dot gnu.org
2020-07-15 11:47 ` hjl.tools at gmail dot com
2020-09-01  8:37 ` rguenth at gcc dot gnu.org
2020-09-11 10:21 ` cvs-commit at gcc dot gnu.org
2020-09-11 10:24 ` doko at debian dot 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).