You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
2.1 KiB
58 lines
2.1 KiB
# --- T2-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# T2 SDE: package/.../ccache/dont_stat_compiler.patch |
|
# Copyright (C) 2004 - 2006 The T2 SDE Project |
|
# |
|
# More information can be found in the files COPYING and README. |
|
# |
|
# This patch file is dual-licensed. It is available under the license the |
|
# patched project is licensed under, as long as it is an OpenSource license |
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms |
|
# of the GNU General Public License as published by the Free Software |
|
# Foundation; either version 2 of the License, or (at your option) any later |
|
# version. |
|
# --- T2-COPYRIGHT-NOTE-END --- |
|
|
|
For us the t2 wrapper is the compiler executable which is often rebuild (e.g. |
|
on config change. So we most often want to prevent hashing the compiler (or |
|
better our wrapper) size and date ... |
|
|
|
(Originally written in ROCK Linux, commented and rediffed for recent |
|
ccache versions.) |
|
|
|
- Rene Rebe <rene@exactcode.de> |
|
|
|
--- ccache-2.4/ccache.c 2004-09-13 12:38:30.000000000 +0200 |
|
+++ ccache-2.4-patched/ccache.c 2004-12-22 08:49:51.959011840 +0100 |
|
@@ -319,20 +319,22 @@ |
|
|
|
/* the compiler driver size and date. This is a simple minded way |
|
to try and detect compiler upgrades. It is not 100% reliable */ |
|
- if (stat(args->argv[0], &st) != 0) { |
|
+ if (!getenv("CCACHE_DONT_STAT_COMPILER")) { |
|
+ if (stat(args->argv[0], &st) != 0) { |
|
cc_log("Couldn't stat the compiler!? (argv[0]='%s')\n", args->argv[0]); |
|
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) { |
|
+ /* 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); |
|
+ hash_int(st.st_size); |
|
+ hash_int(st.st_mtime); |
|
+ } |
|
|
|
/* possibly hash the current working directory */ |
|
if (getenv("CCACHE_HASHDIR")) {
|
|
|