sh-elf-gcc/build.sh
Lephenixnoir 26affe51cf
new build system for fxSDK sysroot and libstdc++-v3
The main change is making the scripts a two-stage process where we
first build GCC, leave the user to install the libc, and then come back
to install libstdc++-v3.

* Detect whether we are in the first or second stage
* Don't clean files after first stage install, and even then only do it
  if :clean is specified
* Update README except for the manual install tutorial
* Patch the source using a backported GCC 12.1 commit to make the
  configure script for libstdc++-v3 skip checking for dlopen, which is
  impossible is our not-really-hosted setup

Details:
* Proper .gitignore
2022-08-19 15:23:21 +02:00

24 lines
614 B
Bash
Executable file

#! /usr/bin/env bash
# Avoid rebuilds of the same version
[[ -e "build/giteapc-skip-rebuild.txt" ]] && 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
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
else
echo "$TAG Compiling gcc (usually 10-20 minutes)..."
run_quietly giteapc-build.log \
$MAKE_COMMAND -j"$cores" all-gcc all-target-libgcc
fi