You will not get ccache attacks between different compilers. The hashed compiler. Alternatively, you can change the CCACHE_COMPILERCHECK environment variable to test the compiler differently. As shown in the caching guide :
For both modes, the following information is included in the hash:
the extension used by the compiler for a file with preprocessor output (normally .i for C code and .ii for C++ code)
the compiler’s size and modification time (or other compiler-specific information specified by CCACHE_COMPILERCHECK)
the name of the compiler
the current directory (if CCACHE_HASHDIR is set)
contents of files specified by CCACHE_EXTRAFILES (if any)
source
share