Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 917361

Summary: sys-devel/gcc, sys-devel/clang: maybe install ${COMPILER}-cachekey or such for ccache usage
Product: Gentoo Linux Reporter: Arsen Arsenović <arsen>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: CONFIRMED ---    
Severity: normal CC: kocelfc, llvm
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Arsen Arsenović gentoo-dev 2023-11-15 11:50:30 UTC
currently, our ccache configuration by default is less effective than it could be, as its caches are effectively invalidated on every (even snapshot on stable branch) update.

we could probably get away with caching based on major version for the stable branches and the full version (_p included and all) for the development branches (gcc:14 right now).

we should also make the cache key retrieval as fast as possible, and should try to avoid patching the compiler if possible.

to do this, we could install a ${COMPILER}-cachekey file with a cat shebang that contains the major version of the compiler for release branches and the full ${PV} for the snapshot branches.  while a bit ugly, this avoids hacking gcc/clang and just leaves us with a somewhat simple mechanism to adjust the key.

wdyt?