Re: [RFC PATCH 00/10] Improve ARM target's support for LLVM toolchain

Ilias Apalodimas
2023-05-22T06:53:23Z

Hi Sam,

On Sun, 21 May 2023 at 07:59, Sam Edwards <cfsworks@gmail.com> wrote:
>
> On 5/20/23 22:26, Heinrich Schuchardt wrote:
> > Hello Sam,
>
> Hi Heinrich! Good to hear from you.
>
> > I guess the documentation and the CI testing would also have to be adjusted.
>
> Ah, yeah, those are going to be big things for me to look at when this
> series starts to mature out of the RFC phase. CI is definitely important
> so that the hard-won compatibility doesn't just decay away. :)
>
> > What about non-ARM architectures?
>
> If there's a groundswell of demand for building U-Boot on LLVM, I'd be
> willing to collaborate with others on getting the other architectures up
> to parity with GNU. But since the linker scripts, relocation thunks,
> sections, and whatnot are all arch-specific, I'm only focusing on ARM
> for now (which is both the arch I need and one of the more common ones).

I can help clean up the arm architecture even further. I was toying
with the idea of having page-aligned sections and eventually map
u-boot with proper permissions per section. Right now (at least for
the majority of arm platforms) we are doing RWX for all the memory,
apart from devices that are mapped as RW. I do have an awfully hacky
PoC around, but the linker script cleanup is more than welcome.

>
> Is there a particular arch you'd like to see next? It seems everything
> U-Boot supports is supported by LLVM, except for Microblaze, NIOS2, and SH.
>
> > Could you, please, describe how built with lld so that reviewers can test it.
>
> I've been building with:
>
> nice make CC='clang --target=armv7l-none-eabi' \
> LTO_FINAL_LDFLAGS=-fuse-ld=lld LD=ld.lld OBJCOPY=llvm-objcopy
>
> ...though mostly at this stage I'm just hoping for folks to confirm that
> this patchset causes no regressions in their existing GNU environments.
> (Feedback from LLVM-land would be appreciated nonetheless, though!!!)
>
> > I find reviewing hard when receiving only 3 out of 10 patches.
>
> Oof sorry about that. I haven't actually joined the U-Boot mailing list
> yet so the other patches are probably caught in the moderation queue. I
> guess wait for moderation approval and see if the other 7 arrive then --
> I can resend the whole series to you specifically if not.

It's probably not a mailing list issue. I only got the efi related
patches on my mailbox. The recipients were generated with
get_maintainers.pl? Heinirch and I only received the efi* portions as
we maintain that subsystem

Thanks!
/Ilias
>
> Cheers,
> Sam