cros_setup_toolchains: rebuild libtool as needed

Whenever gcc upgrades, /usr/bin/libtool breaks because it hardcodes paths
to internal gcc paths.  For example, the current script has:
  sys_lib_search_path_spec="/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.x-google /usr/lib64 /lib64 /usr/x86_64-pc-linux-gnu/lib "

So when we upgrade to gcc-4.8, that'll break and require manual cleanup.

Similarly, when we bootstrap the sdk, we switch from whatever gcc is in
the stage3 to our own version, and then libtool breaks.

BUG=chromium:313075
BUG=chromium:267982
TEST=`cbuildbot chromiumos-sdk` w/new stage3 no longer hit libtool errors
TEST=manually munged /usr/bin/libtool, ran `./update_chroot`, and saw libtool get rebuilt

Change-Id: I89115d509d226796e8c841487c98ba3def29cfc0
Reviewed-on: https://chromium-review.googlesource.com/176241
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Luis Lozano <llozano@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
1 file changed