From 92b4b9d61fca88365fa2ee81cdf6c2351d1e4b51 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sun, 28 Apr 2019 03:22:39 +0200 Subject: [PATCH] Only extract binutils and gcc when necessary --- doc/cross-gcc.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/cross-gcc.sh b/doc/cross-gcc.sh index 5a82c10..56b0117 100644 --- a/doc/cross-gcc.sh +++ b/doc/cross-gcc.sh @@ -52,7 +52,8 @@ PATH="$PREFIX/bin:$PATH" $WGET "$MIRROR/pub/binutils/releases/binutils-$BINUTILS_VERSION.tar.$GZEXT" #Extract, configure, and build binutils in a dedicated tree -$TAR xzvf "binutils-$BINUTILS_VERSION.tar.$GZEXT" +[ -d "binutils-$BINUTILS_VERSION" ] || + $TAR xzvf "binutils-$BINUTILS_VERSION.tar.$GZEXT" case "$TARGET" in aarch64-elf|amd64-elf|sparc64-elf) BINUTILS_FLAGS="$BINUTILS_FLAGS --enable-multilib" @@ -70,7 +71,8 @@ $MKDIR "binutils-build" $WGET "$MIRROR/pub/gcc/releases/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.$GZEXT" #Extract, configure, and build GCC in a dedicated tree -$TAR xzvf "gcc-$GCC_VERSION.tar.$GZEXT" +[ -d "gcc-$GCC_VERSION" ] || + $TAR xzvf "gcc-$GCC_VERSION.tar.$GZEXT" case "$TARGET" in aarch64-elf|sparc64-elf) GCC_FLAGS="$GCC_FLAGS --with-multilib-list=m32,m64 --enable-targets=all"