Update build_image to use ldd distributed with target if it's present.

BUG=chromium-os:13977
TEST=Build an image with new compiler, boot image and verify new ldd is used.
     Build image with old compiler and verify old ldd is used.

Change-Id: I8cbc5b87342245106f0a8fd0fa80ae42329eff60
Reviewed-on: http://gerrit.chromium.org/gerrit/1367
Tested-by: David James <davidjames@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
This commit is contained in:
David James 2011-05-23 10:38:11 -07:00
parent 35269d23f8
commit 72759e8c1e

View File

@ -460,8 +460,12 @@ update_dev_packages() {
# Leave core files for developers to inspect.
sudo touch "${ROOT_FS_DIR}/root/.leave_core"
# The ldd tool is a useful shell script but lives in glibc; just copy it.
sudo cp -a "$(which ldd)" "${root_dev_dir}/usr/bin"
# This hack is only needed for devs who have old versions of glibc, which
# filtered out ldd when cross-compiling. TODO(davidjames): Remove this hack
# once everybody has upgraded to a new version of glibc.
if [[ ! -x "${ROOT_FS_DIR}/usr/bin/ldd" ]]; then
sudo cp -a "$(which ldd)" "${ROOT_FS_DIR}/usr/bin"
fi
# If vim is installed, then a vi symlink would probably help.
if [[ -x "${ROOT_FS_DIR}/usr/local/bin/vim" ]]; then