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