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,
--------------------------------------------------------------------------------
--- Makefile.orig 2011-01-08 12:39:35.480184745 +0800
+++ Makefile 2011-01-08 12:40:58.569064365 +0800
@@ -52,7 +52,8 @@
-MD -MP \
-DIN_GCC -DREVISION=\"$(REVISION)\" \
-DGCC_MAJOR=$(GCC_MAJOR) -DGCC_MINOR=$(GCC_MINOR) \
- -I$(SRC_DIR) -I$(GCC_PLUGIN_DIR)/include
+ -I$(SRC_DIR) -I$(GCC_PLUGIN_DIR)/include \
+ -I/usr/local/include
LD_OPTIONS+=$(LDFLAGS) $(shell $(LLVM_CONFIG) --ldflags)
--------------------------------------------------------------------------------
And you should make a freebsd directory and copy linux/llvm-os.h to
there.
--------------------------------------------------------------------------------
$ mkdir freebsd
$ cp linux/llvm-os.h freebsd/
--------------------------------------------------------------------------------
Finally, use "gmake" not "make" on FreeBSD to build
dragonegg.so.
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
--------------------------------------------------------------------------------
Regards,
chenwj
--
Wei-Ren Chen (陳韋任)
Parallel Processing Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667