DragonEgg on FreeBSD

Hi, folks

  I have made DragonEgg supports FreeBSD 8.1. May someone like
to a look? :slight_smile:

Regards,
chenwj

Hi chenwj,

   I have made DragonEgg supports FreeBSD 8.1. May someone like
to a look? :slight_smile:

great! Does it work ok? If you had to make any changes to dragonegg, please
send patches to the mailing list. If there are some tricks needed to get it
to build, please explain what you had to do and these can be mentioned in the
dragonegg README and on the web-site.

Ciao, Duncan.

Hi, Duncan

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

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

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.