From 8c86db51d72fd9baa5ed0adebca11e5d08f9eed4 Mon Sep 17 00:00:00 2001 From: Ahmad Sharif Date: Thu, 30 Jun 2011 19:51:37 -0700 Subject: [PATCH] Changed build_image to use toolchain_utils.sh to install gcc libs. BUG=none TEST=buildbot.py arm-generic-full buildbot.py x86-generic-full Change-Id: I6cdc22d50422afb721ce0d743c8a80398719f9b4 Reviewed-on: http://gerrit.chromium.org/gerrit/3556 Reviewed-by: David James Reviewed-by: asharif Tested-by: asharif --- build_image | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build_image b/build_image index ea50fd7ca6..5cb36a6ee0 100755 --- a/build_image +++ b/build_image @@ -679,10 +679,11 @@ create_base_image() { ./usr/lib/debug/usr/${CHOST} --strip-components=6 fi - # We need to install libstdc++ manually from the cross toolchain. - # TODO: Figure out a better way of doing this? - sudo cp -a "${BOARD_ROOT}"/lib/libgcc_s.so* "${ROOT_FS_DIR}/lib" - sudo cp -a "${BOARD_ROOT}"/usr/lib/libstdc++.so* "${ROOT_FS_DIR}/usr/lib" + . "${SRC_ROOT}/platform/dev/toolchain_utils.sh" + board_ctarget=$(get_ctarget_from_board "${BOARD}") + for atom in $(portageq match / cross-$board_ctarget/gcc); do + copy_gcc_libs "${ROOT_FS_DIR}" $atom + done # We "emerge --root=${ROOT_FS_DIR} --root-deps=rdeps --usepkgonly" all of the # runtime packages for chrome os. This builds up a chrome os image from