diff --git a/build.sh b/build.sh index acc2395..2d5393c 100755 --- a/build.sh +++ b/build.sh @@ -6,6 +6,13 @@ source util.sh cd build +# Number of processor core +if [[ $(uname) == "OpenBSD" ]]; then + cores=$(sysctl -n hw.ncpu) +else + cores=$(nproc) +fi + echo "$TAG Compiling binutils (usually 5-10 minutes)..." run_quietly giteapc-build.log \ -make -j$(nproc) +make -j"$cores"