weirdgiraffe / bfbench

benchmark for different brainfuck interpreters
0 stars 0 forks source link

To compile git@github.com:windoze/brainfuck.git #1

Open rdebath opened 7 years ago

rdebath commented 7 years ago

You need g++ and llvm-3.1, for example:

g++ -O3 -s `llvm-config-3.1 --cxxflags --ldflags ` -o bf bfcodegen.cpp bfjit.cpp bf.cpp `llvm-config-3.1 --libs all `

This is simply because LLVM isn't compatible between versions. I've no idea how to convince cmake to do the right thing, so far it looks like it's not capable of doing it.

weirdgiraffe commented 7 years ago

Default LLVM on Debian Jessie is 3.5, and I don't want to install custom compiler version for every interpreter. I'll try to compile manually later

rdebath commented 7 years ago

You can (and I have on this machine) install llvm-3.1 from Debian wheezy on a Debian jessie machine.

These are all Debian packages and they can all install at the same time. LLVM is actually just the code generator library not the C compiler (clang) and the Debian maintainers know how much of a pain it is.

llvm-2.7:i386/squeeze 2.7-6 uptodate
llvm-2.9:i386/wheezy 2.9+dfsg-7 uptodate
llvm-3.0:i386/wheezy 3.0-10 uptodate
llvm-3.1:i386/wheezy 3.1-1 uptodate
llvm-3.4:i386/jessie 1:3.4.2-13 uptodate
llvm-3.5:i386/jessie 1:3.5-10 uptodate

It looks like 3.8 is now available in backports, so that should work fine too. So I might be able to compile https://github.com/Wilfred/bfc without spinning up a VM to download everything.

NB: Not wanting to install a Wheezy package is quite reasonable though.