[LLVMdev] DragonEgg3.3 support for gcc cross compilers (original) (raw)

Brian Faull bfaull at cog-e.com
Mon Oct 27 21:39:23 PDT 2014


Hello,

There may be plenty more experienced experts on DragonEgg (and hopefully they'll correct me if I'm wrong), but I figured I'd chime in with my brief experience to start. I have messed with this a bit, and DragonEgg has worked for my experiments. Your configuration has many things that are different than mine; however, I think you might simply have the cross-compilers crossed backward; I think you want to use your native gcc as compiler-driver; pass dragonegg.so to your native-gcc rather than tilera-gcc. I think you may simply need to do the following:

1- Build DragonEgg using your system compiler (or gcc 4.6.4 as recommended on dragonegg.llvm.org); when doing make, point explicitly at your build (x86_64) GCC of choice, and against your target (tilera) llvm-config. 2- use your x86_64 compiler-driver as front-end, which due to the magic of DragonEgg and llvm-config will use your target LLVM backend.

Or it could be really late and I'm not thinking straight. :)

More detail: I had to set a few non-obvious (to me) things in the build and use process, so I'll reflect them here for you and/or posterity. You will need all three components though: LLVM backend for your architecture (tilera) I'd suggest a few things to try, in order for you to find a configuration that works for you:

Then you should be able to manually use your backend (llvm33/bin/llc, assembler, etc.) to generate an architecture-specific object. Once you've got all those components, you should be able to get everything integrated with just one gcc compiler-driver invocation.

HTH, Brian

On Oct 27, 2014, at 11:53 PM, Ajay Panyala <ajay.panyala at gmail.com> wrote:

I am using a gcc (v 4.8.2) cross compiler for the tilera architecture. There is an LLVM (v 3.3) cross compiler available for tilera (http://tilera.github.io/llvm <http://tilera.github.io/llvm>), but the frontend only has partial support for certain tilera intrinsics and no OpenMP support. Hence, I have decided to use DragonEgg (v 3.3) to resolve this. I was able to build DragonEgg, but when I pass the command line argument -fplugin=dragonegg.so when compiling with the tilera-gcc I get the error cannot load dragonegg.so: wrong ELF class: ELFCLASS64 i.e. the tilera-gcc does not accept the x86 shared library object dragonegg.so The dragonegg sources were built using the x86 GCC, but the plugin was built to load into the tilera gcc. Could someone please point out what I am missing here. Thanks Ajay


LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141028/7f06d0a2/attachment.html>



More information about the llvm-dev mailing list