diff options
author | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-22 20:34:00 +0000 |
---|---|---|
committer | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-22 20:34:00 +0000 |
commit | 42a1d1aa30ffaf2a48835fb5755c930120654617 (patch) | |
tree | 33833e7302ee9dc43ff5a758736861208b7641b4 | |
parent | 9e8e0ba3e6126b603ae8beca399f69267ea01038 (diff) | |
download | chromium_src-42a1d1aa30ffaf2a48835fb5755c930120654617.zip chromium_src-42a1d1aa30ffaf2a48835fb5755c930120654617.tar.gz chromium_src-42a1d1aa30ffaf2a48835fb5755c930120654617.tar.bz2 |
Use ld.orig if present to build valgrind rather than making user switch back to ld.orig manually.
BUG=https://bugs.kde.org/show_bug.cgi?id=193413
TEST=script should build working valgrind even if user installed gold with install-build-deps.sh
Review URL: http://codereview.chromium.org/159218
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21315 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-x | tools/valgrind/build-valgrind-for-chromium.sh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/valgrind/build-valgrind-for-chromium.sh b/tools/valgrind/build-valgrind-for-chromium.sh index a9a5c6c..9308388 100755 --- a/tools/valgrind/build-valgrind-for-chromium.sh +++ b/tools/valgrind/build-valgrind-for-chromium.sh @@ -8,8 +8,17 @@ set -e if ld --version | grep gold then - echo "Cannot build valgrind with gold. Please switch to normal /usr/bin/ld, rerun this script, then switch back to gold." - exit 1 + # build/install-build-deps leaves original ld around, try using that + if test -x /usr/bin/ld.orig + then + echo "Using /usr/bin/ld.orig instead of gold to link valgrind" + mkdir $THISDIR/override_ld + ln -s /usr/bin/ld.orig $THISDIR/override_ld/ld + PATH="$THISDIR/override_ld:$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 + fi fi # Check out latest version that following patches known to apply against @@ -45,6 +54,8 @@ else exit 1 fi +test -d $THISDIR/override_ld && rm -rf $THISDIR/override_ld + sudo make install cd /usr test -f bin/valgrind && sudo mv bin/valgrind bin/valgrind.orig |