[LLVMdev] DragonEgg on FreeBSD

Duncan Sands baldrick at free.fr
Tue Jan 11 03:41:32 PST 2011


Hi chenwj,

>    I only tested dragonegg on simple HelloWorld C/C++ programs. It can emit LLVM IR and
> generate a runable executable.

thanks for the info.

>    On FreeBSD, Makefile need to be modified to include a path to gmp.h
> header file. I give a patch here,

You can get the same effect by doing:

   CPPFLAGS=-I/usr/local/include gmake

>    And you should make a freebsd directory and copy linux/llvm-os.h to
> there.
>
> --------------------------------------------------------------------------------
> $ mkdir freebsd
> $ cp linux/llvm-os.h freebsd/
> --------------------------------------------------------------------------------

I've added freebsd/llvm-os.h to the repository.  I didn't copy the linux version
because I'm not sure that the definition of LLVM_SET_TARGET_OPTIONS is correct
for freebsd.  Since llvm-gcc doesn't set anything for freebsd, I didn't either.

>
>    Finally, use "gmake" not "make" on FreeBSD to build dragonegg.so.

OK.

>    Well, there are warings while building dragonegg.so. But I guess it
> doesn't affect dragonegg.so, I just leave it there. Here are the
> warnings.
>
> --------------------------------------------------------------------------------
> <command-line>: warning: "__STDC_LIMIT_MACROS" redefined
> <command-line>: warning: this is the location of the previous definition
> --------------------------------------------------------------------------------

This is harmless: __STDC_LIMIT_MACROS is defined twice (the same each time) on
the command line.  I'm not sure it is worth fixing, especially as recent
versions of gcc don't warn about this.

Ciao,

Duncan.



More information about the llvm-dev mailing list