diff options
author | dank@chromium.org <dank@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-11 17:44:04 +0000 |
---|---|---|
committer | dank@chromium.org <dank@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-11 17:44:04 +0000 |
commit | c87aa98848fbd1ec35f752e4a14d14a744eae7d3 (patch) | |
tree | f4ba925fd256fa807c8a365e3daaff4a9a5d2423 /build | |
parent | 432b209d282ab13dbeec2f01e27d001d2417ed24 (diff) | |
download | chromium_src-c87aa98848fbd1ec35f752e4a14d14a744eae7d3.zip chromium_src-c87aa98848fbd1ec35f752e4a14d14a744eae7d3.tar.gz chromium_src-c87aa98848fbd1ec35f752e4a14d14a744eae7d3.tar.bz2 |
Support Jaunty by dropping package xcb-xlib0.
Support (our local flavor of) hardy by dropping package sun-java6-fonts (which is broken there).
Add optional support for gold. (It would be better to not replace the system linker, but it's reversible, and works well unless you need to build wine or valgrind.)
BUG=13457
TEST=verify that this installs a working chrome dev env on clean hardy and jaunty
Review URL: http://codereview.chromium.org/119331
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18175 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-x | build/install-build-deps.sh | 85 |
1 files changed, 80 insertions, 5 deletions
diff --git a/build/install-build-deps.sh b/build/install-build-deps.sh index 6ea68b8..9b61d8b 100755 --- a/build/install-build-deps.sh +++ b/build/install-build-deps.sh @@ -4,6 +4,60 @@ # See http://code.google.com/p/chromium/wiki/LinuxBuildInstructions # and http://code.google.com/p/chromium/wiki/LinuxBuild64Bit +install_gold() { + # Gold is optional; it's a faster replacement for ld, + # and makes life on 2GB machines much more pleasant. + + BINUTILS=binutils-2.19.1 + BINUTILS_URL=http://ftp.gnu.org/gnu/binutils/$BINUTILS.tar.bz2 + BINUTILS_SHA1=88c91e36cde93433e4c4c2b2e3417777aad84526 + + test -f $BINUTILS.tar.bz2 || wget $BINUTILS_URL + if `sha1sum $BINUTILS.tar.bz2` != $BINUTILS_SHA1 + then + echo Bad sha1sum for $BINUTILS.tar.bz2 + exit 1 + fi + cat > binutils-fix.patch <<__EOF__ +--- binutils-2.19.1/gold/reduced_debug_output.h.orig 2009-05-10 14:44:52.000000000 -0700 ++++ binutils-2.19.1/gold/reduced_debug_output.h 2009-05-10 14:46:51.000000000 -0700 +@@ -64,7 +64,7 @@ + void + failed(std::string reason) + { +- gold_warning(reason.c_str()); ++ gold_warning("%s", reason.c_str()); + failed_ = true; + } + +@@ -110,7 +110,7 @@ + void + failed(std::string reason) + { +- gold_warning(reason.c_str()); ++ gold_warning("%s", reason.c_str()); + this->failed_ = true; + } + +__EOF__ + + tar -xjvf $BINUTILS.tar.bz2 + cd $BINUTILS + patch -p1 < ../binutils-fix.patch + ./configure --prefix=/usr/local/gold --enable-gold + make -j3 + sudo make install + + # Still need to figure out graceful way of pointing gyp to use + # /usr/local/gold/bin/ld without requiring him to set environment + # variables. That will go into bootstrap-linux.sh when it's ready. + echo "Installing gold as /usr/bin/ld." + echo "To uninstall, do 'cd /usr/bin; sudo rm ld; sudo mv ld.orig ld'" + test -f /usr/bin/ld && sudo mv /usr/bin/ld /usr/bin/ld.orig + sudo ln -fs /usr/local/gold/bin/ld /usr/bin/ld.gold + sudo ln -fs /usr/bin/ld.gold /usr/bin/ld +} + if ! egrep -q "Ubuntu 8.04|Ubuntu 8.10|Ubuntu 9.04" /etc/issue; then echo "Only Ubuntu 8.04, 8.10, and 9.04 are currently supported" >&2 exit 1 @@ -24,13 +78,13 @@ fi dev_list="bison fakeroot flex g++ g++-multilib gperf libasound2-dev libcairo2-dev libgconf2-dev libglib2.0-dev libgtk2.0-dev libnspr4-dev libnss3-dev libsqlite3-dev lighttpd msttcorefonts perl php5-cgi - pkg-config python subversion sun-java6-fonts wdiff" + pkg-config python subversion wdiff" # Full list of required run-time libraries lib_list="libatk1.0-0 libc6 libasound2 libcairo2 libexpat1 libfontconfig1 libfreetype6 libglib2.0-0 libgtk2.0-0 libnspr4-0d libnss3-1d libpango1.0-0 libpcre3 libpixman-1-0 libpng12-0 libstdc++6 - libsqlite3-0 libx11-6 libxau6 libxcb-xlib0 libxcb1 libxcomposite1 + libsqlite3-0 libx11-6 libxau6 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxi6 libxinerama1 libxrandr2 libxrender1 zlib1g" @@ -38,7 +92,7 @@ lib_list="libatk1.0-0 libc6 libasound2 libcairo2 libexpat1 libfontconfig1 dbg_list="libatk1.0-dbg libc6-dbg libcairo2-dbg libfontconfig1-dbg libglib2.0-0-dbg libgtk2.0-0-dbg libnspr4-0d-dbg libnss3-1d-dbg libpango1.0-0-dbg libpcre3-dbg libpixman-1-0-dbg libx11-6-dbg - libxau6-dbg libxcb-xlib0-dbg libxcb1-dbg libxcomposite1-dbg + libxau6-dbg libxcb1-dbg libxcomposite1-dbg libxcursor1-dbg libxdamage1-dbg libxdmcp6-dbg libxext6-dbg libxfixes3-dbg libxi6-dbg libxinerama1-dbg libxrandr2-dbg libxrender1-dbg zlib1g-dbg" @@ -82,7 +136,8 @@ yes_no() { done } -echo "This script installs all required libraries for building Chromium." +echo "This script installs all tools and libraries needed to build Chromium." +echo "" echo "For most of the libraries, it can also install debugging symbols, which" echo "will allow you to debug code in the system libraries. Most developers" echo "won't need these symbols." @@ -105,12 +160,32 @@ new_list="$(yes n | LANG=C sudo apt-get install --reinstall \ ${dev_list} ${lib_list} ${dbg_list} \ $([ "$(uname -m)" = x86_64 ] && echo ${cmp_list}) \ - 2>/dev/null | + | sed -e '1,/The following NEW packages will be installed:/d;s/^ //;t;d')" echo "Installing missing packages..." sudo apt-get install ${new_list} +# Some operating systems already ship gold +# (on Debian, you can probably do "apt-get install binutils-gold" to get it), +# but though Ubuntu toyed with shipping it, they haven't yet. +# So just install from source if it isn't the default linker. + +case `ld --version` in +*gold*) ;; +* ) + # FIXME: avoid installing as /usr/bin/ld + echo "Gold is a new linker that links Chrome 5x faster than ld." + echo "Don't use it if you need to link other apps (e.g. valgrind, wine)" + echo -n "REPLACE SYSTEM LINKER ld with gold and back up ld as ld.orig? (y/N) " + if yes_no 1; then + echo "Building binutils." + install_gold || exit 99 + else + echo "Not installing gold." + fi +esac + # Install 32bit backwards compatibility support for 64bit systems if [ "$(uname -m)" = x86_64 ]; then echo "Installing 32bit libraries that are not already provided by the system" |