LLVM 1.5 C Front-End Binaries for FreeBSD?

Might anyone have a FreeBSD binary or suggested modifications to the
source to compile one?

Thanks,
Sean

Sean Peisert wrote:

Might anyone have a FreeBSD binary or suggested modifications to the
source to compile one?

If you want to build the GCC frontend, you can do so by following the directions here (http://llvm.cs.uiuc.edu/docs/CFEBuildInstrs.html). It should build on FreeBSD without modification. The directions for building our GCC frontend differ from those used to build regular GCC.

(BTW, I assuming you're building for FreeBSD on i386. If you're building for another architecture supported by FreeBSD, then you might need to do some tweaking for the build; we'd be interested in any such necessary tweaks so that we can add them to the above document).

We currently don't have a FreeBSD binary, but I think there's one person on the list who uses FreeBSD regularly; he might be able to help.

Thanks,
Sean

_______________________________________________
LLVM Developers mailing list
LLVMdev@cs.uiuc.edu http://llvm.cs.uiuc.edu
http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev

-- John T.

Sean Peisert wrote:

John,

I may be missing something here, but if I the compilation docs, I need
to build LLVM first and the C frontend second. But doing this, I
get:

**llvm-gcc/llvm-g++ was not found,

(obviously -- it wasn't installed, right?)

You do need to build LLVM first before building llvm-gcc. This may seem a bit weird, but here's what's going on:

1. All of the LLVM tools build without llvm-gcc/llvm-g++. So, if you run configure and then build LLVM with "make tools-only," it will build all of the LLVM tools. You'll get a warning from configure telling you that it cannot find llvm-gcc. This warning is benign and can be ignored.

2. Next, build llvm-gcc/llvm-g++. The compiler will invoke gccas and gccld (built in step 1), so you need to make sure that the LLVM tools are in your $PATH.

3. Now you have the LLVM tools and the llvm-gcc/llvm-g++ compiler. However, there are some libraries in the LLVM source tree (in llvm/runtime, to be exact), which need to be built by llvm-gcc.

So, go back to the LLVM source tree and re-run configure so that it can find the llvm-gcc/llvm-g++ binaries (which you should put into your $PATH). Then, go into llvm/runtime and run "make install-bytecode". That will build the remaining bytecode libraries and install them into the llvmgccdir/lib directory.

That should be it. Please let us know the above does not work.

-- John T.

John,

Thanks -- your suggestions seem to have worked (thanks for the note
about the benign configuration warnings -- that was helpful).
However, I'm running into two issues. The first is in step 9 of the
compilation instructions. When I do this:

% llvm-ranlib libiberty.a

... I'm not finding llvm-ranlib. In fact, llvm-ranlib doesn't seem to
exist. Which "step" should produce it and where should it be
installed?

Second, I'm not sure if the tests are functioning properly. "make
check" gives a ton of makefile errors, while "gmake check" is almost
silent. Is this a positive result:

gmake check

llvm[0]: Running test suite
gmake[1]: Entering directory `/usr/home/sean/LLVM/llvm/test'
PATH="/usr/home/sean/LLVM/llvm/Debug/bin:/usr/home/sean/LLVM/llvm/test/Scripts:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/home/sean/bin:/usr/home/sean/LLVM/cfrontend/install/bin"
\
true runtest
gmake[1]: Leaving directory `/usr/home/sean/LLVM/llvm/test'

Thanks,
Sean