From 28076bb004302bda2b78d9a1cc71f7e03ae320b0 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 18 Jan 2018 18:22:02 -0500 Subject: [PATCH] Nerf some new gcc 'features' For now, completely nerf annobin and -fstack-clash-protection; at least one of those things makes grubx64.efi crash on start. Signed-off-by: Peter Jones --- grub.macros | 4 ++++ grub2.spec | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/grub.macros b/grub.macros index 972bfbb..2bdc2ef 100644 --- a/grub.macros +++ b/grub.macros @@ -18,6 +18,9 @@ sed \\\ -e 's/-O. //g' \\\ -e 's/-g /-g3 /g' \\\ + -e 's/-fstack-clash-protection //g' \\\ + -e 's/-fplugin=annobin //g' \\\ + -e 's,-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ,,g' \\\ -e 's/-fstack-protector[[:alpha:]-]\\+//g' \\\ -e 's/-Wp,-D_FORTIFY_SOURCE=[[:digit:]]\\+//g' \\\ -e 's/--param=ssp-buffer-size=4//g' \\\ @@ -25,6 +28,7 @@ -e 's/-fexceptions//g' \\\ -e 's/-fasynchronous-unwind-tables//g' \\\ -e 's/^/ -fno-strict-aliasing /' \\\ + -e 's/^/ -fno-stack-clash-protection /' \\\ %{nil} %global efi_cflags \\\ diff --git a/grub2.spec b/grub2.spec index 9417f0b..14747ac 100644 --- a/grub2.spec +++ b/grub2.spec @@ -7,7 +7,7 @@ Name: grub2 Epoch: 1 Version: 2.02 -Release: 21%{?dist} +Release: 22%{?dist} Summary: Bootloader with support for Linux, Multiboot and more Group: System Environment/Base License: GPLv3+ @@ -454,6 +454,9 @@ fi %endif %changelog +* Thu Jan 18 2018 Peter Jones - 2.02-22 +- Nerf some gcc 7.2.1-6 'features' that cause grub to crash on start. + * Thu Jan 18 2018 Peter Jones - 2.02-21 - Fix grub2-efi-modules provides/obsoletes generation Resolves: rhbz#1506704