Bug 1808484

Summary: -fcf-protection -flto -g don't work togeter
Product: [Fedora] Fedora Reporter: H.J. Lu <hongjiu.lu>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: aoliva, avi.kivity, dmalcolm, fweimer, jakub, jwakely, law, mpolacek, msebor, nickc, redhat-bugzilla, sipoyare, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: gcc-10.0.1-0.9.fc33 gcc-10.0.1-0.9.fc32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-16 20:39:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1798776, 1802674, 1808811    

Description H.J. Lu 2020-02-28 15:53:46 UTC
[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 -fcf-protection
[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]$

Comment 1 H.J. Lu 2020-02-28 16:41:08 UTC
The command line is

[hjl@gnu-hsw-1 tmp]$ gcc -flto -c x.c -fcf-protection -g
[hjl@gnu-hsw-1 tmp]$ gcc x.o -Wl,-z,cet-report=error  -fcf-protection -g
/usr/local/bin/ld: /tmp/ccXg74Q6.debug.temp.o: error: missing IBT and SHSTK properties
collect2: error: ld returned 1 exit status
[hjl@gnu-hsw-1 tmp]$

Comment 2 Jakub Jelinek 2020-03-12 10:37:05 UTC
Should be fixed in gcc-10.0.1-0.9.fc{32,33}, the f32 version hasn't finished building yet.

Comment 3 Zbigniew Jędrzejewski-Szmek 2020-03-12 11:34:07 UTC
I can confirm that the systmd case in #1798776 is fixed with gcc-10.0.1-0.9.fc33.

Comment 4 Fedora Update System 2020-03-13 10:48:45 UTC
FEDORA-2020-d927e07eb1 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-d927e07eb1

Comment 5 Fedora Update System 2020-03-13 18:33:43 UTC
annobin-9.06-4.fc32, gcc-10.0.1-0.9.fc32 has been pushed to the Fedora 32 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-d927e07eb1

Comment 6 Fedora Update System 2020-03-16 20:39:14 UTC
annobin-9.06-4.fc32, gcc-10.0.1-0.9.fc32 has been pushed to the Fedora 32 stable repository. If problems still persist, please make note of it in this bug report.