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.

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
Tested-by: Mike Frysinger <>
Reviewed-by: Luis Lozano <>
Commit-Queue: Mike Frysinger <>
1 file changed