pesign/0005-fcf-protection-is-arch-specific.patch
Robbie Harwood 840c1cffff Fix explicit NULL deref when daemonizing
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
2022-02-14 21:10:49 +00:00

47 lines
1.5 KiB
Diff

From f03c5fbe6b4327b9ecd781bfdf64147e1b68e6c1 Mon Sep 17 00:00:00 2001
From: Robbie Harwood <rharwood@redhat.com>
Date: Wed, 9 Feb 2022 15:23:27 -0500
Subject: [PATCH 5/5] -fcf-protection is arch-specific
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
(cherry picked from commit c48df510144de3b1187001bc3b5491509da1c58f)
---
Make.defaults | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/Make.defaults b/Make.defaults
index fdb961a..130c1ee 100644
--- a/Make.defaults
+++ b/Make.defaults
@@ -22,11 +22,16 @@ EFI_ARCHES ?= aa64 ia32 x64
enabled = $(if $(filter undefined,$(origin $(1))),$(3),$(2))
+HOSTARCH = $(shell uname -m | sed s,i[3456789]86,ia32,)
+ARCH := $(shell uname -m | sed s,i[3456789]86,ia32,)
+
+
PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config
CC := $(if $(filter default,$(origin CC)),$(CROSS_COMPILE)gcc,$(CC))
CCLD := $(if $(filter undefined,$(origin CCLD)),$(CC),$(CCLD))
CFLAGS ?= -O2 -g3 -pipe -fPIE -fstack-protector-all \
- -fstack-clash-protection -fcf-protection=full
+ -fstack-clash-protection \
+ $(if $(filter x86_64 ia32,$(ARCH)),-fcf-protection=full,)
DIAGFLAGS ?= -fmessage-length=0 \
-fdiagnostics-color=always \
-fdiagnostics-format=text \
@@ -42,9 +47,6 @@ INSTALL ?= $(CROSS_COMPILE)install
PKGS = efivar nspr nss nss-util uuid
-HOSTARCH = $(shell uname -m | sed s,i[3456789]86,ia32,)
-ARCH := $(shell uname -m | sed s,i[3456789]86,ia32,)
-
SOFLAGS ?= -shared
clang_cflags =
gcc_cflags = -Wmaybe-uninitialized -grecord-gcc-switches \
--
2.34.1