summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-22 02:00:47 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-22 02:00:47 +0000
commiteb49842c7d97917b00e1edfbf99bdeab78ea9f7f (patch)
treeb8f042ea9da1749eec0debd126211471614a6a45
parent4c00704f744e1d2ca1be9b7f67501a46452d4e03 (diff)
downloadchromium_src-eb49842c7d97917b00e1edfbf99bdeab78ea9f7f.zip
chromium_src-eb49842c7d97917b00e1edfbf99bdeab78ea9f7f.tar.gz
chromium_src-eb49842c7d97917b00e1edfbf99bdeab78ea9f7f.tar.bz2
Fixes for building and running valgrind on Ubuntu
- valgrind.sh is a bash script - Look for ld.single as well as ld.orig when searching for !gold ld Patch by Joel Stanley <joel@jms.id.au> Review URL: http://codereview.chromium.org/209009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26785 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xtools/valgrind/build-valgrind-for-chromium.sh8
-rwxr-xr-xtools/valgrind/valgrind.sh2
2 files changed, 9 insertions, 1 deletions
diff --git a/tools/valgrind/build-valgrind-for-chromium.sh b/tools/valgrind/build-valgrind-for-chromium.sh
index f11e43c..726cd10 100755
--- a/tools/valgrind/build-valgrind-for-chromium.sh
+++ b/tools/valgrind/build-valgrind-for-chromium.sh
@@ -124,6 +124,14 @@ then
mkdir "${OVERRIDE_LD_DIR}"
ln -s /usr/bin/ld.orig "${OVERRIDE_LD_DIR}/ld"
PATH="${OVERRIDE_LD_DIR}:${PATH}"
+ # Ubuntu diverts original ld to ld.single when it installs binutils-gold
+ elif test -x /usr/bin/ld.single
+ then
+ echo "Using /usr/bin/ld.single instead of gold to link valgrind"
+ test -d "${OVERRIDE_LD_DIR}" && rm -rf "${OVERRIDE_LD_DIR}"
+ mkdir "${OVERRIDE_LD_DIR}"
+ ln -s /usr/bin/ld.single "${OVERRIDE_LD_DIR}/ld"
+ PATH="${OVERRIDE_LD_DIR}:${PATH}"
else
echo "Cannot build valgrind with gold. Please switch to normal /usr/bin/ld, rerun this script, then switch back to gold."
exit 1
diff --git a/tools/valgrind/valgrind.sh b/tools/valgrind/valgrind.sh
index 5db5bfd..3f4c07e 100755
--- a/tools/valgrind/valgrind.sh
+++ b/tools/valgrind/valgrind.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be