[PATCH v1 0/1] Update rtems-llvm to version 11.1.0
Hesham Almatary
heshamelmatary at gmail.com
Wed Feb 15 10:17:03 UTC 2023
On Wed, 15 Feb 2023 at 09:22, <Jan.Sommer at dlr.de> wrote:
>
>
>
> > -----Original Message-----
> > From: Hesham Almatary <heshamelmatary at gmail.com>
> > Sent: Montag, 13. Februar 2023 16:19
> > To: Sommer, Jan <Jan.Sommer at dlr.de>
> > Cc: joel at rtems.org; devel at rtems.org
> > Subject: Re: [PATCH v1 0/1] Update rtems-llvm to version 11.1.0
> >
> > On Mon, 13 Feb 2023 at 12:12, <Jan.Sommer at dlr.de> wrote:
> > >
> > > > -----Original Message-----
> > > > From: Joel Sherrill <joel at rtems.org>
> > > > Sent: Freitag, 10. Februar 2023 15:21
> > > > To: Sommer, Jan <Jan.Sommer at dlr.de>
> > > > Cc: devel at rtems.org
> > > > Subject: Re: [PATCH v1 0/1] Update rtems-llvm to version 11.1.0
> > > >
> > > >
> > > >
> > > > On Fri, Feb 10, 2023 at 3:16 AM Jan Sommer <jan.sommer at dlr.de
> > > > <mailto:jan.sommer at dlr.de> > wrote:
> > > >
> > > >
> > > > Hello,
> > > >
> > > > I couldn't get the rtems-llvm buildset to work.
> > > > As it was building llvm8 which is not that modern, I just tried to build
> > > > a more recent version with the scripts.
> > > > It works with llvm11. Are there any objections to updating?
> > > >
> > > >
> > > >
> > > > Nope. Please feel free to add this.
> > > >
> > > >
> > > > And should we keep the rtems-llvm-8.cfg or should I remove
> > > > this with
> > > > this patch?
> > > >
> > > >
> > > >
> > > > My main concern is if the architectures that built with llvm 8
> > > > still build with llvm 11. I think that's only SPARC and RISC-V. Are there
> > others?
> > > >
> > Why not the latest LLVM (especially to pick up the latest RISC-V
> > fixes/support). I am not sure how mature the RISC-V support is in LLVM 8, if
> > it was supported at all.
> >
>
> Yes, that is also my goal. I got llvm11 building with only small changes to the buildset and wanted to go from there.
> In the meantime I also managed to build llvm up to 14 locally. Once I have all the bits and pieces working to some degree I will probably consolidate to a more recent version.
>
Seems like a good plan.
> > > > I guess that points to me not knowing the list of architectures that
> > > > are expected to work. I wonder where we would keep this information.
> > > > Any thoughts?
> > > >
> > >
> > > Thanks for the information.
> > > I tried to build those to check if they still work and failed, but given that the
> > information I could find is sparse I could very well be the problem.
> > > What I did is:
> > > - Build the gcc toolchains for sparc and riscv (as far as I understand
> > > we need the binutils and libc from that)
> > I haven't tried doing that for RISC-V. I used to build newlib manually, and not
> > rely on GCC/binutils.
> >
>
> Ah, I see. Just for clarification you also cross-built newlib with clang?
>
Yes, besides compiler-rt (LLVM's version of libgcc). But you don't
need to go all the way there, you can just use GCC's newlib.
> > > - Build the rtems-llvm build set
> > > - Generate a config for waf using: ./waf bspdefaults
> > > --rtems-bsps='sparc/gr712rc' --rtems-compiler=clang > sparc.cfg
> > > - Configure the build with the config: ./waf configure
> > > --rtems-config=sparc.cfg -$INSTALL_DIR
> > > - Run ./waf
> > > - I also tried with some riscv BSPs with the same results.
> > >
> > > The build fails with missing std headers (stddef.h).
> > > Looking at the generated config file there are only small differences to the
> > one for gcc (essentially the compiler name changed to clang).
> > > And the verbose output confirms that the gcc toolchain is not part of the
> > include paths.
> > > I didn't find an obvious option in "waf configure" to add this.
> > I added [1] an option for "sysroot" in the old build system so that Clang could
> > find the C library. I don't think that was integrated in waf. However, I was also
> > using CHERI-based LLVM with a modified Driver so that it automatically
> > fetches the C library (after it gets manually built and installed under a
> > convenient LLVM) related to the LLVM install path.
> >
> > [1]
> > https://github.com/RTEMS/rtems/commit/94481cedc4165f6a49ef528709825
> > 1740922fee1
> >
>
> Ah, thanks for this. I think this is a good starting point to experiment with.
>
> Best regards,
>
> Jan
>
> > > If you say that building worked only for few BSPs. Do you remember which
> > ones and if there was some magic to do first?
> > > Then I could try to reproduce this with the llvm11 compiler.
> > I don't think they'll build as is without a few modifications to the build
> > system. Simplest thing to do is to use GCC's libgcc and newlib and add a
> > "sysroot" or "-L -I" options to the current build system for them.
> >
> > >
> > > Best regards,
> > >
> > > Jan
> > >
> > > > --joel
> > > >
> > > >
> > > > Have a nice weekend,
> > > >
> > > > Jan
> > > >
> > > > Jan Sommer (1):
> > > > rtems-tools: Update rtems-llvm to version 11.1.0
> > > >
> > > > rtems/config/6/rtems-llvm.bset | 2 +-
> > > > rtems/config/tools/rtems-llvm-11.1.0.cfg | 21
> > > > +++++++++++++++++++++
> > > > source-builder/config/llvm-common-1.cfg | 6 +++---
> > > > 3 files changed, 25 insertions(+), 4 deletions(-)
> > > > create mode 100644 rtems/config/tools/rtems-llvm-11.1.0.cfg
> > > >
> > > > --
> > > > 2.25.1
> > > >
> > > > _______________________________________________
> > > > devel mailing list
> > > > devel at rtems.org <mailto:devel at rtems.org>
> > > > http://lists.rtems.org/mailman/listinfo/devel
> > > >
> > >
> > > _______________________________________________
> > > devel mailing list
> > > devel at rtems.org
> > > http://lists.rtems.org/mailman/listinfo/devel
> >
> >
> >
> > --
> > Regards,
> > Hesham
--
Regards,
Hesham
More information about the devel
mailing list