sh-elf-gcc/build.sh

25 lines
484 B
Bash
Raw Normal View History

#! /usr/bin/env bash
2021-01-08 10:00:34 +01:00
# Avoid rebuilds of the same version
[[ ! -d build ]] && exit 0
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-03-18 14:25:27 +01:00
if command -v gmake >/dev/null 2>&1; then
make_command=gmake
else
make_command=make
fi
echo "$TAG Compiling gcc (usually 10-20 minutes)..."
run_quietly giteapc-build.log \
2021-03-18 14:25:27 +01:00
$make_command -j"$cores" all-gcc all-target-libgcc