Use '-g' instead of '-g3' when compiling grub2.

The rpm-build's "debugedit" program will silently corrupt .debug_macro
strings when a binary is compiled with -g3.  Later in the build phase,
gdb-add-index is invoked to extract the DWARF index from the binary,
and GDB will segfault because dwarf2read.c:parse_definition_macro's
'body' variable is NULL.

Resolves: rhbz#1708780
This commit is contained in:
Sergio Durigan Junior 2019-06-18 12:00:42 +02:00 committed by Javier Martinez Canillas
parent 05efc9de7f
commit f6da347edf
No known key found for this signature in database
GPG Key ID: C751E590D63F3D69
2 changed files with 5 additions and 2 deletions

View File

@ -17,7 +17,6 @@
%global cflags_sed \\\
sed \\\
-e 's/-O. //g' \\\
-e 's/-g /-g3 /g' \\\
-e 's/-fplugin=annobin //g' \\\
-e 's,-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ,,g' \\\
-e 's/-fstack-protector[[:alpha:]-]\\+//g' \\\

View File

@ -7,7 +7,7 @@
Name: grub2
Epoch: 1
Version: 2.02
Release: 87%{?dist}
Release: 88%{?dist}
Summary: Bootloader with support for Linux, Multiboot and more
License: GPLv3+
URL: http://www.gnu.org/software/grub/
@ -518,6 +518,10 @@ rm -r /boot/grub2.tmp/ || :
%endif
%changelog
* Tue Jun 18 2019 Sergio Durigan Junior <sergiodj@redhat.com> - 2.02-88
- Use '-g' instead of '-g3' when compiling grub2.
Resolves: rhbz#1708780
* Tue Jun 11 2019 Javier Martinez Canillas <javierm@redhat.com> - 2.02-87
- Rebuild for RPM 4.15