[PATCH v5 6/6] Drop dependency on libgcc by importing part of FreeBSD's libquad

Bin Meng bmeng.cn at gmail.com
Sun Jul 11 20:55:46 PDT 2021


On Sun, Jul 11, 2021 at 11:46 PM Anup Patel <anup at brainfault.org> wrote:
>
> On Sun, Jul 11, 2021 at 7:58 AM Jessica Clarke <jrtc27 at jrtc27.com> wrote:
> >
> > We only need libgcc for 64-bit division on RV32. Whilst GCC toolchains
> > bundle libgcc, Clang toolchains tend not to ship libclang_rt.builtins
> > given every compiler is a cross-compiler for every target and so you
> > would need a silly number of builds of it, with only the native library
> > available; only vendor-provided Clang toolchains specifically for bare
> > metal cross-compiling are likely to provide it.
> >
> > Thus, import part of FreeBSD's implementation of the division support
> > functions needed and stop linking against libgcc.
> >
> > Signed-off-by: Jessica Clarke <jrtc27 at jrtc27.com>
>
> I tried this patch with GCC linux toolchain and U-Boot SPL and it worked
> fine for me. Other please try LLVM and bare-metal toolchain at your end
> and if you see any issue then please send a fix patch.
>
> Reviewed-by: Anup Patel <anup.patel at wdc.com>
> Tested-by: Anup Patel <anup.patel at wdc.com>
>
> Applied this patch to the riscv/opensbi repo.
>
> @Bin Meng Can you also try RV32 U-Boot SPL ? I did not try that.

It seems RV32 U-Boot SPL is broken, that it does not boot occasionally.

But this has nothing to do with the LLVM changes in this series. It
was due to upstream libfdt changes. I have sent a patch on the U-Boot
side. Booting S-mode U-Boot directly is not affected.

Regards,
Bin



More information about the opensbi mailing list