Saturday, December 04, 2021

Re: devel/llvm13 port ?

On Fri, Dec 03, 2021 at 12:22:06PM +0100, Sebastien Marie wrote:
> Hi,
>
> While there is on-going work to get llvm13 in base, I started to look
> to make a devel/llvm13 port, independant from devel/llvm (which is
> mirroring version in base), in order to be able to continue working on
> recent compilers which require recent llvm version.
>
> For what I am aware:
> - lang/rust : the next version (in 6 weeks) require at least llvm12 (and I don't
> even build it for now due to this missing dependency)
> - lang/zig : the next version (before end of month) require llvm13
>
> And I want to avoid building embedded llvm13 in both ports.
>
> The attached port is based on mortimer@ work instead of plain llvm
> version. It permits to avoid patching llvm and reuse the (good) work
> already done instead of duplicate it.
>
> To avoid conflict with devel/llvm, I installed devel/llvm13 inside
> ${LOCALBASE}/llvm13 . It should make it undetectable by others ports,
> and shouldn't influence them.
>
> I intent to not link it in the build (devel/Makefile) and let's ports
> using it in BUILD_DEPENDS to trigger the build of the port. It should
> avoid building it on archs where no others ports are using it (Am I
> right ?)
>
> The devel/llvm13 port is simple and focus on providing required parts
> for rust or zig: llvm libraries, clang binary and libraries, lld
> binary and libraries. It doesn't include lldb or python module for
> example.
>
> Once devel/llvm will reach llvm-13 version, this port could be pushed
> to Attic. It should permit in mid-term to continue to have lang/rust
> or lang/zig working without pushing too much pressure on
> llvm13-in-base work.
>
> MAINTAINER variable is undefined for now, but I would be fine to take
> the maintainership of it (as I am the main customer for it with rust
> or zig).
>

Just some comments.

The attached tarball is still WIP (my previous mail was wrong to asked
for "ok"). But I am mostly interested in feedback on the direction for
now.

I have an updated repository at https://github.com/semarie/llvmNN-ports

It is working for amd64 (I am able to build rust and zig with it).
From the initial tarball, I needed to change GetLibraryName.cmake to
properly see "-lz" (and not "-lz.so.6.0"). Rust build is using
llvm-config output, and failed here.

I started to look at sparc64: it will an interesting arch, as c++
ports are using estdc++ by default. For now I don't copied the related
code from devel/llvm to devel/llvm13 (to make clang-13 to use estdc++
instead of libc++ for generated code), as I am unsure it would be
useful for building programs (but building libraries would be
problematic as mixing estdc++ and libc++ code will not work). For now,
I am experimenting.

Thanks.
--
Sebastien Marie

No comments:

Post a Comment