1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:47:45 +00:00

Toolchain: Replace inline nproc with get_number_of_processing_units()

This commit is contained in:
Kenneth Myhra 2023-05-02 21:05:04 +02:00 committed by Jelle Raaijmakers
parent 36c892ae14
commit 50413c2326
8 changed files with 17 additions and 55 deletions

View file

@ -21,30 +21,25 @@ PREFIX="$DIR/Local/$ARCH-gdb"
echo "Building GDB $GDB_VERSION for $TARGET"
MD5SUM="md5sum"
NPROC="nproc"
SYSTEM_NAME="$(uname -s)"
if [ "$SYSTEM_NAME" = "OpenBSD" ]; then
MD5SUM="md5 -q"
NPROC="sysctl -n hw.ncpuonline"
export CC=egcc
export CXX=eg++
export with_gmp=/usr/local
export LDFLAGS=-Wl,-z,notext
elif [ "$SYSTEM_NAME" = "FreeBSD" ]; then
MD5SUM="md5 -q"
NPROC="sysctl -n hw.ncpu"
export with_gmp=/usr/local
export with_mpfr=/usr/local
elif [ "$SYSTEM_NAME" = "Darwin" ]; then
MD5SUM="md5 -q"
NPROC="sysctl -n hw.ncpu"
fi
if [ -z "$MAKEJOBS" ]; then
MAKEJOBS=$($NPROC)
fi
NPROC=$(get_number_of_processing_units)
[ -z "$MAKEJOBS" ] && MAKEJOBS=${NPROC}
buildstep() {
NAME=$1