mirror of
https://git.planet-casio.com/Lephenixnoir/sh-elf-binutils.git
synced 2025-06-07 03:45:03 +02:00
build: obtain number of cores in an OpenBSD-compliant way
This commit is contained in:
parent
8957b70549
commit
75f209c4c9
1 changed files with 8 additions and 1 deletions
9
build.sh
9
build.sh
|
@ -6,6 +6,13 @@
|
||||||
source util.sh
|
source util.sh
|
||||||
cd build
|
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)..."
|
echo "$TAG Compiling binutils (usually 5-10 minutes)..."
|
||||||
run_quietly giteapc-build.log \
|
run_quietly giteapc-build.log \
|
||||||
make -j$(nproc)
|
make -j"$cores"
|
||||||
|
|
Loading…
Add table
Reference in a new issue