From c324cc0c6c5c0cd77a22f79def3472c268d6a6cd Mon Sep 17 00:00:00 2001 From: Robbie Harwood Date: Fri, 25 Mar 2022 19:02:31 +0000 Subject: [PATCH] Add -D_GLIBCXX_ASSERTIONS to CPPFLAGS Signed-off-by: Robbie Harwood --- ...Add-D_GLIBCXX_ASSERTIONS-to-CPPFLAGS.patch | 23 +++++++++++++++++++ pesign.patches | 1 + pesign.spec | 5 +++- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 0003-Add-D_GLIBCXX_ASSERTIONS-to-CPPFLAGS.patch diff --git a/0003-Add-D_GLIBCXX_ASSERTIONS-to-CPPFLAGS.patch b/0003-Add-D_GLIBCXX_ASSERTIONS-to-CPPFLAGS.patch new file mode 100644 index 0000000..0dca694 --- /dev/null +++ b/0003-Add-D_GLIBCXX_ASSERTIONS-to-CPPFLAGS.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Robbie Harwood +Date: Fri, 25 Mar 2022 15:01:54 -0400 +Subject: [PATCH] Add -D_GLIBCXX_ASSERTIONS to CPPFLAGS + +Signed-off-by: Robbie Harwood +--- + Make.defaults | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Make.defaults b/Make.defaults +index 130c1ee..4b0e77c 100644 +--- a/Make.defaults ++++ b/Make.defaults +@@ -79,7 +79,7 @@ ccldflags = $(cflags) $(CCLDFLAGS) $(LDFLAGS) \ + $(call pkg-config-ccldflags) + efi_cflags = $(cflags) + ASFLAGS ?= $(ARCH3264) +-CPPFLAGS ?= -D_FORTIFY_SOURCE=2 ++CPPFLAGS ?= -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS + RANLIBFLAGS ?= $(if $(filter $(CC),gcc),-D) + ARFLAGS ?= $(if $(filter $(CC),gcc),-Dcvqs)$(if $(filter $(CC),clang),-cqvs) + diff --git a/pesign.patches b/pesign.patches index 3126bdf..98cdf7c 100644 --- a/pesign.patches +++ b/pesign.patches @@ -1,2 +1,3 @@ Patch0001: 0001-daemon-remove-always-true-comparison.patch Patch0002: 0002-Fix-building-signed-kernels-on-setups-other-than-koj.patch +Patch0003: 0003-Add-D_GLIBCXX_ASSERTIONS-to-CPPFLAGS.patch diff --git a/pesign.spec b/pesign.spec index 8ca1139..8e803f9 100644 --- a/pesign.spec +++ b/pesign.spec @@ -6,7 +6,7 @@ Name: pesign Summary: Signing utility for UEFI binaries Version: 115 -Release: 2%{?dist} +Release: 3%{?dist} License: GPL-2.0-only URL: https://github.com/rhboot/pesign @@ -161,6 +161,9 @@ certutil -d %{_sysconfdir}/pki/pesign/ -X -L > /dev/null %{python3_sitelib}/mockbuild/plugins/pesign.* %changelog +* Fri Mar 25 2022 Robbie Harwood - 115-3 +- Add -D_GLIBCXX_ASSERTIONS to CPPFLAGS + * Thu Mar 24 2022 Robbie Harwood - 115-2 - Add support for non-koji signing in macros - Resolves: #1880858