This is the equivalent of #870085 and #908992 but for mail-client/thunderbird. Clang version override done by the llvm.eclass has no effect on distcc build servers since it overrides the used LLVM version by prepending the path to the chosen version to PATH. This PATH editing happens only on the machine actually running emerge. On the other hand, distcc build servers still run such distributed builds by using what their preferred clang version is (usually the latest one). This breaks in case the version chosen by the llvm.eclass on the machine running emerge isn't the one preferred on the distcc build servers - especially in the LTO case since linking object files generated by different clang versions isn't supported. The fix for this is simple - instead of overriding CC to unversioned "${CHOST}-clang" in the ebuild override it to "${CHOST}-clang-${version_clang}" instead. Same with CXX. I can confirm that with the above change I can successfully build the package in such distcc environment, even with LTO on.
Created attachment 864405 [details, diff] fix
While I have not tried your specific solution (honestly, I don't know how), I did simply turn off usage of distcc and mail-client/thunderbird-102.13.0 now compiles and installs just fine. Thanks for your work! Let me know if you would like more information about this system. Installed versions: 102.13.0(XX:43:48 PM 07/11/2023)(clang eme-free hardened hwaccel lto system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-librnp system-libvpx system-webp -dbus -debug -jack -libproxy -openh264 -pgo -pulseaudio -selinux -sndio -system-png -system-python-libs -wayland -wifi CPU_FLAGS_ARM="-neon" L10N="-af -ar -ast -be -bg -br -ca -cak -cs -cy -da -de -dsb -el -en-CA -en-GB -es-AR -es-ES -es-MX -et -eu -fi -fr -fy -ga -gd -gl -he -hr -hsb -hu -id -is -it -ja -ka -kab -kk -ko -lt -lv -ms -nb -nl -nn -pa -pl -pt-BR -pt-PT -rm -ro -ru -sk -sl -sq -sr -sv -th -tr -uk -uz -vi -zh-CN -zh-TW")
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a68115bb5494d9f85c23928a1547be25c7f3d0f4 commit a68115bb5494d9f85c23928a1547be25c7f3d0f4 Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2023-07-12 15:30:03 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2023-07-12 15:33:39 +0000 mail-client/thunderbird: add 115.0 Bug: https://bugs.gentoo.org/910229 Bug: https://bugs.gentoo.org/908993 Bug: https://bugs.gentoo.org/907963 Signed-off-by: Joonas Niilola <juippis@gentoo.org> mail-client/thunderbird/Manifest | 66 ++ mail-client/thunderbird/thunderbird-115.0.ebuild | 1319 ++++++++++++++++++++++ 2 files changed, 1385 insertions(+)