]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Merge branch '3.1-maint' into 3.2-maint
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 26 Dec 2014 09:10:20 +0000 (10:10 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 26 Dec 2014 09:10:20 +0000 (10:10 +0100)
* 3.1-maint:
  Include info on CCACHE_CPP2 in hash

Conflicts:
NEWS.txt
ccache.c
test.sh

1  2 
NEWS.txt
ccache.c
test.sh

diff --cc NEWS.txt
index ca57aedcef391679adef01e0be15c72a3ebd6b40,4876b233658daa8b99daf051c7f41cb42cc78ad8..640b8479c027fbb76baa5bbe8abf81402ade85d2
+++ b/NEWS.txt
@@@ -2,141 -2,17 +2,152 @@@ ccache new
  ===========
  
  
+ Unreleased
+ ----------
+ Bug fixes
+ ~~~~~~~~~
+ - Made hash of cached result created with and without `CCACHE_CPP2` different.
+   This makes it possible to rebuild with `CCACHE_CPP2` set without having to
+   clear the cache to get new results.
 +ccache 3.2.1
 +------------
 +Release date: 2014-12-10
 +
 +
 +Bug fixes
 +~~~~~~~~~
 +
 +- Fixed regression in temporary file handling, which lead to incorrect
 +  permissions for stats, manifest and ccache.conf files in the cache.
 +
 +- `CACHEDIR.TAG` files are now created in the [0-9a-f] subdirectories so that
 +  ccache.conf is not lost in backups.
 +
 +- Made the default cache size suffix `G`, as previously documented.
 +
 +- `-fdiagnostics-color=auto` is now passed to the compiler even if stderr is
 +  redirected. This fixes a problem when, for instance, a configure test probes
 +  if the compiler (wrapped via ccache) supports `-fdiagnostics-color=auto`.
 +
 +- Added missing documentation for `max_files` and `max_size` configuration
 +  options.
 +
 +
 +ccache 3.2
 +----------
 +Release date: 2014-11-17
 +
 +
 +New features and improvements
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +- Added support for configuring ccache via one or several configuration files
 +  instead of via environment variables. Environment variables still have
 +  priority but are no longer the recommended way of customizing ccache
 +  behavior. See the manual for more information.
 +
 +- Added support for compiler error/warning messages with color.
 +
 +- Made creation of temporary directories and cache directories smarter to avoid
 +  unnecessary `stat` calls.
 +
 +- Improved efficiency of the algorithm that scans for `__DATE_` and `__TIME__`
 +  tokens in the hashed source code.
 +
 +- Added support for several binaries (separated by space) in `CCACHE_PREFIX`.
 +
 +- The `-c` option is no longer passed to the preprocessor. This fixes problems
 +  with clang and Solaris's C++ compiler.
 +
 +- ccache no longer passes preprocessor options like `-D` and `-I` to the
 +  compiler when compiling preprocessed output. This fixes warnings emitted by
 +  clang.
 +
 +- Compiler options `-fprofile-generate`, `-fprofile-arcs`, `-fprofile-use` and
 +  `-fbranch-probabilities` are now handled without bailing.
 +
 +- Added support for clang's `--serialize-diagnostic` option, storing the
 +  diagnostic file (`.dia`) in the cache.
 +
 +- Added support for precompiled headers when using clang.
 +
 +- Added support for clang `.pth` (pretokenized header) files.
 +
 +- Changed the `-x` language option to use the new objective C standard for GCC
 +  and clang.
 +
 +- On a cache miss, ccache now instructs the compiler to create the object file
 +  at the real destination and then copies the file into the cache instead of
 +  the other way around. This is needed to support compiler options like
 +  `-fprofile-arcs` and `--serialize-diagnostics`.
 +
 +- ccache now checks that included files' ctimes aren't too new. This check can
 +  be turned off by adding `include_file_ctime` to the ``ccache sloppiness''
 +  setting.
 +
 +- Added possibility to get cache hits based on filename, size, mtime and ctime
 +  only. On other words, source code files are not even read, only stat-ed. This
 +  operation mode is opt-in by adding `file_stat_matches` to the ``ccache
 +  sloppiness'' setting.
 +
 +- The filename part of options like `-Wp,-MDfilename` is no longer included in
 +  the hash since the filename doesn't have any bearing on the result.
 +
 +- Added a ``read-only direct'' configuration setting, which is like the
 +  ordinary read-only setting except that ccache will only try to retrieve
 +  results from the cache using the direct mode, not the preprocessor mode.
 +
 +- The display and interpretation of cache size has been changed to use SI
 +  units.
 +
 +- Default cache size is now 5 GB (was previously 1 GiB).
 +
 +- Added configuration option to set the compression level of compressed object
 +  files in the cache.
 +
 +- Added support for `@file` and `-@file` arguments (reading options from a
 +  file).
 +
 +- `-Wl,` options are no longer included in the hash since they don't affect
 +  compilation.
 +
 +- Bail out on too hard compiler option `-Wp,-P`.
 +
 +- Optimized MD4 calculation code on little-endian systems.
 +
 +- Various improvements and fixes on win32.
 +
 +- Improved logging to the ccache log file.
 +
 +- Added `--dump-manifest` command-line option for debugging purposes.
 +
 +- Added `--with-bundled-zlib` configure option.
 +
 +- Upgraded bundled zlib to version 1.2.8.
 +
 +- Improved `dev.mk` to be more platform independent.
 +
 +- Made the test suite work with clang and gcc-llvm on OS X.
 +
 +- Various other improvements of the test suite.
 +
 +
 +Bug fixes
 +~~~~~~~~~
 +
 +- Any previous `.stderr` is now removed from the cache when recaching.
 +
 +- Fixed an issue when handling the `-arch` compiler option with an argument.
 +
 +- Fixed race condition when creating the initial cache directory.
 +
 +- Fixed test suite failures when `CC` is a ccache-wrapped compiler.
 +
 +
  ccache 3.1.10
  -------------
  Release date: 2014-10-19
diff --cc ccache.c
index c407760fe87674af5d618e65bd672c690508d139,7c12174a0f09690a3d82c64a3cb93335a5093743..1be106b875dd15a18247e4c9f35840357ec25570
+++ b/ccache.c
@@@ -1059,6 -877,10 +1059,8 @@@ get_object_name_from_cpp(struct args *a
                 * the compiler pass.
                 */
                cpp_stderr = path_stderr;
 -      } else {
+               hash_delimiter(hash, "runsecondcpp");
+               hash_string(hash, "false");
 -              free(path_stderr);
        }
  
        result = x_malloc(sizeof(*result));
diff --cc test.sh
index e473857de29522f66356dfffd87b73786d9701c9,62854cfd60530a246d630d56f8da38d9ac852b83..0fde54526fd313d3167bbc04c6f68d194b4a81f3
+++ b/test.sh
@@@ -269,12 -244,11 +269,12 @@@ base_tests() 
      CCACHE_RECACHE=1 $CCACHE_COMPILE -c test1.c -O -O
      checkstat 'cache hit (preprocessed)' 5
      checkstat 'cache miss' 4
 +    compare_file reference_test1.o test1.o
  
-     # strictly speaking should be 3 - RECACHE causes a double counting!
+     # strictly speaking should be 4 - RECACHE causes a double counting!
      checkstat 'files in cache' 4
      $CCACHE -c > /dev/null
-     checkstat 'files in cache' 3
+     checkstat 'files in cache' 4
  
      testname="CCACHE_HASHDIR"
      CCACHE_HASHDIR=1 $CCACHE_COMPILE -c test1.c -O -O
      CCACHE_HASHDIR=1 $CCACHE_COMPILE -c test1.c -O -O
      checkstat 'cache hit (preprocessed)' 6
      checkstat 'cache miss' 5
-     checkstat 'files in cache' 4
+     checkstat 'files in cache' 5
 +    compare_file reference_test1.o test1.o
  
      testname="comments"
      echo '/* a silly comment */' > test1-comment.c