From f9515d56e722cf834cced58dacdc4364827f21ea Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Wed, 15 May 2019 20:08:23 +0200 Subject: [PATCH] BuildIt: Allow specifying MAKEJOBS rather than forcing to nprocs --- Toolchain/BuildIt.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh index 63b5631817c..7a0327f9318 100755 --- a/Toolchain/BuildIt.sh +++ b/Toolchain/BuildIt.sh @@ -63,6 +63,10 @@ mkdir -p $PREFIX mkdir -p "$DIR/Build/binutils" mkdir -p "$DIR/Build/gcc" +if [ -z "$MAKEJOBS" ]; then + MAKEJOBS=$(nproc) +fi + pushd "$DIR/Build/" unset PKG_CONFIG_LIBDIR # Just in case @@ -71,7 +75,7 @@ pushd "$DIR/Build/" --target=$TARGET \ --with-sysroot=$SYSROOT \ --disable-nls || exit 1 - make -j $(nproc) || exit 1 + make -j $MAKEJOBS || exit 1 make install || exit 1 popd @@ -84,7 +88,7 @@ pushd "$DIR/Build/" --enable-languages=c,c++ || exit 1 echo "XXX build gcc and libgcc" - make -j $(nproc) all-gcc all-target-libgcc || exit 1 + make -j $MAKEJOBS all-gcc all-target-libgcc || exit 1 echo "XXX install gcc and libgcc" make install-gcc install-target-libgcc || exit 1