]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Merge branch '3.2-maint'
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 20 Jul 2016 15:54:46 +0000 (17:54 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 20 Jul 2016 15:54:46 +0000 (17:54 +0200)
* 3.2-maint:
  Prepare for v3.2.7
  Update NEWS
  Make sure to hash the trailing quote when skipping
  Add test for certain gcc compilers with buggy cpp
  Make calculate_object_hash handle argument-less -B etc. correctly

1  2 
NEWS.txt
ccache.c
test.sh

diff --cc NEWS.txt
index d5d13ae74e26b6d73f166c87edc140fe252b0b81,b56707e05ee2040fbb352049c62e8988414e3367..7154b48490664fbf26e362f515263f8d3cfc05d6
+++ b/NEWS.txt
@@@ -2,58 -2,20 +2,72 @@@ ccache new
  ===========
  
  
 +Unreleased 3.3
 +--------------
 +
 +New features and improvements
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +- Added support for cuda including the -optf/--options-file option.
 +
 +- Added new sloppiness option `no_system_headers`, which tells ccache not to
 +  include system headers in manifest files.
 +
 +- Multiple identical `-arch` arguments are now handled without bailing.
 +
 +- Added new `ignore_headers_in_manifest` configuration option, which specifies
 +  headers that should be ignored in the direct mode.
 +
 +- Added new `prefix_command_cpp` (`CCACHE_PREFIX_CPP`) configuration option,
 +  which specifies one or several prefixes to add to the command line ccache
 +  uses when invoking the preprocessor.
 +
 +- The concatenated form of some long compiler options is now recognized, for
 +  example when using `-isystemPATH` instead of `-isystem PATH`.
 +
 +- If hard-linking is enabled and but fails (e.g. due to cross-device linking),
 +  ccache now falls back to copying instead of running the compiler.
 +
 +- Made the `hash_dir` option only have effect when generating debug info.
 +
 +- Added support for relocating debug info directory using `-fdebug-prefix-map`.
 +  This allows for cache hits even when `hash_dir` is used in combination with
 +  `base_dir`.
 +
 +- Added new `keep_comments_cpp` (`CCACHE_COMMENTS`) configuration option, which
 +  tells ccache not to discard the comments before hashing preprocessor output.
 +  This can be used to check documentation with *-Wdocumentation*.
 +
 +- ccache now knows how to convert absolute paths to relative paths inside
 +  dependency files when using `base_dir`.
 +
 +- Improved parsing of `-g*` options.
 +
 +- Made ccache understand `-Wp,-D*` options.
 +
 +
 +Bug fixes
 +~~~~~~~~~
 +
 +- Fixed clang test suite when running on Linux.
 +
 +- Fixed build and test for MinGW32 and Windows.
 +
 +
+ ccache 3.2.7
+ ------------
+ Release date: 2016-07-20
+ Bug fixes
+ ~~~~~~~~~
+ - Fixed a bug which could lead to false cache hits for compiler command lines
+   with a missing argument to an option that takes an argument.
+ - ccache now knows how to work around a glitch in the output of GCC 6's
+   preprocessor.
  ccache 3.2.6
  ------------
  Release date: 2016-07-12
diff --cc ccache.c
Simple merge
diff --cc test.sh
index ce30888143c823386d14b6b42c31c8c3dceb540b,30aa3eb71dfe410144117cb1138200a91009bd31..5675bf6e069c51b6b3cc5bb57262180289498b9d
+++ b/test.sh
      checkstat 'cache miss' 1
      checkfile prefix.result "a
  b"
 +
 +    rm -f prefix.result
 +    PATH=.:$PATH CCACHE_PREFIX_CPP="prefix-a prefix-b" $CCACHE $COMPILER -c file.c
 +    checkstat 'cache hit (direct)' 0
 +    checkstat 'cache hit (preprocessed)' 2
 +    checkstat 'cache miss' 1
 +    checkfile prefix.result "a
 +b"
  }
  
+ buggy_cpp_suite() {
+     testname="buggy_cpp"
+     $CCACHE -Cz >/dev/null
+     cat >buggy-cpp <<EOF
+ #!/bin/sh
+ CCACHE_DISABLE=1 # If $COMPILER happens to be a ccache symlink...
+ export CCACHE_DISABLE
+ if echo "\$*" | grep -- -D >/dev/null; then
+   $COMPILER "\$@"
+ else
+   # mistreat the preprocessor output in the same way as gcc6 does
+   $COMPILER "\$@" |
+     sed -e '/^# 1 "<command-line>"$/ a # 31 "<command-line>"' \\
+         -e 's/^# 1 "<command-line>" 2$/# 32 "<command-line>" 2/'
+ fi
+ exit 0
+ EOF
+     cat <<'EOF' >file.c
+ int foo;
+ EOF
+     chmod +x buggy-cpp
+     backdate buggy-cpp
+     $CCACHE ./buggy-cpp -c file.c
+     checkstat 'cache hit (direct)' 0
+     checkstat 'cache hit (preprocessed)' 0
+     checkstat 'cache miss' 1
+     $CCACHE ./buggy-cpp -DNOT_AFFECTING=1 -c file.c
+     checkstat 'cache hit (direct)' 0
+     checkstat 'cache hit (preprocessed)' 1
+     checkstat 'cache miss' 1
+ }
  symlinks_suite() {
      ##################################################################
      testname="symlink to source directory"