Browse Source

Fix interpreter portability

Přemysl Janouch 2 years ago
parent
commit
a4390d38b5
Signed by: Přemysl Janouch <p.janouch@gmail.com> GPG Key ID: B715679E3A361BE6
2 changed files with 6 additions and 5 deletions
  1. 5
    3
      README.adoc
  2. 1
    2
      interpreters/Makefile

+ 5
- 3
README.adoc View File

@@ -2,14 +2,15 @@ bfc
2 2
 ===
3 3
 
4 4
 'bfc' is a small, fast, self-contained, optimizing Brainfuck compiler for *nix
5
-on Intel x86-64.  Currently supported targets are Linux and OpenBSD.
5
+on Intel x86-64.
6 6
 
7 7
 Also included are several interpreters in various states of sophistication that
8 8
 document my progress as I was writing this, from the simplest approach to an
9 9
 optimizing JIT compiler.
10 10
 
11 11
 It's pretty easy to retarget the compiler, it just means redoing half the work.
12
-The compiler itself is platform agnostic.
12
+Thanks to the unified ABI, adding support for another flavour of *nix only means
13
+changing the syscall numbers.  The compiler itself is platform agnostic.
13 14
 
14 15
 Building
15 16
 --------
@@ -27,7 +28,8 @@ To obtain dumps of the intermediate representation, compile with `-DDEBUG`:
27 28
 Usage
28 29
 -----
29 30
 
30
- ./bfc-amd64-linux [INPUT-FILE] [OUTPUT-FILE]
31
+ $ ./bfc-amd64-linux [INPUT-FILE] [OUTPUT-FILE]
32
+ $ ./bfc-amd64-openbsd [INPUT-FILE] [OUTPUT-FILE]
31 33
 
32 34
 When no input file is specified, standard input is used.  Similarly, the default
33 35
 output filename is `a.out`.  After the compilation, the resulting file can be

+ 1
- 2
interpreters/Makefile View File

@@ -1,5 +1,4 @@
1
-CC = c99
2
-CFLAGS = -O3
1
+CFLAGS = -std=gnu99 -O3
3 2
 
4 3
 NAMES = bf bf-faster-loops bf-optimizing \
5 4
 	bf-jit bf-jit-opt bf-jit-unsafe bf-jit-unsafe-opt

Loading…
Cancel
Save