sh-elf-gcc/build.sh

25 lines
614 B
Bash
Raw Permalink Normal View History

#! /usr/bin/env bash
2021-01-08 10:00:34 +01:00
# Avoid rebuilds of the same version
[[ -e "build/giteapc-skip-rebuild.txt" ]] && exit 0
2021-01-08 10:00:34 +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
if [[ -e "giteapc-build-libstdcxx.txt" ]]; then
echo "$TAG Compiling libstdc++-v3..."
run_quietly giteapc-build-libstdcxx.log \
$MAKE_COMMAND -j"$cores" all-target-libstdc++-v3
2021-03-18 14:25:27 +01:00
else
echo "$TAG Compiling gcc (usually 10-20 minutes)..."
run_quietly giteapc-build.log \
$MAKE_COMMAND -j"$cores" all-gcc all-target-libgcc
2021-03-18 14:25:27 +01:00
fi