diff options
| author | 2022-08-08 16:06:08 +0200 | |
|---|---|---|
| committer | 2022-08-08 16:06:08 +0200 | |
| commit | fc55daf22dd890860ac9c1a0a29900977a700df2 (patch) | |
| tree | 96735ed737ae499c9dbbf54ad7bec44c6a4b6eb0 /bootstrap/bootstrap.sh | |
| parent | cc325dce01101e8b488cfc7e9fddfe0f778c7e17 (diff) | |
start self hosted comler
Diffstat (limited to 'bootstrap/bootstrap.sh')
| -rwxr-xr-x | bootstrap/bootstrap.sh | 20 |
1 files changed, 20 insertions, 0 deletions
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 |