Emerge dev-util/ccache should use FEATURES="-ccache" --- I found this when being hit today by the dev-cpp/cpp-httplib-0.17.3-r1 update: # ccache gcc --version ccache: symbol lookup error: ccache: undefined symbol: _ZN7httplib6Client19set_default_headersESt18unordered_multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_NS_6detail16case_ignore_hashENS8_17case_ignore_equalESaISt4pairIKS7_S7_EEE See also https://bugs.gentoo.org/938011#c3 emerge was completely broken. Neither emerge portage nor emerge ccache did work. e.g. emerge portage just showed meson.build:1:0: ERROR: Unknown compiler(s): [['x86_64-pc-linux-gnu-gcc']] --- FEATURES="-ccache" emerge ccache did fix it. I wonder if emerge ccache could be compiled without using ccache as compiler wrapper. I remember other breakage of ccache where that could have fixed it even without user intervention.
Fiddling with FEATURES in the ebuild is forbidden/not possible, but the linked PR contains a workaround that we collectively came up with on IRC. This can serve as inspiration for a "filter-ccache" function in toolchain.
I would have hoped for RESTRICT="ccache" but that seems to not exist. :-(
I don't quite see why we should treat ccache specially here. Surely any toolchain component could potentially break in a similar fashion?
I once had an issue where ccache worked in general but still had some strange issues. That could only be worked around by compiling ccache with FEATURES="-ccache" But I never found out what the real issue was.
I don't think it makes sense to remove the PR link. The discussion remains there even if merging it isn't going to resolve this (which might well be a WONTFIX).