Gentoo Archives: gentoo-dev

From: 2b57 <2b57@××××××××××.com>
To: "gentoo-dev@l.g.o" <gentoo-dev@l.g.o>
Subject: [gentoo-dev] Clang/LLVM profile
Date: Mon, 29 Nov 2021 01:42:43
Message-Id: amZW6Zhcb7dUkgpcG7wzyYxJUBCX52afym8gXryvnDfT6YxDiOoYZrvcIl3ZNWgLnZfojNof6SnQ9OTM-iOfsdw6OU3YEw1GQE-Vl_nzwzM=@protonmail.com
1 Hello all,
2
3 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!
4
5 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...
6
7 Anyway, I'd appreciate any feedback and suggestions, since I'm sure I'm not the only one interested in this topic.
8
9 Grab the src here: https://github.com/2b57/toolchain-clang

Replies

Subject Author
[gentoo-dev] Re: Clang/LLVM profile 2b57 <2b57@××××××××××.com>