Hacker News
new
top
best
ask
show
job
C89cc.sh – standalone C89/ELF64 compiler in pure portable shell
(
gist.github.com
)
4 points
by
gaigalas
6 hours ago
1 comment
gaigalas
6 hours ago
Single standalone file, no external tools used, PATH='' (empty), portable (bash, dash, ksh, zsh), produces x86 ELF executables, has mini-libc builtin.
Usage:
printf 'int main(){puts("hello");return 0;}' | sh c89cc.sh > hello
chmod +x hello
./hello