Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917361 - sys-devel/gcc, sys-devel/clang: maybe install ${COMPILER}-cachekey or such for ccache usage
Summary: sys-devel/gcc, sys-devel/clang: maybe install ${COMPILER}-cachekey or such fo...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
Depends on:
Reported: 2023-11-15 11:50 UTC by Arsen Arsenović
Modified: 2023-11-15 15:08 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
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.