Avoid race condition by "make install -j1" in canadian build->target
The first stage of canadian build "build->target" fails very
frequently during libiberty.a installation in parallel ( > -j4)
The observed sympton is that all threads try to install the
same libiberty.a and latecomer fails in "mv -f" when libiberty.an
is already renamed. eg.
/usr/bin/install -c -m 644 ./libiberty.a \
my-build-path/host-x86_64-linux-gnu/install/lib/libiberty.an
( cd my-build-path/host-x86_64-linux-gnu/install/lib ;
chmod 644 ./libiberty.an ;
x86_64-linux-gnu-ranlib ./libiberty.an )
mv -f my-build-path/host-x86_64-linux-gnu/install/lib/libiberty.an \
my-build-path/host-x86_64-linux-gnu/install/lib/libiberty.a
build/tools/build-gcc.sh can scale back and continue in half -j
until it succeeds, but the 2nd stage "host->target" often build
slowly with lower -j
Reduce compilations time of GCC 4.7 --mingw from 669s to 543s, or
1.23X
Change-Id: Ie683319adf445303f485258c65ef3189f605f300
1 file changed