Re: [PATCH v4 3/3] riscv: fix building compressed EFI image

"Ard Biesheuvel" <[email protected]>
Newsgroups org.kernel.vger.linux-efi,org.infradead.lists.linux-riscv
Message-ID <[email protected]>
On Wed, 15 Apr 2026, at 11:52, Andy Shevchenko wrote:
> On Tue, Apr 14, 2026 at 01:26:08PM +0300, Dmitry Antipov wrote:
>> When building vmlinuz.efi with CONFIG_EFI_ZBOOT enabled,
>> '__lshrdi3()' is also needed to fix yet another link error:
>> 
>> riscv32-linux-gnu-ld: drivers/firmware/efi/libstub/lib-cmdline.stub.o: in function `__efistub_.L49':
>> __efistub_cmdline.c:(.init.text+0x202): undefined reference to `__efistub___lshrdi3'
>> 
>> And since riscv64 can have CONFIG_EFI_ZBOOT but doesn't need these
>> library routines, introduce CONFIG_EFI_ZBOOT_USE_LIBGCC to manage
>> linking of lib-ashldi3.o and lib-lshrdi3.o on riscv32 only.
>
> Acked-by: Andy Shevchenko <[email protected]>
>
> I think you need a tag from Ard on this.
>

I don't think we need a new Kconfig symbol for this.

Better do something like

zboot-riscv-obj-$(CONFIG_32BIT) += lib-ashldi3.o lib-lshrdi3.o
zboot-obj-$(CONFIG_RISCV)	+= lib-clz_ctz.o $(zboot-riscv-obj-y)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.