Chromium Code Reviews| Index: build/install-build-deps.sh |
| diff --git a/build/install-build-deps.sh b/build/install-build-deps.sh |
| index f28409bc092bd7d2f952a441bf7ca34f94ad9379..1b4b899c0078bed40d5e20dda78b8c288aaa742a 100755 |
| --- a/build/install-build-deps.sh |
| +++ b/build/install-build-deps.sh |
| @@ -12,6 +12,7 @@ usage() { |
| echo "Usage: $0 [--options]" |
| echo "Options:" |
| echo "--[no-]syms: enable or disable installation of debugging symbols" |
| + echo "--lib32: enable installation of 32-bit libraries, e.g. for V8 snapshot" |
| echo "--[no-]arm: enable or disable installation of arm cross toolchain" |
| echo "--[no-]chromeos-fonts: enable or disable installation of Chrome OS"\ |
| "fonts" |
| @@ -44,9 +45,7 @@ do |
| case "$1" in |
| --syms) do_inst_syms=1;; |
| --no-syms) do_inst_syms=0;; |
| - # TODO(phajdan.jr): Remove the lib32 flags when nothing else refers to them. |
| --lib32) do_inst_lib32=1;; |
| - --no-lib32) do_inst_lib32=0;; |
| --arm) do_inst_arm=1;; |
| --no-arm) do_inst_arm=0;; |
| --chromeos-fonts) do_inst_chromeos_fonts=1;; |
| @@ -63,6 +62,10 @@ do |
| shift |
| done |
| +if test "$do_inst_arm" = "1"; then |
| + do_inst_lib32=1 |
| +fi |
| + |
| # Check for lsb_release command in $PATH |
| if ! which lsb_release > /dev/null; then |
| echo "ERROR: lsb_release not found in \$PATH" >&2 |
| @@ -137,11 +140,13 @@ dbg_list="libatk1.0-dbg libc6-dbg libcairo2-dbg libfontconfig1-dbg |
| libxrandr2-dbg libxrender1-dbg libxtst6-dbg zlib1g-dbg |
| libstdc++6-4.6-dbg" |
| +# 32-bit libraries needed e.g. to compile V8 snapshot for Android or armhf |
| +lib32_list="linux-libc-dev:i386" |
|
Primiano Tucci (use gerrit)
2014/11/26 16:41:43
Can you move these lines below (near the next +++
johnme
2014/11/26 17:14:37
I don't want to move this too far from the definit
|
| + |
| # arm cross toolchain packages needed to build chrome on armhf |
| arm_list="libc6-dev-armhf-cross |
| linux-libc-dev-armhf-cross |
| - g++-arm-linux-gnueabihf |
| - linux-libc-dev:i386" |
| + g++-arm-linux-gnueabihf" |
| # Packages to build NaCl, its toolchains, and its ports. |
| naclports_list="ant autoconf bison cmake gawk intltool xutils-dev xsltproc" |
| @@ -265,17 +270,24 @@ else |
| dbg_list= |
| fi |
| -# When cross building for arm on 64-bit systems the host binaries |
| +# When cross building for arm/Android on 64-bit systems the host binaries |
| # that are part of v8 need to be compiled with -m32 which means |
| # that basic multilib support is needed. |
| if file /sbin/init | grep -q 'ELF 64-bit'; then |
| - if [ "$lsb_release" = "trusty" ]; then |
| - # gcc-multilib conflicts with the arm cross compiler in trusty but |
| - # g++-4.8-multilib gives us the 32-bit support that we need. |
| - arm_list="$arm_list g++-4.8-multilib" |
| - else |
| - arm_list="$arm_list g++-multilib" |
| - fi |
| + # gcc-multilib conflicts with the arm cross compiler (at least in trusty) but |
| + # g++-X.Y-multilib gives us the 32-bit support that we need. Find out the |
| + # appropriate value of X and Y by seeing what version the current |
| + # distribution's g++-multilib package depends on. |
| + multilib_package=$(apt-cache depends g++-multilib --important | \ |
| + grep -E --color=never --only-matching '\bg\+\+-[0-9.]+-multilib\b') |
| + lib32_list="$lib32_list $multilib_package" |
| +fi |
| + |
| +if test "$do_inst_lib32" = "1" ; then |
| + echo "Including 32-bit libraries for ARM/Android." |
| +else |
| + echo "Skipping 32-bit libraries for ARM/Android." |
| + lib32_list= |
|
Primiano Tucci (use gerrit)
2014/11/26 16:41:43
Uhm there seems to be no use of this lib32_list.
I
johnme
2014/11/26 17:14:37
Done.
|
| fi |
| if test "$do_inst_arm" = "1" ; then |
| @@ -333,6 +345,11 @@ if [ 1 -eq "${do_quick_check-0}" ] ; then |
| exit 0 |
| fi |
| +if test "$do_inst_lib32" = "1" || test "$do_inst_nacl" = "1"; then |
| + if [[ ! $lsb_release =~ (precise|quantal|raring) ]]; then |
| + sudo dpkg --add-architecture i386 |
| + fi |
| +fi |
| sudo apt-get update |
| # We initially run "apt-get" with the --reinstall option and parse its output. |