ccache: 3.4.1 -> 3.7.10

The fix-debug-prefix-map-suite patch became obsolete with upstream
commit:

82010e0eb9

The skip-fs-dependent-test patch with PR:

https://github.com/ccache/ccache/pull/444
This commit is contained in:
Matthias Treydte 2020-05-28 15:54:44 +02:00 committed by Daniël de Kok
parent 1b9b1440b9
commit 4ec15456b3
3 changed files with 10 additions and 86 deletions

View File

@ -1,30 +1,22 @@
{ stdenv, fetchurl, perl, zlib, makeWrapper }:
{ stdenv, fetchFromGitHub, asciidoc-full, gperf, perl, autoreconfHook, zlib, makeWrapper }:
let ccache = stdenv.mkDerivation rec {
pname = "ccache";
version = "3.4.1";
version = "3.7.10";
src = fetchurl {
sha256 = "1pppi4jbkkj641cdynmc35jaj40jjicw7gj75ran5qs5886jcblc";
url = "mirror://samba/ccache/${pname}-${version}.tar.xz";
src = fetchFromGitHub {
owner = "ccache";
repo = "ccache";
rev = "v${version}";
sha256 = "0v6pvj50y18fxh2f6cx6xyg545xcpxfmrcg9bzbc6lc5acrvvjm7";
};
nativeBuildInputs = [ perl ];
nativeBuildInputs = [ asciidoc-full autoreconfHook gperf perl ];
buildInputs = [ zlib ];
outputs = [ "out" "man" ];
# non to be fail on filesystems with unconventional blocksizes (zfs on Hydra?)
patches = [
./fix-debug-prefix-map-suite.patch
./skip-fs-dependent-test.patch
];
postPatch = ''
substituteInPlace Makefile.in --replace 'objs) $(extra_libs)' 'objs)'
'';
doCheck = !stdenv.isDarwin;
passthru = {
@ -71,8 +63,8 @@ let ccache = stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "Compiler cache for fast recompilation of C/C++ code";
homepage = "http://ccache.samba.org/";
downloadPage = "https://ccache.samba.org/download.html";
homepage = "https://ccache.dev/";
downloadPage = "https://ccache.dev/download.html";
license = licenses.gpl3Plus;
platforms = platforms.unix;
};

View File

@ -1,42 +0,0 @@
--- a/test/suites/debug_prefix_map.bash
+++ b/test/suites/debug_prefix_map.bash
@@ -29,7 +29,7 @@
expect_stat 'cache hit (preprocessed)' 0
expect_stat 'cache miss' 1
expect_stat 'files in cache' 2
- if grep -E "[^=]`pwd`[^=]" test.o >/dev/null 2>&1; then
+ if objdump -g test.o | grep ": `pwd`$" >/dev/null 2>&1; then
test_failed "Source dir (`pwd`) found in test.o"
fi
@@ -39,7 +39,7 @@
expect_stat 'cache hit (preprocessed)' 0
expect_stat 'cache miss' 1
expect_stat 'files in cache' 2
- if grep -E "[^=]`pwd`[^=]" test.o >/dev/null 2>&1; then
+ if objdump -g test.o | grep ": `pwd`$" >/dev/null 2>&1; then
test_failed "Source dir (`pwd`) found in test.o"
fi
@@ -52,10 +52,10 @@
expect_stat 'cache hit (preprocessed)' 0
expect_stat 'cache miss' 1
expect_stat 'files in cache' 2
- if grep -E "[^=]`pwd`[^=]" test.o >/dev/null 2>&1; then
+ if objdump -g test.o | grep ": `pwd`$" >/dev/null 2>&1; then
test_failed "Source dir (`pwd`) found in test.o"
fi
- if ! grep "name" test.o >/dev/null 2>&1; then
+ if ! objdump -g test.o | grep ": name$" >/dev/null 2>&1; then
test_failed "Relocation (name) not found in test.o"
fi
@@ -65,7 +65,7 @@
expect_stat 'cache hit (preprocessed)' 0
expect_stat 'cache miss' 1
expect_stat 'files in cache' 2
- if grep -E "[^=]`pwd`[^=]" test.o >/dev/null 2>&1; then
+ if objdump -g test.o | grep ": `pwd`$" >/dev/null 2>&1; then
test_failed "Source dir (`pwd`) found in test.o"
fi
}

View File

@ -1,26 +0,0 @@
--- a/test/suites/cleanup.bash
+++ b/test/suites/cleanup.bash
@@ -94,23 +94,6 @@
$CCACHE -F 0 -M 256K >/dev/null
CCACHE_LOGFILE=/tmp/foo $CCACHE -c >/dev/null
- expect_file_count 3 '*.o' $CCACHE_DIR
- expect_file_count 3 '*.d' $CCACHE_DIR
- expect_file_count 3 '*.stderr' $CCACHE_DIR
- expect_stat 'files in cache' 9
- expect_stat 'cleanups performed' 1
- for i in 3 4 5; do
- file=$CCACHE_DIR/a/result$i-4017.o
- if [ ! -f $file ]; then
- test_failed "File $file removed when it shouldn't"
- fi
- done
- for i in 0 1 2 6 7 8 9; do
- file=$CCACHE_DIR/a/result$i-4017.o
- if [ -f $file ]; then
- test_failed "File $file not removed when it should"
- fi
- done
# -------------------------------------------------------------------------
TEST "Automatic cache cleanup, limit_multiple 0.9"