From: Andrew Tridgell Date: Mon, 13 Sep 2004 10:19:06 +0000 (+0200) Subject: include the compiler name in the hash if the link count on the X-Git-Tag: v2.4~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ebb9a36352c6127ea76317f7a86eaad54bae076;p=thirdparty%2Fccache.git include the compiler name in the hash if the link count on the compiler is > 1, to cope with compilers (like the AIX one) that changes behaviour based on argv[0]. Thanks to Nicholas Clark for pointing out this problem --- diff --git a/ccache.c b/ccache.c index ace986d1f..c15ced54f 100644 --- a/ccache.c +++ b/ccache.c @@ -324,6 +324,13 @@ static void find_hash(ARGS *args) stats_update(STATS_COMPILER); failed(); } + + /* also include the hash of the compiler name - as some compilers + use hard links and behave differently depending on the real name */ + if (st.st_nlink > 1) { + hash_string(str_basename(args->argv[0])); + } + hash_int(st.st_size); hash_int(st.st_mtime);