First Pass at building dragon egg-3.3 for clang 3.3 - using gcc-4.7

LLVM Friends,

First time attempting a build of dragonegg, using our shiny new install of clang-3.3. I’m clearly off to a terrifying start!

dragonegg-3.3.src$ CXX=/usr/bin/gcc GCC=/usr/bin/gcc ENABLE_LLVM_PLUGINS=1 LLVM_CONFIG=/usr/bin/llvm-config CFLAGS=-I/usr/clang/3.3/lib/clang/3.3/include CXXFLAGS="-I/usr/clang/3.3/lib/clang/3.3/include" make

Compiling utils/TargetInfo.cpp
In file included from /usr/clang/3.3/include/llvm/Support/DataTypes.h:67:0,
from /usr/clang/3.3/include/llvm/Support/type_traits.h:20,
from /usr/clang/3.3/include/llvm/ADT/StringRef.h:13,
from /usr/clang/3.3/include/llvm/ADT/Twine.h:13,
from /usr/clang/3.3/include/llvm/ADT/Triple.h:13,
from /home/drlou/Downloads/dragonegg-3.3.src/utils/TargetInfo.cpp:23:
/usr/clang/3.3/lib/clang/3.3/include/stdint.h:32:54: error: missing binary operator before token “(”
/usr/clang/3.3/lib/clang/3.3/include/stdint.h:187:0: warning: “__int_least32_t” redefined [enabled by default]
/usr/clang/3.3/lib/clang/3.3/include/stdint.h:113:0: note: this is the location of the previous definition
/usr/clang/3.3/lib/clang/3.3/include/stdint.h:188:0: warning: “__uint_least32_t” redefined [enabled by default]
/usr/clang/3.3/lib/clang/3.3/include/stdint.h:114:0: note: this is the location of the previous definition
/usr/clang/3.3/lib/clang/3.3/include/stdint.h:189:0: warning: “__int_least16_t” redefined [enabled by default]
/usr/clang/3.3/lib/clang/3.3/include/stdint.h:115:0: note: this is the location of the previous definition

Hi,

LLVM Friends,

First time attempting a build of dragonegg, using our shiny new install of
clang-3.3. I'm clearly off to a terrifying start!

dragonegg-3.3.src$ CXX=/usr/bin/gcc

This says to compile using gcc

  GCC=/usr/bin/gcc

This says that the plugin will be used with /usr/bin/gcc when built.

  ENABLE_LLVM_PLUGINS=1

LLVM_CONFIG=/usr/bin/llvm-config

CFLAGS=-I/usr/clang/3.3/lib/clang/3.3/include

CXXFLAGS="-I/usr/clang/3.3/lib/clang/3.3/include"

These say to use clang headers. Not sure why you want to use clang headers when
compiling using gcc.

  make

Compiling utils/TargetInfo.cpp
In file included from /usr/clang/3.3/include/llvm/Support/DataTypes.h:67:0,
                  from /usr/clang/3.3/include/llvm/Support/type_traits.h:20,
                  from /usr/clang/3.3/include/llvm/ADT/StringRef.h:13,
                  from /usr/clang/3.3/include/llvm/ADT/Twine.h:13,
                  from /usr/clang/3.3/include/llvm/ADT/Triple.h:13,
                  from
/home/drlou/Downloads/dragonegg-3.3.src/utils/TargetInfo.cpp:23:
/usr/clang/3.3/lib/clang/3.3/include/stdint.h:32:54: error: missing binary
operator before token "("

This seems to be saying that gcc doesn't like the clang headers. I suggest you
don't use them.

Anyway, not sure why you are trying to do this so complicated, doesn't this
work:
   make
?

Other comments:
   CXX is for providing a C++ compiler, so should be g++ not gcc
    Since /usr/bin/gcc is in your path, probably you don't need CXX to force this
    compiler (or did you put clang in front of it in your path?; if so it still
    shouldn't be needed since clang can also compile dragonegg)

   GCC=/usr/bin/gcc is probably not needed, since it is the default

Ciao, Duncan.