From fc55daf22dd890860ac9c1a0a29900977a700df2 Mon Sep 17 00:00:00 2001 From: lemon Date: Mon, 8 Aug 2022 16:06:08 +0200 Subject: start self hosted comler --- bootstrap/bootstrap.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 bootstrap/bootstrap.sh (limited to 'bootstrap/bootstrap.sh') diff --git a/bootstrap/bootstrap.sh b/bootstrap/bootstrap.sh new file mode 100755 index 0000000..1cb9f42 --- /dev/null +++ b/bootstrap/bootstrap.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +cd $(dirname "$0") + +./build.sh + +if [ x"$CC" == x ]; then + export CC=cc +fi +export CFLAGS="-Wno-builtin-declaration-mismatch -g" + +set -euo pipefail + +mkdir -p obj1/ +for f in $(find ../src/ -name '*.cff'); do + out=obj1/$(basename "$f").o + (set -x ; ./cff0 "$f" | $CC $CFLAGS -xc - -c -o $out) +done +set -x +$CC $CFLAGS -ocff1 obj1/*.o -- cgit v1.2.3