summaryrefslogtreecommitdiffstats
path: root/package/valgrind/valgrind-fix-ccache-support.patch
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2012-12-19 13:14:55 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2013-01-01 22:24:27 +0100
commit85510dae95f90c0d8d5af65715dfa2dd9fe78be5 (patch)
tree23b30a905a2a891611dfb0efb591ac4f7062bf8a /package/valgrind/valgrind-fix-ccache-support.patch
parentb4c0647e14fe329a8ac3d1d5de064e22b3624eda (diff)
downloadbuildroot-novena-85510dae95f90c0d8d5af65715dfa2dd9fe78be5.tar.gz
buildroot-novena-85510dae95f90c0d8d5af65715dfa2dd9fe78be5.zip
valgrind: bump to 3.8.1
Status of the patches: * valgrind-compiler-check.patch, no longer needed, merged upstream. * valgrind-dont-include-a-out-header.patch, kept, just refreshed * valgrind-fix-ccache-support.patch, adapted to the newer Valgrind release. * valgrind-largefile.patch, kept, just refreshed * valgrind-more-ioctls.patch, removed. Most of it was merged upstream. This patch was anyway a feature addition, so it shouldn't be kept in Buildroot. * valgrind-workaround-SIGSEGV-on-PPC.patch, kept as is, just refreshed. This bump also fixes the build failure we were experiencing with Valgrind 3.7.0 against recent Glibc versions. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/valgrind/valgrind-fix-ccache-support.patch')
-rw-r--r--package/valgrind/valgrind-fix-ccache-support.patch54
1 files changed, 26 insertions, 28 deletions
diff --git a/package/valgrind/valgrind-fix-ccache-support.patch b/package/valgrind/valgrind-fix-ccache-support.patch
index 56d984b0b..40ada8d81 100644
--- a/package/valgrind/valgrind-fix-ccache-support.patch
+++ b/package/valgrind/valgrind-fix-ccache-support.patch
@@ -11,41 +11,39 @@ is:
/path/to/ccache /path/to/crossgcc -o foobar foobar.c -someflags
-Since this Perl script simply needs to add additional flags to the
-command line, we simply add them at the end of the command line
-instead of trying to add them at the beginning.
+Therefore, we tune the script to take into account the case where
+ccache is used.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Index: valgrind-3.6.1/coregrind/link_tool_exe_linux.in
+Index: b/coregrind/link_tool_exe_linux.in
===================================================================
---- valgrind-3.6.1.orig/coregrind/link_tool_exe_linux.in 2011-12-22 13:59:08.933499060 +0100
-+++ valgrind-3.6.1/coregrind/link_tool_exe_linux.in 2011-12-22 13:59:50.302782709 +0100
-@@ -55,25 +55,13 @@
- if (($#ARGV + 1) < 5);
-
- my $ala = $ARGV[0];
-+shift;
-
- # check for plausible-ish alt load address
+--- a/coregrind/link_tool_exe_linux.in
++++ b/coregrind/link_tool_exe_linux.in
+@@ -60,8 +60,16 @@
die "Bogus alt-load address"
if (length($ala) < 3 || index($ala, "0x") != 0);
--# The cc invokation to do the final link
++shift(@ARGV);
++
++if ($ARGV[0] =~ /.*ccache/) {
++ shift(@ARGV);
++}
++
+ # The cc invokation to do the final link
-my $cc = $ARGV[1];
--
--# and the 'restargs' are argv[2 ..]
--
--# so, build up the complete command here:
--# 'cc' -static -Ttext='ala' 'restargs'
--
--my $cmd="$cc -static -Wl,-Ttext=$ala";
--
--# Add the rest of the parameters
--foreach my $n (2 .. $#ARGV) {
-- $cmd = "$cmd $ARGV[$n]";
--}
-+my $cmd=join(" ", @ARGV) . " -static -Wl,-Ttext=$ala";
++my $cc = $ARGV[0];
++
++shift(@ARGV);
- #print "link_tool_exe_linux: $cmd\n";
+ # and the 'restargs' are argv[2 ..]
+
+@@ -82,7 +90,7 @@
+ }
+
+ # Add the rest of the parameters
+-foreach my $n (2 .. $#ARGV) {
++foreach my $n (0 .. $#ARGV) {
+ $cmd = "$cmd $ARGV[$n]";
+ }