aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/bootstrap.sh
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-16 09:19:33 +0200
committerlemon <lsof@mailbox.org>2022-08-16 09:19:33 +0200
commit1ca77f60626666fba792db407dd11ea9b597d9cf (patch)
tree0e5ea52e457474899ad5f0076bbe658e67626925 /bootstrap/bootstrap.sh
parent04c7892134d49f3b295a51cc741affe9f02e374d (diff)
binary operators and more stuff
Diffstat (limited to 'bootstrap/bootstrap.sh')
-rwxr-xr-xbootstrap/bootstrap.sh13
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