Fix build failure by "x86_64-cros-linux-gnu not found."
The libc debug step in dev_image_util is broken on certain old branches.
Remove that because we don't need the debug symbol files in factory
branches.
BUG=chromium:940696
TEST=None
Change-Id: I25bc5f8dc712e8233f7638d6abe14762e080c56e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/1584199
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
(cherry picked from commit 4c99ea2bc10f476cfdf74ca6ebc2ad07acfc5bd8)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/1588023
diff --git a/build_library/dev_image_util.sh b/build_library/dev_image_util.sh
index 9bce0df..27064dd 100755
--- a/build_library/dev_image_util.sh
+++ b/build_library/dev_image_util.sh
@@ -34,15 +34,16 @@
# Install developer packages.
emerge_to_image --root="${root_dev_dir}" virtual/target-os-dev
+ # WORKAROUND crbug.com/940696: Remove debug info so build_image won't fail.
# Copy over the libc debug info so that gdb
# works with threads and also for a better debugging experience.
- sudo mkdir -p "${root_fs_dir}/usr/local/usr/lib/debug"
- pbzip2 -dc --ignore-trailing-garbage=1 "${LIBC_PATH}" | \
- sudo tar xpf - -C "${root_fs_dir}/usr/local/usr/lib/debug" \
- ./usr/lib/debug/usr/${CHOST} --strip-components=6
+ # sudo mkdir -p "${root_fs_dir}/usr/local/usr/lib/debug"
+ # pbzip2 -dc --ignore-trailing-garbage=1 "${LIBC_PATH}" | \
+ # sudo tar xpf - -C "${root_fs_dir}/usr/local/usr/lib/debug" \
+ # ./usr/lib/debug/usr/${CHOST} --strip-components=6
# Since gdb only looks in /usr/lib/debug, symlink the /usr/local
# path so that it is found automatically.
- sudo ln -s /usr/local/usr/lib/debug "${root_fs_dir}/usr/lib/debug"
+ # sudo ln -s /usr/local/usr/lib/debug "${root_fs_dir}/usr/lib/debug"
# Install the bare necessary files so that the "emerge" command works
local portage_make_globals_path="/usr/share/portage/config/make.globals"