From c24c0d560d252036e351900861d1aed050341ea1 Mon Sep 17 00:00:00 2001 From: Timofei Kushnir Date: Wed, 28 Feb 2018 10:07:54 +0300 Subject: [PATCH] ccache: 3.3.5 -> 3.4 --- .../development/tools/misc/ccache/default.nix | 13 ++++-- .../ccache/fix-debug-prefix-map-suite.patch | 42 +++++++++++++++++++ .../misc/ccache/skip-fs-dependent-test.patch | 6 +-- 3 files changed, 54 insertions(+), 7 deletions(-) create mode 100644 pkgs/development/tools/misc/ccache/fix-debug-prefix-map-suite.patch diff --git a/pkgs/development/tools/misc/ccache/default.nix b/pkgs/development/tools/misc/ccache/default.nix index ff4ad83b642..9d44e0b707b 100644 --- a/pkgs/development/tools/misc/ccache/default.nix +++ b/pkgs/development/tools/misc/ccache/default.nix @@ -1,18 +1,23 @@ -{ stdenv, fetchurl, fetchpatch, runCommand, zlib, makeWrapper }: +{ stdenv, fetchurl, fetchpatch, runCommand, perl, gcc, zlib, makeWrapper }: let ccache = stdenv.mkDerivation rec { name = "ccache-${version}"; - version = "3.3.5"; + version = "3.4"; src = fetchurl { - sha256 = "1iih5d171rq29366c1z90dri2h8173yyc8rm2740wxiqx6k7c18r"; + sha256 = "0sfisvjs2iham29flxgmnfg7kzqz66bhk6q0qcwbdv1n569say5j"; url = "mirror://samba/ccache/${name}.tar.xz"; }; + nativeBuildInputs = [ perl gcc ]; + buildInputs = [ zlib ]; # non to be fail on filesystems with unconventional blocksizes (zfs on Hydra?) - patches = [ ./skip-fs-dependent-test.patch ]; + patches = [ + ./fix-debug-prefix-map-suite.patch + ./skip-fs-dependent-test.patch + ]; postPatch = '' substituteInPlace Makefile.in --replace 'objs) $(extra_libs)' 'objs)' diff --git a/pkgs/development/tools/misc/ccache/fix-debug-prefix-map-suite.patch b/pkgs/development/tools/misc/ccache/fix-debug-prefix-map-suite.patch new file mode 100644 index 00000000000..98a6fbf10bf --- /dev/null +++ b/pkgs/development/tools/misc/ccache/fix-debug-prefix-map-suite.patch @@ -0,0 +1,42 @@ +--- 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 + } diff --git a/pkgs/development/tools/misc/ccache/skip-fs-dependent-test.patch b/pkgs/development/tools/misc/ccache/skip-fs-dependent-test.patch index 3bc3a95e420..7b233df6531 100644 --- a/pkgs/development/tools/misc/ccache/skip-fs-dependent-test.patch +++ b/pkgs/development/tools/misc/ccache/skip-fs-dependent-test.patch @@ -1,6 +1,6 @@ ---- a/test.sh -+++ b/test.sh -@@ -2669,23 +2669,6 @@ SUITE_cleanup() { +--- 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