https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93966
Bug ID: 93966 Summary: -fcf-protection -flto -g don't work togeter Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: hjl.tools at gmail dot com CC: marxin at gcc dot gnu.org, rguenth at gcc dot gnu.org Target Milestone: --- [hjl@gnu-cfl-2 tmp]$ cat x.c #include <stdio.h> int main () { printf ("hello\n"); return 0; } [hjl@gnu-cfl-2 tmp]$ gcc -flto -c x.c [hjl@gnu-cfl-2 tmp]$ gcc x.o -Wl,-z,cet-report=error -fcf-protection [hjl@gnu-cfl-2 tmp]$ gcc -flto -c x.c -g [hjl@gnu-cfl-2 tmp]$ gcc x.o -Wl,-z,cet-report=error -fcf-protection -g /usr/local/bin/ld: /tmp/cchkKahV.debug.temp.o: error: missing IBT and SHSTK properties collect2: error: ld returned 1 exit status [hjl@gnu-cfl-2 tmp]$