summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2015-12-09 10:52:48 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-12 23:42:54 +0000
commit9205f0acfea8200135934ebdc5a4e8038a2d9a3f (patch)
tree8a83331e622c14426d4aa7d7960e9ed6f4201f81 /meta/recipes-devtools
parentc27bbb48143d38c7b8e4d29fa1bd516928b8f5d7 (diff)
downloadpoky-9205f0acfea8200135934ebdc5a4e8038a2d9a3f.tar.gz
valgrind: import Debian link_tool patch for MIPS
Without this patch, valgrind 3.10.1 fails to run on MIPS: | root@bcm97425vms:~# valgrind /bin/ls | valgrind: mmap(0x400000, 700416) failed in UME with error 22 (Invalid argument). | valgrind: this can be caused by executables with very large text, data or bss segments. Original Debian bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777704 (From OE-Core rev: 652c5ae2c8317dcd93ada409365eeb56ceb54d0b) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/11_mips-link-tool.patch37
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.10.1.bb1
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/11_mips-link-tool.patch b/meta/recipes-devtools/valgrind/valgrind/11_mips-link-tool.patch
new file mode 100644
index 0000000000..ecb33b8cb3
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/11_mips-link-tool.patch
@@ -0,0 +1,37 @@
1Debian fix for MIPS: mmap(0x400000, 32768) failed in UME with error 22 (Invalid argument)
2
3 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777704
4
5Upstream-Status: Pending
6
7Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
8
9
10Description: Disable the MIPS linker workarounds when using -Ttext-section
11Origin: vendor
12Bug-Debian: http://bugs.debian.org/777704
13Author: James Cowgill <james410@cowgill.org.uk>
14Last-Update: 2015-04-25
15
16--- a/coregrind/link_tool_exe_linux.in
17+++ b/coregrind/link_tool_exe_linux.in
18@@ -76,12 +76,13 @@
19 my $arch = substr($x, 0, index($x, "'"));
20
21 my $extra_args;
22-if (($arch eq 'mips') || ($arch eq 'mipsel')
23- || ($arch eq 'mipsisa32r2el')) {
24- $extra_args = "-static -Wl,--section-start=.reginfo=$ala";
25-} elsif (($arch eq 'mips64') || ($arch eq 'mips64el') ||
26- ($arch eq 'mipsisa64el')) {
27- $extra_args = "-static -Wl,--section-start=.MIPS.options=$ala";
28+if ($arch =~ /^mips/ && "@FLAG_T_TEXT@" eq '-Ttext') {
29+ # We only need to use the special mips options when using -Ttext
30+ if ($arch =~ /^mips(64|isa64)/) {
31+ $extra_args = "-static -Wl,--section-start=.MIPS.options=$ala";
32+ } else {
33+ $extra_args = "-static -Wl,--section-start=.reginfo=$ala";
34+ }
35 } else {
36 $extra_args = "-static -Wl,@FLAG_T_TEXT@=$ala";
37 }
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.10.1.bb b/meta/recipes-devtools/valgrind/valgrind_3.10.1.bb
index 86ba979ea8..c386a19e88 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.10.1.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.10.1.bb
@@ -26,6 +26,7 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
26 file://pass-maltivec-only-if-it-supported.patch \ 26 file://pass-maltivec-only-if-it-supported.patch \
27 file://run-ptest \ 27 file://run-ptest \
28 file://0001-valgrind-Enable-rt_sigpending-syscall-on-ppc64-linux.patch \ 28 file://0001-valgrind-Enable-rt_sigpending-syscall-on-ppc64-linux.patch \
29 file://11_mips-link-tool.patch \
29 " 30 "
30 31
31SRC_URI[md5sum] = "60ddae962bc79e7c95cfc4667245707f" 32SRC_URI[md5sum] = "60ddae962bc79e7c95cfc4667245707f"