diff options
Diffstat (limited to 'bootstrap/bootstrap.sh')
| -rwxr-xr-x | bootstrap/bootstrap.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/bootstrap/bootstrap.sh b/bootstrap/bootstrap.sh index c2fd41e..f221ce2 100755 --- a/bootstrap/bootstrap.sh +++ b/bootstrap/bootstrap.sh @@ -2,11 +2,16 @@ cd $(dirname "$0") -./build.sh || exit 1 - if [ x"$CC" == x ]; then export CC=cc fi + +if command -v ccache > /dev/null; then + export CC="ccache $CC" +fi + +./build.sh || exit 1 + export CFLAGS="-Wno-builtin-declaration-mismatch -Wno-discarded-qualifiers -g" set -euo pipefail @@ -16,5 +21,9 @@ for f in $(find ../src/ -name '*.cff'); do out=obj1/$(basename "$f").o (set -x ; ./cff0 "$f" | $CC $CFLAGS -xc - -c -o $out) done +for f in $(find ../src/ -name '*.c'); do + out=obj1/$(basename "$f").o + (set -x ; $CC $CFLAGS "$f" -c -o $out) +done set -x $CC $CFLAGS -ocff1 obj1/*.o |