Bug 1708780

Summary: Don't use -g3 when compiling grub2
Product: [Fedora] Fedora Reporter: Sergio Durigan Junior <sergiodj>
Component: grub2Assignee: Peter Jones <pjones>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 31CC: fmartine, lkundrak, pjones
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: grub2-2.02-88.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-15 06:19:19 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:
Attachments:
Description Flags
Don't use -g3 when compiling grub2 none

Description Sergio Durigan Junior 2019-05-10 20:32:58 UTC
Hi,

There is an existing bug (probably on rpm-build's debugedit) which introduces a problem on .debug_macro sections in objfiles and causes GDB to segfault when trying to extract the DWARF index (via the gdb-add-index script).

This bug manifests when a binary is built using GCC's -g3 flag, which is the case with grub2.  The workaround for it is to just build it with -g, which is also the recommended flag for building Fedora packages.

I will provide a patch that does that.

Related: Bug 1708192 and Bug 1535174.

Thanks.

Comment 1 Sergio Durigan Junior 2019-05-10 20:34:50 UTC
Created attachment 1566798 [details]
Don't use -g3 when compiling grub2

Comment 2 Javier Martinez Canillas 2019-06-18 10:30:56 UTC
(In reply to Sergio Durigan Junior from comment #1)
> Created attachment 1566798 [details]
> Don't use -g3 when compiling grub2

Thanks a lot for the patch. I've picked it and built grub2-2.02-88.fc31 that includes this.

Comment 3 Ben Cotton 2019-08-13 19:10:47 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.