mirror of
https://git.busybox.net/buildroot.git
synced 2024-12-15 16:23:25 +08:00
85510dae95
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>
50 lines
1.2 KiB
Diff
50 lines
1.2 KiB
Diff
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
|
|
|
|
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: b/coregrind/link_tool_exe_linux.in
|
|
===================================================================
|
|
--- 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);
|
|
|
|
+shift(@ARGV);
|
|
+
|
|
+if ($ARGV[0] =~ /.*ccache/) {
|
|
+ shift(@ARGV);
|
|
+}
|
|
+
|
|
# The cc invokation to do the final link
|
|
-my $cc = $ARGV[1];
|
|
+my $cc = $ARGV[0];
|
|
+
|
|
+shift(@ARGV);
|
|
|
|
# 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]";
|
|
}
|
|
|