aboutsummaryrefslogtreecommitdiff
path: root/bfc.sh
diff options
context:
space:
mode:
authorElis Eriksson <spelis@spelis.li>2026-06-20 11:26:50 +0200
committerElis Eriksson <spelis@spelis.li>2026-06-20 11:26:50 +0200
commitde91ec0542aea5959376ee0d2c9d486268dd9392 (patch)
tree2720ad71b20b9fcb6bf4a32d3890cf94a3e0d77a /bfc.sh
parentcbdca328495a772716f14b1e95a7ab7d6450cc27 (diff)
downloadbfc-de91ec0542aea5959376ee0d2c9d486268dd9392.tar
bfc-de91ec0542aea5959376ee0d2c9d486268dd9392.tar.gz
bfc-de91ec0542aea5959376ee0d2c9d486268dd9392.tar.bz2
bfc-de91ec0542aea5959376ee0d2c9d486268dd9392.tar.lz
bfc-de91ec0542aea5959376ee0d2c9d486268dd9392.tar.xz
bfc-de91ec0542aea5959376ee0d2c9d486268dd9392.tar.zst
bfc-de91ec0542aea5959376ee0d2c9d486268dd9392.zip
Add a README, replace the shell script with C code. Add a LICENSE.
Diffstat (limited to 'bfc.sh')
-rwxr-xr-xbfc.sh27
1 files changed, 0 insertions, 27 deletions
diff --git a/bfc.sh b/bfc.sh
deleted file mode 100755
index 49c1370..0000000
--- a/bfc.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env sh
-
-set -e
-
-BFC="./build/bfc"
-SRC="$1"
-
-if [ -z "$SRC" ]; then
- echo "usage: $0 <file.bf>" >&2
- exit 1
-fi
-
-# silently build compiler if missing
-if [ ! -f "$BFC" ]; then
- make -s || {
- echo "build failed" >&2
- exit 1
- }
-fi
-
-# compile pipeline
-OUT=$(cat "$SRC" | "$BFC")
-
-LDFLAGS="-Os -march=native -mtune=native -flto -fuse-linker-plugin -DNDEBUG -fomit-frame-pointer -nostdlib -nostartfiles -no-pie -fno-stack-protector"
-
-echo "$OUT" > out.c
-echo "$OUT" | gcc $LDFLAGS -o ./bf.out -x c -