diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2016-12-24 22:42:21 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2016-12-25 01:56:42 +0100 |
commit | a4390d38b579aece912fcc0af02c92f88b35a17c (patch) | |
tree | e4a427f829679444bcbbf3be88f1bc90aa96a7a9 | |
parent | b846a7a0ea77de85c0d84d3653d8db8d3c81b4c9 (diff) | |
download | bfc-a4390d38b579aece912fcc0af02c92f88b35a17c.tar.gz bfc-a4390d38b579aece912fcc0af02c92f88b35a17c.tar.xz bfc-a4390d38b579aece912fcc0af02c92f88b35a17c.zip |
Fix interpreter portability
-rw-r--r-- | README.adoc | 8 | ||||
-rw-r--r-- | interpreters/Makefile | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/README.adoc b/README.adoc index 69ebd7e..5944529 100644 --- a/README.adoc +++ b/README.adoc @@ -2,14 +2,15 @@ bfc === 'bfc' is a small, fast, self-contained, optimizing Brainfuck compiler for *nix -on Intel x86-64. Currently supported targets are Linux and OpenBSD. +on Intel x86-64. Also included are several interpreters in various states of sophistication that document my progress as I was writing this, from the simplest approach to an optimizing JIT compiler. It's pretty easy to retarget the compiler, it just means redoing half the work. -The compiler itself is platform agnostic. +Thanks to the unified ABI, adding support for another flavour of *nix only means +changing the syscall numbers. The compiler itself is platform agnostic. Building -------- @@ -27,7 +28,8 @@ To obtain dumps of the intermediate representation, compile with `-DDEBUG`: Usage ----- - ./bfc-amd64-linux [INPUT-FILE] [OUTPUT-FILE] + $ ./bfc-amd64-linux [INPUT-FILE] [OUTPUT-FILE] + $ ./bfc-amd64-openbsd [INPUT-FILE] [OUTPUT-FILE] When no input file is specified, standard input is used. Similarly, the default output filename is `a.out`. After the compilation, the resulting file can be diff --git a/interpreters/Makefile b/interpreters/Makefile index 3e73cf5..9839f2d 100644 --- a/interpreters/Makefile +++ b/interpreters/Makefile @@ -1,5 +1,4 @@ -CC = c99 -CFLAGS = -O3 +CFLAGS = -std=gnu99 -O3 NAMES = bf bf-faster-loops bf-optimizing \ bf-jit bf-jit-opt bf-jit-unsafe bf-jit-unsafe-opt |