linux-stable/drivers/firmware/efi
Nathan Chancellor bc24381f57 efi/libstub: Add $(CLANG_FLAGS) to x86 flags
[ Upstream commit 58d746c119 ]

When cross compiling x86 on an ARM machine with clang, there are several
errors along the lines of:

  arch/x86/include/asm/page_64.h:52:7: error: invalid output constraint '=D' in asm

This happens because the x86 flags in the EFI stub are not derived from
KBUILD_CFLAGS like the other architectures are and the clang flags that
set the target architecture ('--target=') and the path to the GNU cross
tools ('--prefix=') are not present, meaning that the host architecture
is targeted.

These flags are available as $(CLANG_FLAGS) from the main Makefile so
add them to the cflags for x86 so that cross compiling works as expected.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lkml.kernel.org/r/20210326000435.4785-4-nathan@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-11 14:47:18 +02:00
..
libstub efi/libstub: Add $(CLANG_FLAGS) to x86 flags 2021-05-11 14:47:18 +02:00
test
apple-properties.c efi/apple-properties: Reinstate support for boolean properties 2021-02-03 23:28:40 +01:00
arm-runtime.c
capsule-loader.c
capsule.c
cper-arm.c
cper-x86.c
cper.c cper,edac,efi: Memory Error Record: bank group/address and chip id 2020-09-17 10:19:52 +03:00
dev-path-parser.c
earlycon.c
efi-bgrt.c
efi-init.c efi: Support for MOK variable config table 2020-09-16 18:53:42 +03:00
efi-pstore.c efi: pstore: move workqueue handling out of efivars 2020-09-29 19:40:57 +02:00
efi.c firmware/efi: Fix a use after bug in efi_mem_reserve_persistent 2021-03-25 09:04:18 +01:00
efibc.c efi: efibc: check for efivars write capability 2020-09-15 18:22:47 +03:00
efivars.c efi: efivars: limit availability to X86 builds 2020-09-29 19:40:57 +02:00
embedded-firmware.c test_firmware: Test platform fw loading on non-EFI systems 2020-09-10 18:19:16 +02:00
esrt.c
fake_mem.c
fake_mem.h
fdtparams.c
Kconfig efi: EFI_EARLYCON should depend on EFI 2020-11-25 16:55:02 +01:00
Makefile RISC-V Patches for the 5.10 Merge Window, Part 1 2020-10-19 18:18:30 -07:00
memattr.c
memmap.c
mokvar-table.c efi: mokvar: add missing include of asm/early_ioremap.h 2020-10-02 10:08:29 +02:00
rci2-table.c
reboot.c
riscv-runtime.c RISC-V: Add EFI runtime services 2020-10-02 14:31:28 -07:00
runtime-map.c
runtime-wrappers.c
tpm.c
vars.c efivars: respect EFI_UNSUPPORTED return from firmware 2021-03-25 09:04:17 +01:00
x86_fake_mem.c efi/fake_mem: arrange for a resource entry per efi_fake_mem instance 2020-10-13 18:38:27 -07:00