poky/meta/recipes-devtools/valgrind/valgrind-3.8.1/fix_issue_caused_by_ccache.patch
Radu Moisan 77eaad86d1 valgrind: update to 3.8.1
Changed license copyright notice 2011->2012
remove unnecessary patches
built for x86, 86-64, ppc

(From OE-Core rev: df0d23c2bedafd534c5909a65afaf3373d7bc33e)

Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-28 12:29:30 +00:00

33 lines
860 B
Diff

The script does not expect use of ccache, hence fix it to recognise it.
2010/08/17
Nitin A Kamble <nitin.a.kamble@intel.com>
Upstream-Status: Inappropriate [configuration]
Index: valgrind-3.5.0/coregrind/link_tool_exe_linux.in
===================================================================
--- valgrind-3.5.0.orig/coregrind/link_tool_exe_linux.in
+++ valgrind-3.5.0/coregrind/link_tool_exe_linux.in
@@ -62,6 +62,11 @@ die "Bogus alt-load address"
# The cc invokation to do the final link
my $cc = $ARGV[1];
+my $next = 2;
+if ("$cc" eq "ccache") {
+ $cc = "$cc $ARGV[2]";
+ $next = 3;
+}
# and the 'restargs' are argv[2 ..]
@@ -71,7 +76,7 @@ my $cc = $ARGV[1];
my $cmd="$cc -static -Wl,-Ttext=$ala";
# Add the rest of the parameters
-foreach my $n (2 .. $#ARGV) {
+foreach my $n ($next .. $#ARGV) {
$cmd = "$cmd $ARGV[$n]";
}