linux/drivers/firmware/efi/libstub
Nathan Chancellor 58d746c119 efi/libstub: Add $(CLANG_FLAGS) to x86 flags
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
2021-03-26 11:34:58 +01:00
..
Makefile efi/libstub: Add $(CLANG_FLAGS) to x86 flags 2021-03-26 11:34:58 +01:00
alignedmem.c
arm32-stub.c
arm64-stub.c arm64/mm: Fix __enable_mmu() for new TGRAN range values 2021-03-10 11:01:57 +00:00
efi-stub-helper.c
efi-stub.c efi: stub: omit SetVirtualAddressMap() if marked unsupported in RT_PROP table 2021-03-07 09:31:02 +01:00
efistub.h efi/libstub: move TPM related prototypes into efistub.h 2021-01-19 17:57:15 +01:00
fdt.c efi: stub: get rid of efi_get_max_fdt_addr() 2020-12-09 08:37:27 +01:00
file.c
gop.c
mem.c
pci.c
random.c
randomalloc.c
relocate.c
riscv-stub.c
secureboot.c efi: x86/xen: switch to efi_get_secureboot_mode helper 2020-11-17 15:09:32 +01:00
skip_spaces.c
string.c
tpm.c
vsprintf.c
x86-stub.c efi/x86: Only copy the compressed kernel image in efi_relocate_kernel() 2020-10-26 08:06:36 +01:00