mirror of
https://git.planet-casio.com/Lephenixnoir/sh-elf-gcc.git
synced 2024-12-28 04:23:39 +01:00
24 lines
460 B
Bash
Executable file
24 lines
460 B
Bash
Executable file
#! /usr/bin/env bash
|
|
|
|
# Avoid rebuilds of the same version
|
|
[[ ! -d build ]] && exit 0
|
|
|
|
source util.sh
|
|
cd build
|
|
|
|
# Number of processor cores
|
|
if [[ $(uname) == "OpenBSD" ]]; then
|
|
cores=$(sysctl -n hw.ncpu)
|
|
else
|
|
cores=$(nproc)
|
|
fi
|
|
|
|
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 \
|
|
$make_command -j"$cores" all-gcc all-target-libgcc
|