From f51b39a0e34f1140ba3ecd4e01d9ce91226054af Mon Sep 17 00:00:00 2001 From: Ahmad Sharif Date: Fri, 24 Jun 2011 16:44:26 -0700 Subject: [PATCH] Changed build_image to use toolchain_utils.sh to install gcc libs. toolchain_utils.sh contains the relevant function to switch cross-gcc's and copy over the libraries. BUG=none TEST=./setup_board --board=x86-mario --nousepkg && ./build_packages --board=x86-mario && ./build_image --board=x86-mario && ./mod_image_for_vm.sh --board=x86-mario && tested image on vm. Also ran: cbuildbot.py --buildroot=checkout --resume --noarchive --nosync --nouprev --noprebuilts x86-generic-full and it passed. Change-Id: Ic38752eaadbf4f033a9ec7ee288a560f24a6c0b2 Reviewed-on: http://gerrit.chromium.org/gerrit/3212 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 237232fc77..3408bd6f2f 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