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

Masahiro Yamada posted 1 patch 6 months, 2 weeks ago
drivers/firmware/efi/libstub/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] efi/libstub: use 'targets' instead of extra-y in Makefile
Posted by Masahiro Yamada 6 months, 2 weeks ago
These objects are built as prerequisites of %.stub.o files.
There is no need to use extra-y, which is planned for deprecation.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 drivers/firmware/efi/libstub/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
index d23a1b9fed75..5ce9f2098b99 100644
--- a/drivers/firmware/efi/libstub/Makefile
+++ b/drivers/firmware/efi/libstub/Makefile
@@ -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
Re: [PATCH] efi/libstub: use 'targets' instead of extra-y in Makefile
Posted by Ard Biesheuvel 6 months, 2 weeks ago
On Mon, 2 Jun 2025 at 20:11, Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> These objects are built as prerequisites of %.stub.o files.
> There is no need to use extra-y, which is planned for deprecation.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Acked-by: Ard Biesheuvel <ardb@kernel.org>

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

> ---
>
>  drivers/firmware/efi/libstub/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
> index d23a1b9fed75..5ce9f2098b99 100644
> --- a/drivers/firmware/efi/libstub/Makefile
> +++ b/drivers/firmware/efi/libstub/Makefile
> @@ -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
>
Re: [PATCH] efi/libstub: use 'targets' instead of extra-y in Makefile
Posted by Masahiro Yamada 6 months, 2 weeks ago
On Tue, Jun 3, 2025 at 3:13 AM Ard Biesheuvel <ardb@kernel.org> wrote:
>
> On Mon, 2 Jun 2025 at 20:11, Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > These objects are built as prerequisites of %.stub.o files.
> > There is no need to use extra-y, which is planned for deprecation.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
>
> Acked-by: Ard Biesheuvel <ardb@kernel.org>
>
> 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/20250602180937.528459-1-masahiroy@kernel.org/



-- 
Best Regards
Masahiro Yamada