]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Don't hash CCACHE_PREFIX
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 2 Nov 2009 18:01:12 +0000 (19:01 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 5 Jan 2010 17:53:01 +0000 (18:53 +0100)
NEWS
ccache.c

diff --git a/NEWS b/NEWS
index 98b0dedaa864bfd309f4474de40ff404b7b6e43a..bd17b17ff9649fa3c5f03e8c72d2f448b559e548 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -45,3 +45,5 @@ Bug fixes:
   - Corrected documentation about sharing the cache directory.
 
   - Fixed compilation warnings from GCC 4.3.
+
+  - The command specified by CCACHE_PREFIX is no longer part of the hash.
index 99b3ff7be0b09c8f6ed2130745421644e3e9aa25..5967991feed671e96d2b4bab45f64d4681e1c569 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -656,7 +656,6 @@ static void process_args(int argc, char **argv)
        int found_c_opt = 0;
        int found_S_opt = 0;
        struct stat st;
-       char *e;
        /* is gcc being asked to output dependencies? */
        int generating_dependencies = 0;
        /* is the dependency makefile name overridden with -MF? */
@@ -907,20 +906,13 @@ static void process_args(int argc, char **argv)
                stats_update(STATS_DEVICE);
                failed();
        }
-
-       if ((e=getenv("CCACHE_PREFIX"))) {
-               char *p = find_executable(e, MYNAME);
-               if (!p) {
-                       perror(e);
-                       exit(1);
-               }
-               args_add_prefix(stripped_args, p);
-       }
 }
 
 /* the main ccache driver function */
 static void ccache(int argc, char *argv[])
 {
+       char *prefix;
+
        /* find the real compiler */
        find_compiler(argc, argv);
 
@@ -955,6 +947,16 @@ static void ccache(int argc, char *argv[])
                failed();
        }
        
+       prefix = getenv("CCACHE_PREFIX");
+       if (prefix) {
+               char *p = find_executable(prefix, MYNAME);
+               if (!p) {
+                       perror(prefix);
+                       exit(1);
+               }
+               args_add_prefix(stripped_args, p);
+       }
+
        /* run real compiler, sending output to cache */
        to_cache(stripped_args);