Skip to contentSkip to conversation

efi/libstub: use 'targets' instead of extra-y in Makefile

PATCH In review Masahiro Yamada 2 participants 3 messages Jun 2, 2025 – Jun 5, 2025 EFI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efi/libstub: use 'targets' instead of extra-y in Makefile

These objects are built as prerequisites of %.stub.o files. There is no need to use extra-y, which is planned for deprecation.

---

 drivers/firmware/efi/libstub/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/efi/libstub/Makefile +1 -1
index d23a1b9fed75..5ce9f2098b99 100644
@@ -102,7 +102,7 @@ lib-$(CONFIG_EFI_ZBOOT)		+= zboot.o $(zboot-obj-y)
 
 lib-$(CONFIG_UNACCEPTED_MEMORY) += unaccepted_memory.o bitmap.o find.o
 
-extra-y				:= $(lib-y)
+targets				:= $(lib-y)
 lib-y				:= $(patsubst %.o,%.stub.o,$(lib-y))
 
 # Even when -mbranch-protection=none is set, Clang will generate a
Signature · 1 line
2.43.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Masahiro Yamada

These objects are built as prerequisites of %.stub.o files. There is no need to use extra-y, which is planned for deprecation.

I misunderstood what extra-y was for - note that
arch/arm64/kernel/pi/Makefile has the same issue.

Quoted 21 lines

---

 drivers/firmware/efi/libstub/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/efi/libstub/Makefile +1 -2
index d23a1b9fed75..5ce9f2098b99 100644
@@ -102,7 +102,7 @@ lib-$(CONFIG_EFI_ZBOOT)             += zboot.o $(zboot-obj-y)
 
 lib-$(CONFIG_UNACCEPTED_MEMORY) += unaccepted_memory.o bitmap.o find.o
 
-extra-y                                := $(lib-y)
+targets                                := $(lib-y)
 lib-y                          := $(patsubst %.o,%.stub.o,$(lib-y))
 
 # Even when -mbranch-protection=none is set, Clang will generate a
--

2.43.0

#2 lore raw
Quoted 6 lines · Ard Biesheuvel
Quoted 4 lines · Masahiro Yamada

These objects are built as prerequisites of %.stub.o files. There is no need to use extra-y, which is planned for deprecation.

Quoted 6 lines
Quoted 1 line

I misunderstood what extra-y was for - note that
arch/arm64/kernel/pi/Makefile has the same issue.

Applied to linux-kbuild.

A patch exists for arm64 too

https://lore.kernel.org/lkml/[email protected]/

Signature · 2 lines
Best Regards
Masahiro Yamada