@@ -68,13 +68,8 @@ $(obj)/lib-%.o: $(srctree)/lib/%.c FORCE
lib-$(CONFIG_EFI_GENERIC_STUB) += efi-stub.o fdt.o string.o \
$(patsubst %.c,lib-%.o,$(efi-deps-y))
-lib-$(CONFIG_ARM) += arm32-stub.o
-lib-$(CONFIG_ARM64) += arm64-stub.o
-lib-$(CONFIG_X86) += x86-stub.o
-lib-$(CONFIG_RISCV) += riscv-stub.o
-lib-$(CONFIG_LOONGARCH) += loongarch-stub.o
-
-CFLAGS_arm32-stub.o := -DTEXT_OFFSET=$(TEXT_OFFSET)
+lib-y += $(ARCH)-stub.o
+CFLAGS_arm-stub.o := -DTEXT_OFFSET=$(TEXT_OFFSET)
# Even when -mbranch-protection=none is set, Clang will generate a
# .note.gnu.property for code-less object files (like lib/ctype.c),
similarity index 100%
rename from drivers/firmware/efi/libstub/arm32-stub.c
rename to drivers/firmware/efi/libstub/arm-stub.c
Rename arm32-stub.c to arm-stub.c so that we can refer to all of them as $(ARCH)-stub.c Signed-off-by: Ard Biesheuvel <ardb@kernel.org> --- drivers/firmware/efi/libstub/Makefile | 9 ++------- drivers/firmware/efi/libstub/{arm32-stub.c => arm-stub.c} | 0 2 files changed, 2 insertions(+), 7 deletions(-)