Revert annobin's regex removal into cflags_sed
Besides re-introducing the annobin sed replacements, it fixes duplicate '-fstack-protector-strong' flags and remove the sed replacement '-fno-stack-protector' as it has no effect. Resolves: #RHEL-89464 Signed-off-by: Leo Sandoval <lsandova@redhat.com>
This commit is contained in:
parent
e041fb0c9b
commit
6b3c891675
@ -25,7 +25,8 @@
|
|||||||
%global cflags_sed \\\
|
%global cflags_sed \\\
|
||||||
sed \\\
|
sed \\\
|
||||||
-e 's/-O. //g' \\\
|
-e 's/-O. //g' \\\
|
||||||
-e 's/-fno-stack-protector//g' \\\
|
-e 's/-fplugin=annobin//g' \\\
|
||||||
|
-e 's,-specs=[[:alnum:]/_-]*annobin[[:alnum:]_-]*,,g' \\\
|
||||||
-e 's/-[^ ]*D_FORTIFY_SOURCE=[[:digit:]][^ ]*\\+//g' \\\
|
-e 's/-[^ ]*D_FORTIFY_SOURCE=[[:digit:]][^ ]*\\+//g' \\\
|
||||||
-e 's/--param=ssp-buffer-size=4//g' \\\
|
-e 's/--param=ssp-buffer-size=4//g' \\\
|
||||||
-e 's/-mregparm=3/-mregparm=4/g' \\\
|
-e 's/-mregparm=3/-mregparm=4/g' \\\
|
||||||
@ -35,7 +36,7 @@
|
|||||||
-e 's/^/ -fno-strict-aliasing /' \\\
|
-e 's/^/ -fno-strict-aliasing /' \\\
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
%global host_cflags_ %{expand:%%(echo %{build_cflags} %{?_hardening_cflags} -fstack-protector-strong | %{cflags_sed})}
|
%global host_cflags_ %{expand:%%(echo %{build_cflags} %{?_hardening_cflags} | %{cflags_sed})}
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
%global host_cflags %{host_cflags_} -fcf-protection
|
%global host_cflags %{host_cflags_} -fcf-protection
|
||||||
%else
|
%else
|
||||||
@ -49,7 +50,7 @@
|
|||||||
)}
|
)}
|
||||||
%global efi_host_cflags %{expand:%%(echo %{host_cflags})}
|
%global efi_host_cflags %{expand:%%(echo %{host_cflags})}
|
||||||
|
|
||||||
%global target_cflags %{expand:%%(echo %{build_cflags} -fstack-protector-strong | %{cflags_sed})}
|
%global target_cflags %{expand:%%(echo %{build_cflags} | %{cflags_sed})} -fstack-protector-strong
|
||||||
%global legacy_target_cflags \\\
|
%global legacy_target_cflags \\\
|
||||||
%{expand:%%(echo %{target_cflags} | \\\
|
%{expand:%%(echo %{target_cflags} | \\\
|
||||||
%{cflags_sed} \\\
|
%{cflags_sed} \\\
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
Name: grub2
|
Name: grub2
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 2.12
|
Version: 2.12
|
||||||
Release: 26%{?dist}
|
Release: 27%{?dist}
|
||||||
Summary: Bootloader with support for Linux, Multiboot and more
|
Summary: Bootloader with support for Linux, Multiboot and more
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
URL: http://www.gnu.org/software/grub/
|
URL: http://www.gnu.org/software/grub/
|
||||||
@ -574,6 +574,10 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Aug 15 2025 Leo Sandoval <lsandova@redhat.com> 2.12-27
|
||||||
|
- Revert annobin's regex removal into cflags_sed
|
||||||
|
- Resolves: #RHEL-89464
|
||||||
|
|
||||||
* Thu Jul 31 2025 Leo Sandoval <lsandova@redhat.com> 2.12-26
|
* Thu Jul 31 2025 Leo Sandoval <lsandova@redhat.com> 2.12-26
|
||||||
- Enable strong stack protector on EFI configurations
|
- Enable strong stack protector on EFI configurations
|
||||||
- Resolves: #RHEL-89464
|
- Resolves: #RHEL-89464
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user