2011-12-31 15:07:08 +01:00
|
|
|
Fix link_tool_exe_linux.in to work with ccache
|
|
|
|
|
|
|
|
The link_tool_exe_linux.in Perl script makes the assumption that the
|
|
|
|
compilation command line is always:
|
|
|
|
|
|
|
|
gcc -o foobar foobar.c -someflags
|
|
|
|
|
|
|
|
I.e, it assumes that the compiler is the first word of the command
|
|
|
|
line. However, this is not true with ccache, where the command line
|
|
|
|
is:
|
|
|
|
|
|
|
|
/path/to/ccache /path/to/crossgcc -o foobar foobar.c -someflags
|
|
|
|
|
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>
2012-12-19 14:14:55 +01:00
|
|
|
Therefore, we tune the script to take into account the case where
|
|
|
|
ccache is used.
|
2011-12-31 15:07:08 +01:00
|
|
|
|
|
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
|
|
|
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>
2012-12-19 14:14:55 +01:00
|
|
|
Index: b/coregrind/link_tool_exe_linux.in
|
2011-12-31 15:07:08 +01:00
|
|
|
===================================================================
|
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>
2012-12-19 14:14:55 +01:00
|
|
|
--- a/coregrind/link_tool_exe_linux.in
|
|
|
|
+++ b/coregrind/link_tool_exe_linux.in
|
|
|
|
@@ -60,8 +60,16 @@
|
2011-12-31 15:07:08 +01:00
|
|
|
die "Bogus alt-load address"
|
|
|
|
if (length($ala) < 3 || index($ala, "0x") != 0);
|
|
|
|
|
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>
2012-12-19 14:14:55 +01:00
|
|
|
+shift(@ARGV);
|
|
|
|
+
|
|
|
|
+if ($ARGV[0] =~ /.*ccache/) {
|
|
|
|
+ shift(@ARGV);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
# The cc invokation to do the final link
|
2011-12-31 15:07:08 +01:00
|
|
|
-my $cc = $ARGV[1];
|
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>
2012-12-19 14:14:55 +01:00
|
|
|
+my $cc = $ARGV[0];
|
|
|
|
+
|
|
|
|
+shift(@ARGV);
|
2011-12-31 15:07:08 +01:00
|
|
|
|
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>
2012-12-19 14:14:55 +01:00
|
|
|
# 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]";
|
|
|
|
}
|
2011-12-31 15:07:08 +01:00
|
|
|
|