From 800352cd275fd20c7c2837127647dde80d40a2a6 Mon Sep 17 00:00:00 2001 From: Mike Beaton Date: Fri, 15 Sep 2023 11:09:15 +0100 Subject: [PATCH] Process OVERRIDE_SECURITY_POLICY in lib/Makefile Without this `make OVERRIDE_SECURITY_POLICY=1` fails with ld: shim.o: in function `install_shim_protocols': /home/mjsbeaton/shim_source/shim.c:1354: undefined reference to `security_policy_install' ld: shim.o: in function `uninstall_shim_protocols': /home/mjsbeaton/shim_source/shim.c:1376: undefined reference to `security_policy_uninstall' Signed-off-by: Mike Beaton --- lib/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Makefile b/lib/Makefile index f81c5c9bd..31f593957 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -31,6 +31,10 @@ ifeq ($(ARCH),arm) DEFINES += -DMDE_CPU_ARM endif +ifneq ($(origin OVERRIDE_SECURITY_POLICY), undefined) + DEFINES += -DOVERRIDE_SECURITY_POLICY +endif + LDFLAGS = -nostdlib -znocombreloc