mirror of
https://git.planet-casio.com/Lephenixnoir/sh-elf-binutils.git
synced 2025-01-05 08:23:37 +01: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
|
||||
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"
|
||||
|
|
Loading…
Reference in a new issue