Commit d3cc1a18 authored by Yan Couto's avatar Yan Couto Committed by Kazushi (Jam) Marukawa

Valgrind fix (closes #746)

parent 8d8f26f4
......@@ -8,7 +8,40 @@ class Valgrind < Package
source_sha256 'd76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b'
def self.build
system './configure'
system 'patch -p0 << EOF
--- coregrind/m_redir.c
+++ coregrind/m_redir.c
@@ -1214,9 +1214,11 @@
add_hardwired_spec(
"ld-linux.so.2", "index",
(Addr)&VG_(x86_linux_REDIR_FOR_index), mandatory);
+#if CI_HACK_strlen
add_hardwired_spec(
"ld-linux.so.2", "strlen",
(Addr)&VG_(x86_linux_REDIR_FOR_strlen), mandatory);
+#endif
}
# elif defined(VGP_amd64_linux)
@@ -1238,6 +1240,7 @@
the start, otherwise ld.so makes a lot of noise. */
if (0==VG_(strcmp)("Memcheck", VG_(details).name)) {
+#if CI_HACK_strlen
add_hardwired_spec(
"ld-linux-x86-64.so.2", "strlen",
(Addr)&VG_(amd64_linux_REDIR_FOR_strlen),
@@ -1251,6 +1254,8 @@
complain_about_stripped_glibc_ldso
# endif
);
+#endif
+
}
# elif defined(VGP_ppc32_linux)
EOF'
system './configure --prefix=/usr/local'
system 'make'
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment