From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9B789158086 for ; Mon, 29 Nov 2021 01:52:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4EE7C2BC093; Mon, 29 Nov 2021 01:52:05 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 02BCC2BC016 for ; Mon, 29 Nov 2021 01:52:05 +0000 (UTC) From: Sam James Content-Type: multipart/signed; boundary="Apple-Mail=_960A2DA4-84CD-4041-B4C5-E09BFE1401FC"; protocol="application/pgp-signature"; micalg=pgp-sha512 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Subject: Re: [gentoo-dev] Clang/LLVM profile Date: Mon, 29 Nov 2021 01:51:59 +0000 References: To: gentoo-dev@lists.gentoo.org In-Reply-To: Message-Id: <9B8995ED-4ADA-4386-87D1-B46B5FB75694@gentoo.org> X-Mailer: Apple Mail (2.3693.20.0.1.32) X-Archives-Salt: ce42bf4d-ae2d-487e-a7b5-4881d93f5f73 X-Archives-Hash: 5ff18fe57a99a74388a4a3a8f64c8004 --Apple-Mail=_960A2DA4-84CD-4041-B4C5-E09BFE1401FC Content-Type: multipart/alternative; boundary="Apple-Mail=_4D86EE16-2BD3-4F4D-957E-957644385742" --Apple-Mail=_4D86EE16-2BD3-4F4D-957E-957644385742 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 29 Nov 2021, at 01:45, 2b57 <2b57@protonmail.com> wrote: >=20 > Sorry all, it seems that I've confused the lists. I'll forward this to = user >=20 > =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 = Original Message =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2= =80=90 > On Monday, November 29th, 2021 at 2:42 AM, 2b57 <2b57@protonmail.com> = wrote: >> Hello all, >>=20 >> I'm in the middle of developing a proof-of-concept "native" = Clang/LLVM profile =E2=80=93 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! >>=20 >> 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... >>=20 >> Anyway, I'd appreciate any feedback and suggestions, since I'm sure = I'm not the only one interested in this topic. >>=20 >> Grab the src here: https://github.com/2b57/toolchain-clang = >=20 Honestly, I think this is pretty on-topic for gentoo-dev given a lot of = us are quite interested in this. That said, a few notes: - 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? - _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 or that it's invalid to try! They're still bugs nonetheless. Please do let us know via Bugzilla if there's some quirks we need to add = to ebuilds. 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. Best, sam --Apple-Mail=_4D86EE16-2BD3-4F4D-957E-957644385742 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On 29 Nov 2021, at 01:45, 2b57 <2b57@protonmail.com>= wrote:

Sorry all, it seems that I've confused the lists. I'll = forward this to user

=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 = Original Message =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2= =80=90
On Monday, November 29th, 2021 at 2:42 AM, 2b57 <2b57@protonmail.com>= wrote:
Hello all,

I'm in the middle of = developing a proof-of-concept "native" Clang/LLVM profile =E2=80=93 = 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!

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...

Anyway, I'd appreciate any feedback and suggestions, since = I'm sure I'm not the only one interested in this topic.



Honestly, I think = this is pretty on-topic for gentoo-dev given a lot of us are quite = interested in this.

That said, a few = notes:
- 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?

- _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
or that it's invalid to = try! They're still bugs nonetheless.

Please= do let us know via Bugzilla if there's some quirks we need to add to = ebuilds.

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.

Best,
sam
= --Apple-Mail=_4D86EE16-2BD3-4F4D-957E-957644385742-- --Apple-Mail=_960A2DA4-84CD-4041-B4C5-E09BFE1401FC Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEEYOpPv/uDUzOcqtTy9JIoEO6gSDsFAmGkMj9fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDYw RUE0RkJGRkI4MzUzMzM5Q0FBRDRGMkY0OTIyODEwRUVBMDQ4M0IACgkQ9JIoEO6g SDsiEAf+PNrs22KWx48ID47oyJMZoqHniPnUBs8Ac3AIqVezB597r7YJEDWW0GWd TCvZol/TBQQj9uGRZZmKiSZ/9wHzB8lxDlxMc/SPolBlX85aDoVcaQZwJxDY8d8f yJhoWohBtHw2ih0u7pXDTLSojEhp6UBB8IhTNI6ANvbDJIDywmdgPM+9+Uy+Aa9r +6APtvKzjNlfoLf/kh28QUvgMdWaTnt+N7TFQ5QiR2BhhaiAGeTKacWC+PxWKf+M H+LrSJqdogOMjS1qUNxl5ypR9qKXDezluUyFneO/0CdaZuDSsGJUGVuJJbNkhUcP PF571MOHW3T1lVTEla8FZOrDE0rvaA== =wqEi -----END PGP SIGNATURE----- --Apple-Mail=_960A2DA4-84CD-4041-B4C5-E09BFE1401FC--