diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index 1dc211c7c55..ff0e0601662 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -1093,6 +1093,13 @@ QList GccToolChainFactory::autoDetectToolchains( searchPaths << gnuSearchPathsFromRegistry(); searchPaths << atmelSearchPathsFromRegistry(); searchPaths << renesasRl78SearchPathsFromRegistry(); + if (HostOsInfo::isAnyUnixHost()) { + FilePath ccachePath = FilePath::fromString("/usr/lib/ccache/bin"); + if (!ccachePath.exists()) + ccachePath = FilePath::fromString("/usr/lib/ccache"); + if (ccachePath.exists() && !searchPaths.contains(ccachePath)) + searchPaths << ccachePath; + } for (const FilePath &dir : searchPaths) { static const QRegularExpression regexp(binaryRegexp); QDir binDir(dir.toString());