Gentoo Archives: gentoo-dev

From: Sam James <sam@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Clang/LLVM profile
Date: Mon, 29 Nov 2021 01:52:09
Message-Id: 9B8995ED-4ADA-4386-87D1-B46B5FB75694@gentoo.org
In Reply to: [gentoo-dev] Re: Clang/LLVM profile by 2b57 <2b57@protonmail.com>
1 > On 29 Nov 2021, at 01:45, 2b57 <2b57@××××××××××.com> wrote:
2 >
3 > Sorry all, it seems that I've confused the lists. I'll forward this to user
4 >
5 > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
6 > On Monday, November 29th, 2021 at 2:42 AM, 2b57 <2b57@××××××××××.com> wrote:
7 >> Hello all,
8 >>
9 >> I'm in the middle of developing a proof-of-concept "native" Clang/LLVM profile – such, that stage3 built using this profile will not even contain GCC and binutils. Why? Well, because Clang is in pretty good shape lately, you can compile kernel and elfutils even. Also just for fun!
10 >>
11 >> The approach I've decided to take is to create virtual/toolchain and virtual/binutils packages with RDEPEND attributes set to gcc || clang and binutils || llvm. I've reached a point where modifications to ::gentoo/scripts/bootstrap.sh are needed, and currently I've solved it with making an OverlayFS overlay, which combines both ::gentoo repo and my custom script. General idea is that once LLVM toolchain is in place (stage1), custom profile for stage2 masks gcc/binutils and virtuals get resolved by LLVM stuff. However, that is not the case; something goes wrong and it seems that binutils package is deeply embedded somewhere else...
12 >>
13 >> Anyway, I'd appreciate any feedback and suggestions, since I'm sure I'm not the only one interested in this topic.
14 >>
15 >> Grab the src here: https://github.com/2b57/toolchain-clang <https://github.com/2b57/toolchain-clang>
16 >
17
18 Honestly, I think this is pretty on-topic for gentoo-dev given a lot of us are quite interested in this.
19
20 That said, a few notes:
21 - I'm not sure why you would need virtual/toolchain or virtual/binutils unless it's just for usage within bootstrapping scripts? Seems more like you could just remove gcc from @system and such?
22
23 - _personally_, I'd prefer to do experimentation using libstdc++ from GCC and try libcxx later on as a fair amount of things still fail to build with LLVM's libcxx. But that doesn't mean others have the same view
24 or that it's invalid to try! They're still bugs nonetheless.
25
26 Please do let us know via Bugzilla if there's some quirks we need to add to ebuilds.
27
28 We also have a group of us interested in using Clang in #gentoo-arm on libera.chat (IRC) -- the channel is not super restricted to ARM chat.
29
30 Best,
31 sam

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Clang/LLVM profile "Andreas K. Huettel" <dilfridge@g.o>