Remove -fcf-protection compiler flag to allow i386 builds

GRUB uses -march=i386 to build the x86 BIOS code but recent changes in the
default %{optflags} enabled the -fcf-protection flag that's not compatible
with pre-i686 CPUs.

This led to a build error in the grub2 package. To avoid this failure and
let the package to build again, remove the -fcf-protection flag for now.

Related: rhbz#1915452

Signed-off-by: Jeff Law <law@redhat.com>
This commit is contained in:
Jeff Law 2021-02-08 19:41:49 +01:00 committed by Javier Martinez Canillas
parent ca5becb9a3
commit 3a8f1e293b
No known key found for this signature in database
GPG key ID: C751E590D63F3D69

View file

@ -24,6 +24,7 @@
-e 's/--param=ssp-buffer-size=4//g' \\\
-e 's/-mregparm=3/-mregparm=4/g' \\\
-e 's/-fexceptions//g' \\\
-e 's/-fcf-protection//g' \\\
-e 's/-fasynchronous-unwind-tables//g' \\\
-e 's/^/ -fno-strict-aliasing /' \\\
%{nil}