| OLD | NEW |
| 1 #!/bin/bash -e | 1 #!/bin/bash -e |
| 2 | 2 |
| 3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 # Script to install everything needed to build chromium (well, ideally, anyway) | 7 # Script to install everything needed to build chromium (well, ideally, anyway) |
| 8 # See http://code.google.com/p/chromium/wiki/LinuxBuildInstructions | 8 # See http://code.google.com/p/chromium/wiki/LinuxBuildInstructions |
| 9 # and http://code.google.com/p/chromium/wiki/LinuxBuild64Bit | 9 # and http://code.google.com/p/chromium/wiki/LinuxBuild64Bit |
| 10 | 10 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 patch -p1 < ../binutils-fix.patch | 75 patch -p1 < ../binutils-fix.patch |
| 76 ./configure --prefix=/usr/local/gold --enable-gold | 76 ./configure --prefix=/usr/local/gold --enable-gold |
| 77 make -j3 | 77 make -j3 |
| 78 if sudo make install | 78 if sudo make install |
| 79 then | 79 then |
| 80 # Still need to figure out graceful way of pointing gyp to use | 80 # Still need to figure out graceful way of pointing gyp to use |
| 81 # /usr/local/gold/bin/ld without requiring him to set environment | 81 # /usr/local/gold/bin/ld without requiring him to set environment |
| 82 # variables. That will go into bootstrap-linux.sh when it's ready. | 82 # variables. That will go into bootstrap-linux.sh when it's ready. |
| 83 echo "Installing gold as /usr/bin/ld." | 83 echo "Installing gold as /usr/bin/ld." |
| 84 echo "To uninstall, do 'cd /usr/bin; sudo rm ld; sudo mv ld.orig ld'" | 84 echo "To uninstall, do 'cd /usr/bin; sudo rm ld; sudo mv ld.orig ld'" |
| 85 test -f /usr/bin/ld && sudo mv /usr/bin/ld /usr/bin/ld.orig | 85 test -f /usr/bin/ld && test ! -f /usr/bin/ld.orig && \ |
| 86 sudo mv /usr/bin/ld /usr/bin/ld.orig |
| 86 sudo strip /usr/local/gold/bin/ld | 87 sudo strip /usr/local/gold/bin/ld |
| 87 sudo ln -fs /usr/local/gold/bin/ld /usr/bin/ld.gold | 88 sudo ln -fs /usr/local/gold/bin/ld /usr/bin/ld.gold |
| 88 sudo ln -fs /usr/bin/ld.gold /usr/bin/ld | 89 sudo ln -fs /usr/bin/ld.gold /usr/bin/ld |
| 89 else | 90 else |
| 90 echo "make install failed, not installing gold" | 91 echo "make install failed, not installing gold" |
| 91 fi | 92 fi |
| 92 } | 93 } |
| 93 | 94 |
| 94 if ! egrep -q 'Ubuntu (8\.04|8\.10|9\.04|9\.10)' /etc/issue; then | 95 if ! egrep -q 'Ubuntu (8\.04|8\.10|9\.04|9\.10)' /etc/issue; then |
| 95 echo "Only Ubuntu 8.04, 8.10, 9.04, and 9.10 are currently supported" >&2 | 96 echo "Only Ubuntu 8.04, 8.10, 9.04, and 9.10 are currently supported" >&2 |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 sed -e 's/[.]so[.][0-9].*/.so/' | | 385 sed -e 's/[.]so[.][0-9].*/.so/' | |
| 385 sort -u); do | 386 sort -u); do |
| 386 [ "x${i##*/}" = "xld-linux.so" ] && continue | 387 [ "x${i##*/}" = "xld-linux.so" ] && continue |
| 387 [ -r "$i" ] && continue | 388 [ -r "$i" ] && continue |
| 388 j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' | | 389 j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' | |
| 389 sort -n | tail -n 1)" | 390 sort -n | tail -n 1)" |
| 390 [ -r "$i.$j" ] || continue | 391 [ -r "$i.$j" ] || continue |
| 391 sudo ln -s "${i##*/}.$j" "$i" | 392 sudo ln -s "${i##*/}.$j" "$i" |
| 392 done | 393 done |
| 393 fi | 394 fi |
| OLD | NEW |