From 6c26f2dd91d32c5c1cbdeedc35c16176134f0f46 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 7 Nov 2012 03:31:13 -0500 Subject: [PATCH] setup_board: drop binutils version lookup When we stopped installing binutils into package.provided, we stopped needing to check its version at all. While CL:30287 updated the file, it left the latter in place. Scrub it now. BUG=chromium-os:21330 TEST=`./setup_board --board=x86-generic` setup gcc/glibc in package.provided and worked Change-Id: I5c5d7175f17fd2d4ad5231ed3f9f5ddee592aa63 Reviewed-on: https://gerrit.chromium.org/gerrit/37517 Reviewed-by: asharif Commit-Ready: Mike Frysinger Tested-by: Mike Frysinger --- setup_board | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/setup_board b/setup_board index 37f85d72f3..f27738a3d4 100755 --- a/setup_board +++ b/setup_board @@ -173,9 +173,7 @@ cross_get_version() { cpv=$(portageq match / cross-${toolchain}/${pkg} || true) fi else - if [[ "$pkg" = binutils ]] ; then - cpv=$(portageq match / sys-devel/binutils || true) - elif [[ "$pkg" = glibc ]] ; then + if [[ "$pkg" = glibc ]] ; then cpv=$(portageq match / sys-libs/glibc || true) elif [[ "$pkg" = gcc ]] ; then cpv=$(portageq match / sys-devel/gcc || true) @@ -195,9 +193,8 @@ cross_get_version() { } install_toolchain_in_provided() { - local binutils_ver="$1" - local gcc_ver="$2" - local glibc_ver="$3" + local gcc_ver="$1" + local glibc_ver="$2" # Tell portage that toolchain packages are already installed in the sysroot. ( echo sys-devel/gcc-$gcc_ver @@ -209,10 +206,9 @@ install_toolchain_in_provided() { # into the board root. install_toolchain_in_board() { local cmds - local binutils_ver=$(cross_get_version binutils) local gcc_ver=$(cross_get_version gcc) local libc_ver=$(cross_get_version glibc) - if [[ -z "$binutils_ver" || -z "$gcc_ver" || -z "$libc_ver" ]]; then + if [[ -z ${gcc_ver} || -z ${libc_ver} ]]; then die "Cannot find toolchain to install into board root" fi echo "Installing the toolchain into the board root." @@ -256,7 +252,7 @@ install_toolchain_in_board() { ) sudo_multi "${cmds[@]}" - install_toolchain_in_provided "$binutils_ver" "$gcc_ver" "$libc_ver" + install_toolchain_in_provided "$gcc_ver" "$libc_ver" # Configure new libc version in make.conf.board_setup. sudo sed -i -e "/^LIBC_VERSION=/d" $BOARD_SETUP