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 efi_test: get rid of pointless access_ok() 2020-05-29 11:05:54 -04:00
apple-properties.c efi/apple-properties: Reinstate support for boolean properties 2021-02-03 23:28:40 +01:00
arm-runtime.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
capsule-loader.c efi/capsule-loader: Drop superfluous assignment 2020-02-23 21:58:31 +01:00
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 efi/dev-path-parser: Add struct definition for vendor type device path nodes 2020-02-23 21:59:42 +01:00
earlycon.c efi/earlycon: Fix early printk for wider fonts 2020-05-12 12:29:45 +02:00
efi-bgrt.c efi/bgrt: Accept BGRT tables with a version of 0 2020-02-22 23:37:37 +01:00
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 efi/esrt: Fix reference count leak in esre_create_sysfs_entry. 2020-06-15 14:38:56 +02:00
fake_mem.c efi: Fix handling of multiple efi_fake_mem= entries 2020-01-20 08:14:29 +01:00
fake_mem.h x86/efi: Add efi_fake_mem support for EFI_MEMORY_SP 2019-11-07 15:44:23 +01:00
fdtparams.c efi/arm: Rewrite FDT param discovery routines 2020-02-23 21:59:42 +01:00
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 efi: Move mem_attr_table out of struct efi 2020-02-23 21:59:42 +01:00
memmap.c efi: Fix handling of multiple efi_fake_mem= entries 2020-01-20 08:14:29 +01:00
mokvar-table.c efi: mokvar: add missing include of asm/early_ioremap.h 2020-10-02 10:08:29 +02:00
rci2-table.c efi: Don't attempt to map RCI2 config table if it doesn't exist 2019-12-10 12:13:02 +01:00
reboot.c efi: Use EFI ResetSystem only when available 2020-02-23 21:59:42 +01:00
riscv-runtime.c RISC-V: Add EFI runtime services 2020-10-02 14:31:28 -07:00
runtime-map.c
runtime-wrappers.c efi: Add 'runtime' pointer to struct efi 2020-02-23 21:59:42 +01:00
tpm.c EFI fixes for v5.7-rc6: 2020-05-22 20:06:25 +02:00
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