1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:37:44 +00:00

Toolchain: Always remove the previous artifacts when building

This commit is contained in:
AnotherTest 2021-02-21 21:50:29 +03:30 committed by Andreas Kling
parent 7b156a7add
commit bd318dcdcd

View file

@ -140,7 +140,10 @@ pushd "$DIR/Tarballs"
echo "Skipped downloading gcc" echo "Skipped downloading gcc"
fi fi
if [ ! -d ${BINUTILS_NAME} ]; then if [ -d ${BINUTILS_NAME} ]; then
rm -rf "${BINUTILS_NAME}"
rm -rf "$DIR/Build/$ARCH/$BINUTILS_NAME"
fi
echo "Extracting binutils..." echo "Extracting binutils..."
tar -xzf ${BINUTILS_PKG} tar -xzf ${BINUTILS_PKG}
@ -153,12 +156,15 @@ pushd "$DIR/Tarballs"
else else
patch -p1 < "$DIR"/Patches/binutils.patch > /dev/null patch -p1 < "$DIR"/Patches/binutils.patch > /dev/null
fi fi
$MD5SUM "$DIR"/Patches/binutils.patch > .patch.applied
popd popd
else
echo "Skipped extracting binutils"
fi
if [ ! -d $GCC_NAME ]; then if [ -d ${GCC_NAME} ]; then
# Drop the previously patched extracted dir
rm -rf "${GCC_NAME}"
# Also drop the build dir
rm -rf "$DIR/Build/$ARCH/$GCC_NAME"
fi
echo "Extracting gcc..." echo "Extracting gcc..."
tar -xzf $GCC_PKG tar -xzf $GCC_PKG
pushd $GCC_NAME pushd $GCC_NAME
@ -170,17 +176,14 @@ pushd "$DIR/Tarballs"
else else
patch -p1 < "$DIR/Patches/gcc.patch" > /dev/null patch -p1 < "$DIR/Patches/gcc.patch" > /dev/null
fi fi
$MD5SUM "$DIR/Patches/gcc.patch" > .patch.applied
popd popd
else
echo "Skipped extracting gcc"
fi
if [ "$(uname)" = "Darwin" ]; then if [ "$(uname)" = "Darwin" ]; then
pushd "gcc-${GCC_VERSION}" pushd "gcc-${GCC_VERSION}"
./contrib/download_prerequisites ./contrib/download_prerequisites
popd popd
fi fi
popd popd