sh-elf-binutils/build.sh

26 lines
463 B
Bash
Raw Normal View History

2021-01-01 23:22:19 +01:00
#! /usr/bin/env bash
2021-01-07 18:31:52 +01:00
# Avoid rebuilds of the same version
[[ ! -d build ]] && exit 0
2021-01-01 23:22:19 +01:00
source util.sh
cd build
# Number of processor cores
if [[ $(uname) == "OpenBSD" || $(uname) == "Darwin" ]]; then
cores=$(sysctl -n hw.ncpu)
else
cores=$(nproc)
fi
2021-01-01 23:22:19 +01:00
echo "$TAG Compiling binutils (usually 5-10 minutes)..."
2021-03-18 14:00:59 +01:00
if command -v gmake >/dev/null 2>&1; then
make_command=gmake
else
make_command=make
fi
2021-01-01 23:22:19 +01:00
run_quietly giteapc-build.log \
2021-03-18 14:00:59 +01:00
$make_command -j"$cores"