summaryrefslogtreecommitdiff
path: root/include/efi.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-11-07 15:47:06 (GMT)
committerAlexander Graf <agraf@suse.de>2016-11-14 22:24:03 (GMT)
commit5abd9137d5329e84827c265bc950287043eac636 (patch)
treef1cf70d9912f3471a1ae7d2be0a6672b71db40f9 /include/efi.h
parent5ee31baf813123e2816e55cf2b5aaf604770da8b (diff)
downloadu-boot-5abd9137d5329e84827c265bc950287043eac636.tar.xz
x86: Tidy up selection of building the EFI stub
At present we use a CONFIG option in efi.h to determine whether we are building the EFI stub or not. This means that the same header cannot be used for EFI_LOADER support. The CONFIG option will be enabled for the whole build, even when not building the stub. Use a different define instead, set up just for the files that make up the stub. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include/efi.h')
-rw-r--r--include/efi.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/efi.h b/include/efi.h
index d07187c..3d58780 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -30,8 +30,11 @@ struct efi_device_path;
#define EFI_BITS_PER_LONG BITS_PER_LONG
-/* With 64-bit EFI stub, EFI_BITS_PER_LONG has to be 64 */
-#ifdef CONFIG_EFI_STUB_64BIT
+/*
+ * With 64-bit EFI stub, EFI_BITS_PER_LONG has to be 64. EFI_STUB is set
+ * in lib/efi/Makefile, when building the stub.
+ */
+#if defined(CONFIG_EFI_STUB_64BIT) && defined(EFI_STUB)
#undef EFI_BITS_PER_LONG
#define EFI_BITS_PER_LONG 64
#endif