Skip to content

Commit 483f943

Browse files
committed
overlay coreos/user-patches: Add a patch for sys-libs/efivar
1 parent fff60d9 commit 483f943

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
From ca48d3964d26f5e3b38d73655f19b1836b16bd2d Mon Sep 17 00:00:00 2001
2+
From: Alexander Kanavin <alex@linutronix.de>
3+
Date: Tue, 18 Jan 2022 11:53:41 +0100
4+
Subject: [PATCH] src/Makefile: build util.c separately for makeguids
5+
6+
util.c needs to be built twice when cross-compiling:
7+
for the build machine to be able to link with
8+
makeguids which then runs during the same build,
9+
and then for the actual target.
10+
11+
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
12+
---
13+
src/Makefile | 5 ++++-
14+
1 file changed, 4 insertions(+), 1 deletion(-)
15+
16+
diff --git a/src/Makefile b/src/Makefile
17+
index 0e423c4..a86abdc 100644
18+
--- a/src/Makefile
19+
+++ b/src/Makefile
20+
@@ -27,10 +27,13 @@ EFIVAR_OBJECTS = $(patsubst %.S,%.o,$(pa
21+
EFISECDB_SOURCES = efisecdb.c guid-symbols.c secdb-dump.c util.c
22+
EFISECDB_OBJECTS = $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(EFISECDB_SOURCES)))
23+
GENERATED_SOURCES = include/efivar/efivar-guids.h guid-symbols.c
24+
-MAKEGUIDS_SOURCES = makeguids.c util.c
25+
+MAKEGUIDS_SOURCES = makeguids.c util-makeguids.c
26+
MAKEGUIDS_OBJECTS = $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(MAKEGUIDS_SOURCES)))
27+
MAKEGUIDS_OUTPUT = $(GENERATED_SOURCES)
28+
29+
+util-makeguids.c : util.c
30+
+ cp util.c util-makeguids.c
31+
+
32+
ALL_SOURCES=$(LIBEFISEC_SOURCES) $(LIBEFIBOOT_SOURCES) $(LIBEFIVAR_SOURCES) \
33+
$(MAKEGUIDS_SOURCES) $(GENERATED_SOURCES) $(EFIVAR_SOURCES) \
34+
$(sort $(wildcard include/efivar/*.h))
35+
--
36+
2.34.1
37+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The `0001-src-Makefile-build-util.c-separately-for-makeguids.patch`
2+
patch fixes a cross-compilation issue. We will ask Gentoo to include
3+
this patch too in their ebuild. Currently there is no release of
4+
efivar that has this patch.

0 commit comments

Comments
 (0)