summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorMichael Brown2023-01-20 01:13:04 +0100
committerMichael Brown2023-01-20 01:17:49 +0100
commita99e435c8e24887ce80c322029ba23103e00d1c2 (patch)
tree0f5ac9d4ab66f3f8666fc80a598e24d8d3006486 /src/util
parent[ena] Allocate an unused Asynchronous Event Notification Queue (AENQ) (diff)
downloadipxe-a99e435c8e24887ce80c322029ba23103e00d1c2.tar.gz
ipxe-a99e435c8e24887ce80c322029ba23103e00d1c2.tar.xz
ipxe-a99e435c8e24887ce80c322029ba23103e00d1c2.zip
[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 <msuchanek@suse.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/elf2efi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c
index 08d790f1..9523ccc3 100644
--- a/src/util/elf2efi.c
+++ b/src/util/elf2efi.c
@@ -33,6 +33,8 @@
#include <fcntl.h>
#include <elf.h>
#include <libgen.h>
+
+#define EFI_HOSTONLY
#include <ipxe/efi/Uefi.h>
#include <ipxe/efi/IndustryStandard/PeImage.h>