From a91800bcc90888c11ce42038e845bc5408de2339 Mon Sep 17 00:00:00 2001 From: Darren Krahn Date: Tue, 4 Dec 2012 14:57:57 -0800 Subject: [PATCH] Revert "build_image: filter out unused glibc files" This removes files only used at link time, or when manually debugging, or by glibc's charset routines (gconv) which are not used by Chromium. BUG=chromium-os:22939 BUG=chromium-os:23105 TEST=build_image for daisy works TEST=`cbuildbot {x86,x86_64,arm}-generic-full` worked TEST=`cbuildbot chromiumos-sdk` worked TEST=build_image boots & runs fine on an alex Original-Change-Id: I68d848c2e307c98d53a8faa73924f57571f7887b Change-Id: I25ffda36d28fd114715053c3a2590cc2248688bf Reviewed-on: https://gerrit.chromium.org/gerrit/39214 Reviewed-by: David James Commit-Ready: Darren Krahn Tested-by: Darren Krahn --- build_library/base_image_util.sh | 15 --------------- build_library/dev_image_util.sh | 8 ++++++-- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/build_library/base_image_util.sh b/build_library/base_image_util.sh index c53578a41b..84b31118c7 100755 --- a/build_library/base_image_util.sh +++ b/build_library/base_image_util.sh @@ -177,21 +177,6 @@ create_base_image() { 'usr/include' 'sys-include' # Link-time objects. '*.[ao]' - # Link-time symlinks & linker scripts. - 'usr/lib*/lib*.so' - # We mount /var manually so this gets thrown away. - 'var' - # Debug commands not used by normal runtime code. - 'usr/bin/'{getent,ldd} - # LD_PRELOAD objects for debugging. - 'lib*/lib'{memusage,pcprofile,SegFault}.so 'usr/lib*/audit' - # Libraries used for translating between charsets -- but we use libicu - # in Chromium, so there's no need for these. http://crosbug.com/23105 - 'usr/*/gconv' - # We only use files & dns with nsswitch, so throw away the others. - 'lib*/libnss_'{compat,db,hesiod,nis,nisplus}'*.so*' - # This is only for very old packages which we don't have. - 'lib*/libBrokenLocale*.so*' ) pbzip2 -dc --ignore-trailing-garbage=1 "${LIBC_PATH}" | \ sudo tar xpf - -C "${root_fs_dir}" ./usr/${CHOST} \ diff --git a/build_library/dev_image_util.sh b/build_library/dev_image_util.sh index c2a27fe663..1e9f1c1e5f 100755 --- a/build_library/dev_image_util.sh +++ b/build_library/dev_image_util.sh @@ -60,8 +60,12 @@ install_dev_packages() { # Leave core files for developers to inspect. sudo touch "${root_fs_dir}/root/.leave_core" - # Release images do not include these, so install it for dev images. - sudo cp -a "${BOARD_ROOT}"/usr/bin/{getent,ldd} "${root_fs_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