]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[efi] Do not rely on ProcessorBind.h when building host binaries 857/head
authorMichael Brown <mcb30@ipxe.org>
Fri, 20 Jan 2023 00:13:04 +0000 (00:13 +0000)
committerMichael Brown <mcb30@ipxe.org>
Fri, 20 Jan 2023 00:17:49 +0000 (00:17 +0000)
commita99e435c8e24887ce80c322029ba23103e00d1c2
tree0f5ac9d4ab66f3f8666fc80a598e24d8d3006486
parent6b977d1250e497abd357cca863140361472a6082
[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>
src/include/ipxe/efi/ProcessorBind.h
src/util/elf2efi.c