summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/valgrind/build-valgrind-for-chromium.sh17
-rw-r--r--tools/valgrind/fork.patch25
2 files changed, 41 insertions, 1 deletions
diff --git a/tools/valgrind/build-valgrind-for-chromium.sh b/tools/valgrind/build-valgrind-for-chromium.sh
index c81231e..7c9c1be 100755
--- a/tools/valgrind/build-valgrind-for-chromium.sh
+++ b/tools/valgrind/build-valgrind-for-chromium.sh
@@ -6,6 +6,12 @@ THISDIR=`cd $THISDIR && /bin/pwd`
set -x
set -e
+if ld --version | grep gold
+then
+ echo cannot build valgrind with gold
+ exit 1
+fi
+
# Check out latest version that following patches known to apply against
rm -rf valgrind-20090715
svn co -r '{2009-07-15}' svn://svn.valgrind.org/valgrind/trunk valgrind-20090715
@@ -19,7 +25,7 @@ cd ..
# Work around bug https://bugs.kde.org/show_bug.cgi?id=162848
# "fork() not handled properly"
-#wget -O fork.patch "https://bugs.kde.org/attachment.cgi?id=35150"
+#wget -O fork.patch "https://bugs.kde.org/attachment.cgi?id=35510"
patch -p0 < "$THISDIR"/fork.patch
# Work around bug https://bugs.kde.org/show_bug.cgi?id=186796
@@ -30,6 +36,15 @@ patch -p0 < "$THISDIR"/longlines.patch
sh autogen.sh
./configure --prefix=/usr/local/valgrind-20090715
make -j4
+
+if ./vg-in-place /bin/true
+then
+ echo built valgrind passes smoke test, good
+else
+ echo built valgrind fails smoke test
+ exit 1
+fi
+
sudo make install
cd /usr
test -f bin/valgrind && sudo mv bin/valgrind bin/valgrind.orig
diff --git a/tools/valgrind/fork.patch b/tools/valgrind/fork.patch
index 6b64003..7e9281c 100644
--- a/tools/valgrind/fork.patch
+++ b/tools/valgrind/fork.patch
@@ -1,3 +1,28 @@
+Index: coregrind/m_syswrap/syswrap-generic.c
+===================================================================
+--- coregrind/m_syswrap/syswrap-generic.c (revision 10399)
++++ coregrind/m_syswrap/syswrap-generic.c (working copy)
+@@ -2558,6 +2558,15 @@
+
+ } else {
+ path = (Char*)ARG1;
++ if (VG_(clo_xml)) {
++ VG_(message)(Vg_UserMsg, "");
++ VG_(message)(Vg_UserMsg, "<execv/>");
++ VG_(message)(Vg_UserMsg, "");
++ VG_(message)(Vg_UserMsg, "</valgrindoutput>");
++ VG_(message)(Vg_UserMsg, "");
++ } else {
++ VG_(message)(Vg_UserMsg, "execv called - the tool will now quit");
++ }
+ }
+
+ // Set up the child's environment.
+@@ -4093,4 +4102,3 @@
+ /*--------------------------------------------------------------------*/
+ /*--- end ---*/
+ /*--------------------------------------------------------------------*/
+-
Index: coregrind/m_main.c
===================================================================
--- coregrind/m_main.c (revision 10399)