From a99e435c8e24887ce80c322029ba23103e00d1c2 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 20 Jan 2023 00:13:04 +0000 Subject: [efi] Do not rely on ProcessorBind.h when building host binaries We cannot rely on the EDK2 ProcessorBind.h headers when compiling a binary for execution on the build host itself (e.g. elf2efi), since the host's CPU architecture may not even be supported by EDK2. Fix by skipping ProcessorBind.h when building a host binary, and defining the bare minimum required to allow other EDK2 headers to compile cleanly. Reported-by: Michal Suchánek Signed-off-by: Michael Brown --- src/util/elf2efi.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/util/elf2efi.c') diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c index 08d790f1e..9523ccc31 100644 --- a/src/util/elf2efi.c +++ b/src/util/elf2efi.c @@ -33,6 +33,8 @@ #include #include #include + +#define EFI_HOSTONLY #include #include -- cgit v1.2.3-55-g7522