Since we're prepending the LLVM path which can contain clang executables, we're overriding the wrappers Portage creates for ccache/distcc/icecc. Might be worthwhile to look into supporting that somehow. Also, if someone uses unversioned clang in CC/CXX, we might enforce an older clang version.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0dc9c1d46d3e318a84af8fc89c9037915fa237d0 commit 0dc9c1d46d3e318a84af8fc89c9037915fa237d0 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2020-03-29 21:10:29 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2020-03-30 11:45:09 +0000 www-client/firefox: fix PATH for FEATURES=ccache/distcc Bug: https://bugs.gentoo.org/627726 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> www-client/firefox/firefox-68.6.0-r2.ebuild | 24 ++++++++++++++++++++++++ www-client/firefox/firefox-74.0-r2.ebuild | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+)
I think that good solution would be to insert /usr/lib/llvm/${llvm_slot}/bin not at the beginning of PATH, but directly before first element, which is any of the following: /usr/lib/llvm/*/bin $(realpath /usr/lib/llvm)/*/bin (With ${BROOT}, ${ESYSROOT}, ${EPREFIX} as appropriate.) Support for no longer existing sys-devel/llvm:0, which was using /usr/bin, can be dropped.
Also probably llvm_pkg_setup() should call get_llvm_prefix() with -b option in EAPI >= 7.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1e8874cc2de2055c3a07f7faf0c78d723106d06 commit f1e8874cc2de2055c3a07f7faf0c78d723106d06 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2020-05-26 07:41:40 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2020-05-28 11:41:22 +0000 llvm.eclass: Fix prepending LLVM path before system paths Do not prepend LLVM path before system path, in particular before ccache/distcc paths. Instead, prepend it before the first LLVM version found in PATH, or append to the end if no LLVM is found in PATH. Closes: https://bugs.gentoo.org/627726 Signed-off-by: Michał Górny <mgorny@gentoo.org> eclass/llvm.eclass | 25 +++++++++++++++++++++++-- eclass/tests/llvm.sh | 16 ++++++++-------- 2 files changed, 31 insertions(+), 10 deletions(-)