mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-22 11:13:07 +00:00
0186644646
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> Reviewed-by: Simon Glass <sjg@chromium.org>
17 lines
529 B
Makefile
17 lines
529 B
Makefile
# SPDX-License-Identifier: GPL-2.0+
|
|
#
|
|
# (C) Copyright 2015 Google, Inc
|
|
|
|
obj-$(CONFIG_EFI_APP) += efi_app.o efi.o
|
|
obj-$(CONFIG_EFI_STUB) += efi_info.o
|
|
|
|
CFLAGS_REMOVE_efi_stub.o := -mregparm=3 \
|
|
$(if $(CONFIG_EFI_STUB_64BIT),-march=i386 -m32)
|
|
CFLAGS_efi_stub.o := -fpic -fshort-wchar \
|
|
$(if $(CONFIG_EFI_STUB_64BIT),-m64)
|
|
CFLAGS_REMOVE_efi.o := -mregparm=3 \
|
|
$(if $(CONFIG_EFI_STUB_64BIT),-march=i386 -m32)
|
|
CFLAGS_efi.o := -fpic -fshort-wchar \
|
|
$(if $(CONFIG_EFI_STUB_64BIT),-m64)
|
|
|
|
extra-$(CONFIG_EFI_STUB) += efi_stub.o efi.o
|