
On Sat, Jun 23, 2018 at 10:21 PM, Simon Glass sjg@chromium.org wrote:
On 22 June 2018 at 02:38, Bin Meng bmeng.cn@gmail.com wrote:
From: Alexander Graf agraf@suse.de
Currently efi.h determines a few bits of its environment according to config options. This falls apart with the efi stub support which may result in efi.h getting pulled into the stub as well as real U-Boot code. In that case, one may be 32bit while the other one is 64bit.
This patch changes the conditionals to use compiler provided defines instead. That way we always adhere to the build environment we're in and the definitions adjust automatically.
Signed-off-by: Alexander Graf agraf@suse.de Reviewed-by: Bin Meng bmeng.cn@gmail.com Tested-by: Bin Meng bmeng.cn@gmail.com [bmeng: added some comments to describe the __x86_64__ check] Signed-off-by: Bin Meng bmeng.cn@gmail.com
include/efi.h | 24 +++++++++++------------- lib/efi/Makefile | 4 ++-- 2 files changed, 13 insertions(+), 15 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
applied to u-boot-x86, thanks!