diff options
| author | Alexander Graf <[email protected]> | 2018-06-22 01:38:26 -0700 |
|---|---|---|
| committer | Bin Meng <[email protected]> | 2018-06-24 08:56:04 +0800 |
| commit | 018664464628686d41f3d36e5428bb50d9094977 (patch) | |
| tree | d8cd6f3d989a01bd3968264ad93d2a51eb556f57 /lib/efi | |
| parent | 1ab2c010879baff93c690be8d98d294e9ccfab94 (diff) | |
efi.h: Do not use config options
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 <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Tested-by: Bin Meng <[email protected]>
[bmeng: added some comments to describe the __x86_64__ check]
Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'lib/efi')
| -rw-r--r-- | lib/efi/Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/efi/Makefile b/lib/efi/Makefile index f1a3929e32b..a790d2d554c 100644 --- a/lib/efi/Makefile +++ b/lib/efi/Makefile @@ -7,11 +7,11 @@ 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 -DEFI_STUB \ +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 -DEFI_STUB \ +CFLAGS_efi.o := -fpic -fshort-wchar \ $(if $(CONFIG_EFI_STUB_64BIT),-m64) extra-$(CONFIG_EFI_STUB) += efi_stub.o efi.o |
