From f6da347edf81124cb2b2c20f93d9b9247644f3d9 Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Tue, 18 Jun 2019 12:00:42 +0200 Subject: [PATCH] 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 --- grub.macros | 1 - grub2.spec | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/grub.macros b/grub.macros index 0d86b6b..e55af31 100644 --- a/grub.macros +++ b/grub.macros @@ -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' \\\ diff --git a/grub2.spec b/grub2.spec index f1fe74b..c8a86bb 100644 --- a/grub2.spec +++ b/grub2.spec @@ -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 - 2.02-88 +- Use '-g' instead of '-g3' when compiling grub2. + Resolves: rhbz#1708780 + * Tue Jun 11 2019 Javier Martinez Canillas - 2.02-87 - Rebuild for RPM 4.15