summaryrefslogtreecommitdiff
path: root/Toolchain
diff options
context:
space:
mode:
authorRobin Burchell <robin+git@viroteck.net>2019-05-15 20:08:23 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-05-15 20:16:58 +0200
commitf9515d56e722cf834cced58dacdc4364827f21ea (patch)
treea31a8cb1bd7f8d8a4a6d5271597daa8bcc328fba /Toolchain
parentbfd94dbf54488d815a5058476d78f0d065facefd (diff)
downloadserenity-f9515d56e722cf834cced58dacdc4364827f21ea.zip
BuildIt: Allow specifying MAKEJOBS rather than forcing to nprocs
Diffstat (limited to 'Toolchain')
-rwxr-xr-xToolchain/BuildIt.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh
index 63b5631817..7a0327f931 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