[LLVMdev] DragonEgg 3.0 with GCC 4.7

Eric Smith eric at brouhaha.com
Fri Mar 23 16:57:55 PDT 2012


I've been trying to package DragonEgg for Fedora Linux.  Fedora 16 has 
LLVM 2.9 and GCC 4.6, but not the necessary GCC patches.  If I build 
LLVM 3.0 on Fedora 16, then I can build DragonEgg 3.0, and it works 
fine.  However, I can't submit that to the repository.

On the other hand, Fedora 17, which just entered Beta, has LLVM 3.0 and 
GCC 4.7.  I wasn't able to build DragonEgg 3.0 with GCC 4.7 due to an 
error compiling Backend.cpp, but yesterday I saw that commit #152558 
fixes this.  However, now when I try to build DragonEgg, I get a lot of 
other errors.

On the one hand, I don't expect there to be any official support for 
DragonEgg 3.0 with GCC 4.7.  On the other hand, it would be nice to get 
DragonEgg into Fedora 17 rather than having to wait another six months 
for LLVM 3.1 to land in Fedora 18.  Would anyone care to look at the 
build problems I'm seeing?  Perhaps these problems were already fixed in 
other commits in the repository.

Some of the errors I'm getting are:

/builddir/build/BUILD/dragonegg-3.0.src/src/Trees.cpp: In function 'uint64_t getFieldOffsetInBits(tree)':
/builddir/build/BUILD/dragonegg-3.0.src/src/Trees.cpp:191:56: error: 'BITS_PER_UNIT' was not declared in this scope

/builddir/build/BUILD/dragonegg-3.0.src/src/DefaultABI.cpp: In member function 'void DefaultABI::HandleArgument(tree, std::vector<llvm::Type*, std::allocator<llvm::Type*>  >&, llvm::Attributes*)':
/builddir/build/BUILD/dragonegg-3.0.src/src/DefaultABI.cpp:223:14: error: 'TARGET_64BIT' was not declared in this scope
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.7.0/plugin/include/tm_p.h:5:0,
                  from /builddir/build/BUILD/dragonegg-3.0.src/src/Constants.cpp:52:
/usr/lib/gcc/x86_64-redhat-linux/4.7.0/plugin/include/tm-preds.h:191:13: error: use of enum 'reg_class' without previous declaration
/usr/lib/gcc/x86_64-redhat-linux/4.7.0/plugin/include/tm-preds.h:191:68: error: invalid type in declaration before ';' token
/builddir/build/BUILD/dragonegg-3.0.src/src/Constants.cpp: In member function '{anonymous}::BitSlice {anonymous}::BitSlice::ExtendRange(SignedRange, llvm::TargetFolder&) const':
/builddir/build/BUILD/dragonegg-3.0.src/src/Constants.cpp:188:7: error: 'BYTES_BIG_ENDIAN' was not declared in this scope
/builddir/build/BUILD/dragonegg-3.0.src/src/Constants.cpp: In member function '{anonymous}::BitSlice {anonymous}::BitSlice::ReduceRange(SignedRange, llvm::TargetFolder&) const':


The full build log is at:
     
http://koji.fedoraproject.org/koji/getfile?taskID=3925063&name=build.log

Once i can get DragonEgg into Fedora, I'm hoping to convince the package 
maintainers for GCC in Red Hat Enterprise Linux 6 to include the patch 
to GCC 4.4 necessary to build DragonEgg 2.8, since I expect it will be a 
long time (years!) before LLVM 3.x shows up in RHEL7.

Thanks!
Eric




More information about the llvm-dev mailing list