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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 ./configure --prefix=/usr/local/gold --enable-gold | 60 ./configure --prefix=/usr/local/gold --enable-gold |
61 make -j3 | 61 make -j3 |
62 if sudo make install | 62 if sudo make install |
63 then | 63 then |
64 # Still need to figure out graceful way of pointing gyp to use | 64 # Still need to figure out graceful way of pointing gyp to use |
65 # /usr/local/gold/bin/ld without requiring him to set environment | 65 # /usr/local/gold/bin/ld without requiring him to set environment |
66 # variables. That will go into bootstrap-linux.sh when it's ready. | 66 # variables. That will go into bootstrap-linux.sh when it's ready. |
67 echo "Installing gold as /usr/bin/ld." | 67 echo "Installing gold as /usr/bin/ld." |
68 echo "To uninstall, do 'cd /usr/bin; sudo rm ld; sudo mv ld.orig ld'" | 68 echo "To uninstall, do 'cd /usr/bin; sudo rm ld; sudo mv ld.orig ld'" |
69 test -f /usr/bin/ld && sudo mv /usr/bin/ld /usr/bin/ld.orig | 69 test -f /usr/bin/ld && sudo mv /usr/bin/ld /usr/bin/ld.orig |
| 70 sudo strip /usr/local/gold/bin/ld |
70 sudo ln -fs /usr/local/gold/bin/ld /usr/bin/ld.gold | 71 sudo ln -fs /usr/local/gold/bin/ld /usr/bin/ld.gold |
71 sudo ln -fs /usr/bin/ld.gold /usr/bin/ld | 72 sudo ln -fs /usr/bin/ld.gold /usr/bin/ld |
72 else | 73 else |
73 echo "make install failed, not installing gold" | 74 echo "make install failed, not installing gold" |
74 fi | 75 fi |
75 } | 76 } |
76 | 77 |
77 if ! egrep -q "Ubuntu 8.04|Ubuntu 8.10|Ubuntu 9.04" /etc/issue; then | 78 if ! egrep -q "Ubuntu 8.04|Ubuntu 8.10|Ubuntu 9.04" /etc/issue; then |
78 echo "Only Ubuntu 8.04, 8.10, and 9.04 are currently supported" >&2 | 79 echo "Only Ubuntu 8.04, 8.10, and 9.04 are currently supported" >&2 |
79 exit 1 | 80 exit 1 |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 sed -e 's/[.]so[.][0-9].*/.so/' | | 362 sed -e 's/[.]so[.][0-9].*/.so/' | |
362 sort -u); do | 363 sort -u); do |
363 [ "x${i##*/}" = "xld-linux.so" ] && continue | 364 [ "x${i##*/}" = "xld-linux.so" ] && continue |
364 [ -r "$i" ] && continue | 365 [ -r "$i" ] && continue |
365 j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' | | 366 j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' | |
366 sort -n | tail -n 1)" | 367 sort -n | tail -n 1)" |
367 [ -r "$i.$j" ] || continue | 368 [ -r "$i.$j" ] || continue |
368 sudo ln -s "${i##*/}.$j" "$i" | 369 sudo ln -s "${i##*/}.$j" "$i" |
369 done | 370 done |
370 fi | 371 fi |
OLD | NEW |